Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

MTRR mystery (Announce)

posted by RayeR Homepage, CZ, 06.02.2012, 02:23
(edited by RayeR on 06.02.2012, 02:35)

Ou, I found a bug in printing the MTRRs. When I did 12-bit shift I forget it will owerflow 32bit variable so the top nibble was displayed always zero. Now I can see that have a MTRR with base at 4GB and 512MB area, that looks like remapping always enabled...

Here's my updated tools: http://rayer.ic.cz/350d/vesatest.zip
* fixed debug print
* debug print is now compiled by default and can be unabled by /d switch so use
mtrrlfbe lfb wc /d
* added MTRR area trimming to highest power of 2 that fits LFB size according to intel SWDM
* added code that searchs through all MTRRs and patch MTRR with base 0 and mask 4GB to mask 2GB.

Please retest. If you have a time try to make all logs again (c2d with and without remap and i7, all twice). Fastvid now shouldn't be needed (anyway it doesn't met 2^n rule).

Here's my output - before:

VESA 3.0 NVIDIA [262144 kB]
LFB address: E0000000h
MTRR #0: base = 000000000h ( 0MB), mask = F00000000h (4096MB), WB, used
MTRR #1: base = 0E0000000h (3584MB), mask = FE0000000h ( 512MB), UC, used
MTRR #2: base = 100000000h (4096MB), mask = FE0000000h ( 512MB), WB, used
MTRR #3: base = 0DFF00000h (3583MB), mask = FFFF00000h ( 1MB), UC, used
MTRR #4: base = 000000000h ( 0MB), mask = 000000000h ( 0MB), UC, unused
MTRR #5: base = 000000000h ( 0MB), mask = 000000000h ( 0MB), UC, unused
MTRR #6: base = 000000000h ( 0MB), mask = 000000000h ( 0MB), UC, unused
MTRR #7: base = 000000000h ( 0MB), mask = 000000000h ( 0MB), UC, unused
Setting MTRR #1...
MTRR area E0000000-EFFFFFFFh was set to mode: WC

after:

VESA 3.0 NVIDIA [262144 kB]
LFB address: E0000000h
MTRR #0: base = 000000000h ( 0MB), mask = F80000000h (2048MB), WB, used
MTRR #1: base = 0E0000000h (3584MB), mask = FF0000000h ( 256MB), WC, used
MTRR #2: base = 100000000h (4096MB), mask = FE0000000h ( 512MB), WB, used
MTRR #3: base = 0DFF00000h (3583MB), mask = FFFF00000h ( 1MB), UC, used
MTRR #4: base = 000000000h ( 0MB), mask = 000000000h ( 0MB), UC, unused
MTRR #5: base = 000000000h ( 0MB), mask = 000000000h ( 0MB), UC, unused
MTRR #6: base = 000000000h ( 0MB), mask = 000000000h ( 0MB), UC, unused
MTRR #7: base = 000000000h ( 0MB), mask = 000000000h ( 0MB), UC, unused
Setting MTRR #1...
MTRR area E0000000-EFFFFFFFh was set to mode: WC

---
DOS gives me freedom to unlimited HW access.

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 445 users online (0 registered, 445 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum