From 43101a862366393aa310c0892388c5d68b6bd3d9 Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Fri, 7 Mar 2014 10:57:58 +0000 Subject: [PATCH] r4619 git-svn-id: svn://kolibrios.org@4619 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/mtrr.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/trunk/core/mtrr.inc b/kernel/trunk/core/mtrr.inc index a7aa8b1bde..fcca6e68f8 100644 --- a/kernel/trunk/core/mtrr.inc +++ b/kernel/trunk/core/mtrr.inc @@ -821,8 +821,11 @@ endp ; Let's hope he would report it to developers... proc mtrr_validate ; 1. If MTRRs are not supported, they cannot be configured improperly. - bt [cpu_caps], CAPS_MTRR - jnc .exit +; Note: VirtualBox claims MTRR support in cpuid, but emulates MTRRCAP=0, +; which is efficiently equivalent to absent MTRRs. +; So check [num_variable_mtrrs] instead of CAPS_MTRR in [cpu_caps]. + cmp [num_variable_mtrrs], 0 + jz .exit ; 2. If variable-range MTRRs are not configured, this is a problem. mov ecx, 0x2FF rdmsr