From 69149327b4817bd8ca428c07a34766ffdc4380ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 3 Feb 2006 20:19:32 +0000 Subject: [PATCH] This may fix Rudolf's MTRR problem - could you please try? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16220 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/cpu/x86/generic_x86.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/add-ons/kernel/cpu/x86/generic_x86.cpp b/src/add-ons/kernel/cpu/x86/generic_x86.cpp index 9d575ed821..53d1355ee7 100644 --- a/src/add-ons/kernel/cpu/x86/generic_x86.cpp +++ b/src/add-ons/kernel/cpu/x86/generic_x86.cpp @@ -139,6 +139,10 @@ generic_mtrr_compute_physical_mask(void) && cpuInfo.eax_0.max_eax & 0xff >= 8) { get_cpuid(&cpuInfo, 0x80000008, 0); bits = cpuInfo.regs.eax & 0xff; + + // Obviously, the bits are not always reported correctly + if (bits < 36) + bits = 36; } gPhysicalMask = ((1ULL << bits) - 1) & ~(B_PAGE_SIZE - 1);