Port-macppc archive

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

Re: Hunting the ahc boot-time panic



Hello,

On Wed, 19 Oct 2011 12:42:33 -0500
David Young <dyoung%pobox.com@localhost> wrote:

> On Wed, Oct 19, 2011 at 02:35:25AM -0400, Michael wrote:
> > So, what I think happens is this:
> > - OF only configures MMIO access, leaves NULL in the IO BAR
> > - fixpci() only enables memory access since there is no OF property for IO 
> > access
> 
> I think that fixpci() or something should clear PCI_FLAGS_IO_OKAY and
> set PCI_FLAGS_MEM_OKAY in the pci_attach_args.pa_flags based on the
> OpenFirmware configuration.  Then pci_mapreg_map() will fail to map the
> I/O BAR because PCI_FLAGS_IO_OKAY won't be set.

We'd have to do that on a per device basis, fixpci() runs per bus, just before 
the bus itself attaches so it never sees any pci_attach_args - it can only set 
flags for the entire bus which doesn't make any sense here.
Maybe pci_mapreg_map should check the csr instead, or maybe we should leave 
something explicitly bogus in unconfigured IO BARs.
Or, pci_probe_device() should clear PCI_FLAGS_IO_OKAY of IO isn't enabled. It 
already reads the csr so adding that would be trivial.

have fun
Michael
-- 
Michael <macallan%netbsd.org@localhost>


Home | Main Index | Thread Index | Old Index