Rev 4608 | Rev 5130 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4608 | Rev 4619 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 4608 $ |
8 | $Revision: 4619 $ |
9 | 9 | ||
Line 10... | Line 10... | ||
10 | ; Initializes MTRRs. |
10 | ; Initializes MTRRs. |
Line 819... | Line 819... | ||
819 | ; Try to detect this and let the user know that the low performance |
819 | ; Try to detect this and let the user know that the low performance |
820 | ; is caused by some problem and is not a global property of the system. |
820 | ; is caused by some problem and is not a global property of the system. |
821 | ; Let's hope he would report it to developers... |
821 | ; Let's hope he would report it to developers... |
822 | proc mtrr_validate |
822 | proc mtrr_validate |
823 | ; 1. If MTRRs are not supported, they cannot be configured improperly. |
823 | ; 1. If MTRRs are not supported, they cannot be configured improperly. |
- | 824 | ; Note: VirtualBox claims MTRR support in cpuid, but emulates MTRRCAP=0, |
|
- | 825 | ; which is efficiently equivalent to absent MTRRs. |
|
- | 826 | ; So check [num_variable_mtrrs] instead of CAPS_MTRR in [cpu_caps]. |
|
824 | bt [cpu_caps], CAPS_MTRR |
827 | cmp [num_variable_mtrrs], 0 |
825 | jnc .exit |
828 | jz .exit |
826 | ; 2. If variable-range MTRRs are not configured, this is a problem. |
829 | ; 2. If variable-range MTRRs are not configured, this is a problem. |
827 | mov ecx, 0x2FF |
830 | mov ecx, 0x2FF |
828 | rdmsr |
831 | rdmsr |
829 | test ah, 8 |
832 | test ah, 8 |
830 | jz .fail |
833 | jz .fail |