RE: Pegasos interrupt mapping and dmamem_alloc
Tim Rightnour <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.ofppc |
|---|---|
| Message-ID | <[email protected]> |
On 03-Nov-2007 Frank Wille wrote: > At least the last method for "super-annoying OFW" is affected, which reads > the interrupt lines directly from the PCI bus. Reading the "interrupt" > property returns a pin number from 1 to 4, but this is erroneously added to > 'A' (generating pins from 'B' to 'E'!). The following diff fixes that: Oops! > panic: call to null-ptr from 0x2e03e8 > ---8<--- > > But then a new crash! The _dma_phys_to_bus_mem() function in the > pci_bus_dma_tag structure was not initialized! I don't know why you are > making a difference between pci_bus_dma_tag for macppc and for the rest? > Usng the macppc-version instead, which initializes the two missing function > pointers, fixes the problem: Because the macppc one isn't correct. They are using thier own internal versions of the routines, as opposed to the generic powerpc ones. I keep forgetting to ask Macallan if they still need this hack or not. I suspect they do not. Initializing those is something that needs to be done on a per-port basis in include/bus.h. If you take a look at powerpc/include/prep_bus.h you can see that we define macros for PHYS_TO_BUS_MEM and BUS_MEM_TO_PHYS. It looks like macppc uses the generic ones, so we can probably just set the PHYS_TO_BUS_MEM and BUS_MEM_TO_PHYS macros in ofppc/include/bus.h to those two functions, and things will be good to go. > But also a new problem: now attaching ofb0 freezes the system... *sigh* It's probably not worth fiddling with ofb. I was talking to Macallan, and he said macppc will be dumping that driver in favor of genfb. --- Tim Rightnour <[email protected]> NetBSD: Free multi-architecture OS http://www.netbsd.org/ Genecys: Open Source 3D MMORPG: http://www.genecys.org/