tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Accessing ROMs from libpciaccess



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I just committed a fix for libpciaccess's ROM access method. It used to just open /dev/mem, mmap(ROM_BASE) and crossfingers hoping physical addresses are the same as bus addresses on the machine it's running. Obviously this assumption is false on many non-x86 machines ( sparc64 for example ) but the fix is simple - use the same mechanism as pci_device_netbsd_map_range(). This should work as before on x86, additionally it should work on all other ports as well - here's an example from sparc64:
(II) RADEON(1): Attempting to read un-POSTed bios
(WW) RADEON(1): Not an x86 BIOS ROM image, BIOS data will not be used
no kidding, it's an xvr-100 with Sun firmware.
I have a mach64 card with PC firmware in the same box but the driver is unable to cold start it and int10 isn't built by default - I'll look at that next. On macppc int10 crashed with a SIGBUS trying to muck with an R128's ROM, in LockVGA() - let's see how much work it takes to get the x86 emulator running. That said, please test it, on x86 nothing should change ( unless you have a machine with several independent PCI buses - these should work now ) On non-x86 you should see at least some acknowledgement that the ROM isn't what the driver expected, if it's not a PC BIOS.

have fun
Michael

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQEVAwUBTOTX/MpnzkX8Yg2nAQIATggAl+M2K/aYAllS16mV665RQQJQuPGw/xx9
A7RI7ageW3W17BmhaoYj/5HJ4Ec3vxFPV04/MfnVsFjpYtyzNA75jWfxr63oPV1o
HxILMh1lrfugNbdyrOXC9DTGPbnLZBnkvySdKXwbZv6U3tLfDJFIOobJFUZb58vJ
+SFkvncw63pn352t6fYX4x6zAKivsZg9O7lgNsjP4FARofQGjANH9ttWFDisgbwj
/2H4ESo3bABJI8gVuwl2GtDFMR7NcjK7bNTP9CVsZIcz2CtjgfeRbLk9BCc/xlv6
Kd8q7wSpAFf8CwAQbGEK6JwS75vFsq50jrpRzjliOxqDIJZTCdnHyQ==
=iXEI
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index