2001-02-24 20:28:24 +00:00
|
|
|
Setting up MTRR for X11 or mga_vid:
|
|
|
|
===================================
|
|
|
|
|
|
|
|
1. find the base address
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
2001-03-12 14:56:55 +00:00
|
|
|
You have 3 ways to find it:
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
- from X11 startup messages, for example:
|
|
|
|
(--) SVGA: PCI: Matrox MGA G400 AGP rev 4, Memory @ 0xd8000000, 0xd4000000
|
|
|
|
(--) SVGA: Linear framebuffer at 0xD8000000
|
|
|
|
|
|
|
|
- from /proc/pci (use lspci -v command):
|
|
|
|
01:00.0 VGA compatible controller: Matrox Graphics, Inc.: Unknown device 0525
|
|
|
|
Memory at d8000000 (32-bit, prefetchable)
|
|
|
|
|
|
|
|
- from mga_vid kernel driver messages (use dmesg):
|
|
|
|
mga_mem_base = d8000000
|
|
|
|
|
|
|
|
2. find memory size
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
2001-03-12 14:56:55 +00:00
|
|
|
This is very easy, just convert video ram size to hexadecimal, or
|
2001-02-24 20:28:24 +00:00
|
|
|
use this table:
|
|
|
|
1 MB 0x100000
|
|
|
|
2 MB 0x200000
|
|
|
|
4 MB 0x400000
|
|
|
|
8 MB 0x800000
|
|
|
|
16 MB 0x1000000
|
|
|
|
32 MB 0x2000000
|
|
|
|
|
|
|
|
3. setting up mtrr
|
|
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
You know base address and memory size, let's setup mtrr registers!
|
|
|
|
|
|
|
|
For example, for the matrox card above (base=0xd8000000) with 32MB
|
|
|
|
ram (size=0x2000000) just execute:
|
|
|
|
echo "base=0xd8000000 size=0x2000000 type=write-combining" >| /proc/mtrr
|
|
|
|
|
2001-03-12 14:56:55 +00:00
|
|
|
- Older K6-2's [around 266Mhz, stepping 0] doesn't support MTRR.
|
|
|
|
- K6-2 with 'stepping 12' (do a cat /proc/cpuinfo) supports MTRR.
|