Re: MTRR fixup?

From: Scott Long <scottl_at_samsco.org>
Date: Wed, 03 Sep 2008 23:26:30 -0600
Josh Carroll wrote:
>> The SMAP table, printed early during boot when bootverbose is set, will
>> tell you what is mapped where.
> 
> Ok, here is my SMAP (I had to transcribe it by hand from a picture, it
> doesn't appear in dmesg or get written to /var/run/dmesg.boot):
> 
> SMAP type=01 base=0000000000000000 len=000000000009ec00
> SMAP type=02 base=000000000009ec00 len=0000000000001400
> SMAP type=02 base=00000000000e4000 len=000000000001c000
> SMAP type=01 base=0000000000100000 len=00000000cfe80000

So RAM goes from 0x100000 to 0xcff8000, and is then followed
by:

> SMAP type=03 base=00000000cff80000 len=000000000000e000
> SMAP type=04 base=00000000cff8e000 len=0000000000052000
> SMAP type=02 base=00000000cffe0000 len=0000000000020000

Then from 0xd0000000 to 0xfee00000, nothing is listed in the table.
The absence of type01 means that there is definitely no RAM here,
therefore nothing to legitimately mark cachable.

> SMAP type=02 base=00000000fee00000 len=0000000000001000
> SMAP type=02 base=00000000ffe00000 len=0000000000200000

And here we've pretty much reached the end of the first 4GB of address 
space.  From 0xd0000000 to 0xffffffff, there is no RAM.  This exactly
corresponds with the range that memcontrol told you was uncachable.  So
what happened to this missing 768MB of RAM?

> SMAP type=01 base=0000000100000000 len=0000000030000000

Here's where it is.  What I don't recall is whether the MTRR understands
addresses above 4GB.  I lost context, are you using FreeBSD/amd64 or 
i386+PAE?  If so, does memcontrol let you see this RAM?

Out of curiosity, do you have a video card with a lot of VRAM on it, or
are you using a motherboard that is marketed as a 'gamer' or 'desktop'
board?

Scott
Received on Thu Sep 04 2008 - 03:26:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:34 UTC