ADC Home > Reference Library > Technical Q&As > Legacy Documents > Hardware & Drivers >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
Q: I'm in the process of developing a PCI device driver. How do I get from local addresses on the card to addresses that the Mac understands belong to my card. My card has 2 memory areas I need to deal with. Do I add the local starting address to the assigned address that's assigned during start up?
A: Your PCI card's memory space(s) has assigned-address property(ies) in the Name Registry.
The configuration your card requests - in this case, two memory spaces - is defined by the card's configuration space. At boot time, the Mac's Open Firmware (also called boot firmware) scans all PCI devices and constructs a Device Tree containing information about configured PCI devices. (Your card's memory space will be reassigned into available PCI address space at this time.) The Device Tree is the structure from which the Mac OS extracts the original information to create the device portion of the Name Registry. You'll need to obtain the assigned addresses for your card's memory spaces from the Name Registry.
Refer to the latest PCI DDK (Driver Developer Kit), and Designing PCI Cards
and Drivers for Power Macintosh Computers.Also, for code examples on how
to access and iterate the Name Registry, refer to the