I'm trying to port an Alpha video driver (TGA) from -stable to
-current and have run into a problem converting some calls to
pci_cfgread() and pci_cfgwrite().

The Alpha firmware reports the location of the console video card as a
physical hose, bus type, bus, slot value.  In -stable, the card can be
accessed by calling pci_cfg{read,write}() with this information.

In -current, pci_cfg{read,write}() have been replaced by
pci_{read,write}_config(), but the latter function needs a device_t
structure that defines both the device and it's parent.
Unfortunately, I don't have the relevant device_t available.  In any
case, based on my reading of the code, I need to access the PCI config
registers before the video card has been probed/attached via the
normal bus/device scan.

Luckily, there's only one point at which I need this `physical' access.
The call backtrace is:

Does anyone have any useful suggestions?[1]  Is there an `approved'
mechanism to bypass the bus abstraction layers?  Is is practical to
hand-craft a device_t that will satisfy pci_{read,write}_config()?

[1] I don't count "throw out the TGA" as a useful suggestion.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to