In message: <20030714173017.F18544_at_root.org> Nate Lawson <nate_at_root.org> writes: : I'm working on ECDT support for ACPI and ran into a couple newbus-related : questions. : : 1. I'm using the identify entry as a way to get called early on in the : boot process. However, this does not happen before $PIR evaluation. How : should I hook in a routine for pre-$PIR execution? You cannot with newbus. discovery of $PIR happens as part of the BIOS scans, of which pci bios is one. why do you need to do this? It seems like a very odd question. : 2. I need to call bus_alloc_resource() to get access to some io ports. : However, calling BUS_READ_IVAR in the identify routine gets a bad pointer : deref. So how do I get a handle to use for allocating the IO ports : (first arg of bus_alloc_resource)? You need a device and a parent device. If you do not have one, then you must get one. : 3. It appears bus_alloc_resource() takes a range of values. If I know the : exact value to use, I request it via "value, value" instead of "0, ~0". : Is this correct? Yes. However, typically the parent bus identifies these resources, and the child device swallows it. The child device typically has no say in the matter. However, the foo_identify routines can set what it thinks are the right addresses. : The framework for this code is in ec_identify() and ec_attach() in : sys/dev/acpica/acpi_ec.c. This really isn't a identify routine. You must hook into other things if you want to get access early. Let's take a step back. What are you trying to do? WarnerReceived on Mon Jul 14 2003 - 17:34:35 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:15 UTC