Re: MTRR fixup?

From: Josh Carroll <josh.carroll_at_gmail.com>
Date: Thu, 4 Sep 2008 11:34:42 -0400
Hi Scott,

First, I really appreciate the in-depth explanation here. Always good
to learn something new.

> 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?

It's 7.1-PRERELEASE/amd64 . Below is the full memcontrol list output,
and devinfo -r output (for the portions pertaining to ram0) - which
shows the type=01 address ranges. I wasn't aware of that, but Bernd
pointed that out.

> 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?

The video card in question is just a cheapo $25 PCI-E video card,
"BIOSTAR V6202EL16 GeForce 6200LE 256MB TurboCache(128M VRAM on board)
64-bit GDDR2 PCI Express x16 Low Profile".  Here's the pciconf output
for it:

vgapci0_at_pci0:1:0:0:     class=0x030000 card=0x00000000 chip=0x016310de
rev=0xa1 hdr=0x00
    vendor     = 'Nvidia Corp'
    device     = 'GeForce 6200 LE'
    class      = display
    subclass   = VGA

I believe it has 128MB onboard and the "turbocache" is just their
buzzword term for using 128M of shared system memory. Here is the
devinfo -r information on the I/O ranges for it:

            vgapci0
                I/O memory addresses:
                    0xd0000000-0xdfffffff
                    0xfc000000-0xfcffffff
                    0xfd000000-0xfdffffff

The first range is a 256MB chunk (framebuffer?) and corresponds to an
uncacheable area from memcontrol list:

0xd0000000/0x10000000 BIOS uncacheable set-by-firmware active

But this address range does not intersect any of the SMAP ranges. So
I'm not entirely sure how the extra 128MB comes into play. Perhaps the
"turbocache" feature requires that the OS know about it and handles
the memory ranges appropriately? Do you have any ideas how that might
work? Perhaps it just limits the available VRAM to 128MB if the OS
does not support "TurboCache"?

The board itself is the Asus P5K-E, with no on-board video. I'll have
to poke around the BIOS and play with whatever the PCI-E equivalent of
"AGP aperture size" is, and see if/how that affects the SMAP and/or
mtrrs.

Thanks,
Josh

memcontrol list output:

0x0/0x10000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x10000/0x10000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x20000/0x10000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x30000/0x10000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x40000/0x10000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x50000/0x10000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x60000/0x10000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x70000/0x10000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x80000/0x4000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x84000/0x4000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x88000/0x4000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x8c000/0x4000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x90000/0x4000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x94000/0x4000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x98000/0x4000 BIOS write-back fixed-base fixed-length set-by-firmware active
0x9c000/0x4000 BIOS write-back fixed-base fixed-length set-by-firmware active
0xa0000/0x4000 BIOS uncacheable fixed-base fixed-length set-by-firmware active
0xa4000/0x4000 BIOS uncacheable fixed-base fixed-length set-by-firmware active
0xa8000/0x4000 BIOS uncacheable fixed-base fixed-length set-by-firmware active
0xac000/0x4000 BIOS uncacheable fixed-base fixed-length set-by-firmware active
0xb0000/0x4000 BIOS uncacheable fixed-base fixed-length set-by-firmware active
0xb4000/0x4000 BIOS uncacheable fixed-base fixed-length set-by-firmware active
0xb8000/0x4000 BIOS uncacheable fixed-base fixed-length set-by-firmware active
0xbc000/0x4000 BIOS uncacheable fixed-base fixed-length set-by-firmware active
0xc0000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xc1000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xc2000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xc3000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xc4000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xc5000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xc6000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xc7000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xc8000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xc9000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xca000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xcb000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xcc000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xcd000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xce000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xcf000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xd0000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xd1000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xd2000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xd3000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xd4000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xd5000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xd6000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xd7000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xd8000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xd9000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xda000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xdb000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xdc000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xdd000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xde000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xdf000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xe0000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xe1000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xe2000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xe3000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xe4000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xe5000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xe6000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xe7000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xe8000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xe9000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xea000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xeb000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xec000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xed000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xee000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xef000/0x1000 BIOS write-through fixed-base fixed-length
set-by-firmware active
0xf0000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xf1000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xf2000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xf3000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xf4000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xf5000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xf6000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xf7000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xf8000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xf9000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xfa000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xfb000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xfc000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xfd000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xfe000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xff000/0x1000 BIOS write-protect fixed-base fixed-length
set-by-firmware active
0xd0000000/0x10000000 BIOS uncacheable set-by-firmware active
0xe0000000/0x20000000 BIOS uncacheable set-by-firmware active
0x0/0x100000000 BIOS write-back set-by-firmware active
0x100000000/0x20000000 BIOS write-back set-by-firmware active
0x120000000/0x10000000 BIOS write-back set-by-firmware active


devinfo -r  output (snipped):

  ram0
      I/O memory addresses:
          0x0-0x9ebff
          0x100000-0xcff7ffff
          0x100000000-0x12fffffff
Received on Thu Sep 04 2008 - 13:34:44 UTC

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