On 8/31/07, Fredrik Tolf <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-08-30 at 08:40 -0400, Timothy Normand Miller wrote:
> > Time to disassemble someone's BIOS code and find out?  :)
>
> Just for the sake of trying, I attempted to extract the BIOS of one of
> my nVidia cards, but I failed. `lspci -v' says the following:
>
> > [virtual] Expansion ROM at d7ee0000 [disabled] [size=128K]
>
> I suspect that the `[disabled]' string is key to the failure, and with
> my new-found knowledge of PCI along with `lpsci -x', I can tell that the
> ROM decode is disabled, but then the question arrives how to tell the
> kernel how to enable it.

'setpci' is a common linux tool that will do it. You need to set bit 0
of offset 30h in config space for that card. Then you can read from
the memory location reported by lspci. You could also just read the
shadowed version in the c000 segment. See:
  http://linuxbios.org/VGA_support
for some suggestions.

> As an aside, isn't it weird that the kernel keeps the address allocated
> if the decode isn't enabled? If the address space is allocated, why
> *not* decode it?

It may not really be the kernel that did that, but probably the BIOS.
The PC BIOS will enable that expansion ROM, shadow it, disable it,
then execute it. Note that this is "allocated" out of PCI memory
space, so it doesn't really help to reclaim it.
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to