Mapping Video BIOS?
Greg 'groggy' Lehey
grog at FreeBSD.org
Sat Jul 26 02:01:01 PDT 2003
On Saturday, 26 July 2003 at 9:41:14 +0100, Bruce M Simpson wrote:
> On Sat, Jul 26, 2003 at 05:32:17PM +0930, Greg 'groggy' Lehey wrote:
>> Can anybody point me in the right direction? Where should I be
>> looking for this? Is this memory mapped permanently, or is it only
>> during X startup?
>
> The video BIOS is usually mapped by system BIOS into real memory to
> begin with, so it should be just sitting there. There are usually northbridge
> chipset registers for dealing with this sort of thing.
>
> The SMM mode might reuse that window, though, but generally this is hidden
> from non-SMM mode applications.
>
> You're in luck - been rebuilding X, so have xc tarballs handy.
>
> The XFree86 code responsible is:
xc/programs/Xserver/hw/xfree86/int10
Yup, I've been playing around with it. I currently have my arms in
xf86ExtendedInitInt10, which does the mapping. It tries to map 256 kB
of memory, and I suppose it does, for some definition:
(II) RADEON(0): mapped system memory at 0xc0000, len 0x40000, video BIOS offset 0xc0000, to 0x28368000
But at 0xcc00, I get:
(gdb) x/20x 0x28373ff0
0x28373ff0: 0x00800304 0x0000000c 0x0b100020 0x4002003e
0x28374000: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0x28374010: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
I've looked in the same space with Microsoft, which says:
C000:BFF0 04 03 80 00 0C 00 00 00-20 00 10 0B 3E 00 02 40 ........ ...>..@
C000:C000 00 2E 05 01 06 10 40 01-90 01 02 97 01 45 01 0D ...... at ......E..
> Some drivers like to call VBE via int10h, so this module acts as a bridge.
> It just memcpy()'s the ROM and uses various methods, depending on the
> compilation target, to call int10h.
>
> Is the onboard video AGP/PCI?
Intel 82845, if that's the correct answer. I've put the dmesg up at
http://www.lemis.com/grog/Inspiron/dmesg.boot.
> It is possible that the device isn't reporting its memory window in
> the ROM BAR correctly. I've seen this happen with some low-end
> network cards before.
I could believe that, but I think we have a different problem here:
since it's mapping up to the end of low memory. My guess is that
something else shares this space, and that it has been turned off.
I'm going to carry on investigating, but if anybody else recognizes
the problem, I'd be interested to hear from you.
> Try my tools at this URL to check this:
> http://www.incunabulum.com/code/projects/pci/freebsd/
Thanks, I'll try that anyway.
Greg
--
See complete headers for address and phone numbers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-mobile/attachments/20030726/9ca5eee4/attachment.bin
More information about the freebsd-mobile
mailing list