accessing ROM on Rage 128 chips in aty128fb
Quoted 2 lines · Martin Murray
Why does the linux PCI code not set up a mapping for the ROM automatically?
It expects the BIOS to do it. You can force it to try with the option "pci=rom"
Assuming this is the active grahpics card, then you should be able to access the rom via the legacy VGA address range 0xc0000...0xc7fff which should be shown in /proc/iomem.
Try:
dd if=/dev/mem skip=768 bs=1k | od -x | more
In these days of integrated peripherals the graphics bios might not even be attached to the VGA controller. The VGA device in my i810 system doesn't even report an expansion rom.
Quoted 2 lines
and found that the X driver maps the ROM through configuration space.
I'm fairly sure the XFree code falls back to the VGA region as well if it can't find anything else. I think this is true on my machine, the X log says:
... Primary V_BIOS Segment is 0xc000
Jon
Jon, Thank you for your reply.
Quoted 5 lines
Quoted 2 lines
Why does the linux PCI code not set up a mapping for the ROM automatically?
It expects the BIOS to do it. You can force it to try with the option "pci=rom"
This worked and I was able to access the BIOS. Is there a method to ask the pci code to do this from a driver, if pci=rom was not used?
Quoted 3 lines
Assuming this is the active grahpics card, then you should be able to access the rom via the legacy VGA address range 0xc0000...0xc7fff which should be shown in
/proc/iomem.
This worked, I realized that I was chasing the wrong bug - the code to find the BIOS was looking for a "R128" signature, where my mobile Rage 128 has an "M3" signature. I patched the driver to search for "M3" as well as "Rage 128" and it properly found the BIOS and loaded the pll information. (The mobile version of the Rage 128 is called the Rage M3 Mobility, but it is still a Rage 128.) Who do I submit this change to?
Unfortunately, the display is still garbage even after loading the correct information from the BIOS. I have not been able to contact the aty128fb author, does anyone have any suggestions? My next step is to compare how the aty128fb driver initializes the display to the way the X4.3.0 server does, however, this seems very tedious.
Thank you, Martin Murray
Quoted 1 line · Martin Murray
the pci code to do this from a driver, if pci=rom was not used?
- see below
Quoted 3 lines
This worked, I realized that I was chasing the wrong bug - the code to find the BIOS was looking for a "R128" signature, where my mobile Rage 128 has an "M3" signature. I patched the driver to search for "M3" as well as
Take a look at the latest code in linux-2.5.66/drivers/video/aty/aty128fb.c
It no longer looks specifically for "R128". Also see the function aty128_map_ROM() for an example of how the ROM resource assigned automatically in the latest code.
You could add this to the 2.4 code or try 2.5. I imagine the new driver code will eventually get backported to 2.4 once it is considered stable.
Jon