Subject: Radeon framebuffer + how to access physical memory from within the
To: Michael Lorenz <macallan@netbsd.org>
From: Vincent <10.50@free.fr>
List: tech-kern
Date: 12/26/2006 11:28:02
Michael,

there is something in 0xc0000, as a dump from /dev/mem shows:

000c0000: 55 aa 80 e9 0f 06 00 00 00 00 00 00 00 00 00 00
000c0010: 00 00 00 00 00 00 00 00 8c 01 00 00 00 00 49 42
000c0020: 4d 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000c0030: 20 37 36 31 32 39 35 35 32 30 00 00 00 00 00 00
000c0040: 3f 3f 00 00 00 00 00 00 2c 01 00 00 00 00 00 00
000c0050: 32 30 30 32 2f 31 30 2f 32 33 20 31 35 3a 35 36
000c0060: 00 00 00 00 e9 b2 14 00 e9 24 20 00 00 00 00 00
000c0070: 45 df 5b 00 11 0e 4a 00 00 00 00 00 00 00 00 00
000c0080: 0d 0a 4d 37 2d 50 20 43 6f 6d 70 61 71 20 4d 61
000c0090: 67 65 6c 6c 61 6e 20 42 49 4f 53 20 28 20 31 38
000c00a0: 33 2f 32 36 30 4d 48 7a 20 29 2c 20 52 65 71 5b
000c00b0: 31 30 34 30 5d 0d 0a 00 28 43 29 20 31 39 38 38
000c00c0: 2d 32 30 30 31 2c 20 41 54 49 20 54 65 63 68 6e
000c00d0: 6f 6c 6f 67 69 65 73 20 49 6e 63 2e 20 42 4b 36
000c00e0: 2e 30 2e 30 20 56 52 30 30 36 2e 30 30 37 2e 30
000c00f0: 30 36 2e 30 30 37 2e 30 30 32 2e 30 30 31 2e 30

Since it begins by 0x55AA, I assume this is the Video BIOS we are 
looking for. The question now is: how to access that particular slice of 
memory from within the driver, reproducing what /dev/mem does? In other 
words, how to access physical (non-virtual) memory from within the kernel?

If this is solved, we could proceed like the normal driver by copying 
this ROM segment into a malloc'ed part of the RAM.

Vincent