1
|
1 Setting up MTRR for X11 or mga_vid:
|
|
2 ===================================
|
|
3
|
|
4 1. find the base address
|
|
5 ~~~~~~~~~~~~~~~~~~~~~~~~
|
96
|
6 You have 3 ways to find it:
|
1
|
7
|
|
8 - from X11 startup messages, for example:
|
|
9 (--) SVGA: PCI: Matrox MGA G400 AGP rev 4, Memory @ 0xd8000000, 0xd4000000
|
|
10 (--) SVGA: Linear framebuffer at 0xD8000000
|
|
11
|
|
12 - from /proc/pci (use lspci -v command):
|
|
13 01:00.0 VGA compatible controller: Matrox Graphics, Inc.: Unknown device 0525
|
|
14 Memory at d8000000 (32-bit, prefetchable)
|
|
15
|
|
16 - from mga_vid kernel driver messages (use dmesg):
|
|
17 mga_mem_base = d8000000
|
|
18
|
|
19 2. find memory size
|
|
20 ~~~~~~~~~~~~~~~~~~~
|
96
|
21 This is very easy, just convert video ram size to hexadecimal, or
|
1
|
22 use this table:
|
|
23 1 MB 0x100000
|
|
24 2 MB 0x200000
|
|
25 4 MB 0x400000
|
|
26 8 MB 0x800000
|
|
27 16 MB 0x1000000
|
|
28 32 MB 0x2000000
|
|
29
|
|
30 3. setting up mtrr
|
|
31 ~~~~~~~~~~~~~~~~~~
|
|
32 You know base address and memory size, let's setup mtrr registers!
|
|
33
|
|
34 For example, for the matrox card above (base=0xd8000000) with 32MB
|
|
35 ram (size=0x2000000) just execute:
|
|
36 echo "base=0xd8000000 size=0x2000000 type=write-combining" >| /proc/mtrr
|
|
37
|
96
|
38 - Older K6-2's [around 266Mhz, stepping 0] doesn't support MTRR.
|
|
39 - K6-2 with 'stepping 12' (do a cat /proc/cpuinfo) supports MTRR.
|