Re: [PATCH] PCI: read memory ranges out of Broadcom CNB20LE host bridge

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

 



On Thursday 01 April 2010 12:00:06 pm Ira W. Snyder wrote:
> On Wed, Mar 31, 2010 at 05:18:21PM -0600, Bjorn Helgaas wrote:

> > > [    0.340009] pci 0000:00:00.0: host bridge window [io  0x01f0-0x01f7]
> > > [    0.344008] pci 0000:00:00.0: host bridge window [io  0x03f6]
> > > [    0.348008] pci 0000:00:00.0: host bridge window [io  0x0170-0x0177]
> > > [    0.352008] pci 0000:00:00.0: host bridge window [io  0x0376]
> > 
> > Seems surprising that these are the only ports in the 0x0-0xcfff range
> > that are routed anywhere.  I would naively expect them to be at least
> > subtractively decoded by one of the bridges, so all the legacy builtin
> > hardware (APICs, serial ports, etc) would still work, but the unused
> > stuff would be available for PCI.
> 
> I believe that the legacy IDE ports have a fixed address. See the
> drivers/ide/ide-legacy.c ide_legacy_init_one() function. The driver uses
> hardcoded fixed addresses.

Yep, there's no question that these IDE ranges are forwarded by the
bridge.  I think it's likely that the bridge forwards *more* than that,
but you'd have to find that in a spec or do a lot of experimenting,
e.g., by plugging in a card that uses I/O ports, forcibly writing the
BARs to different addresses, and seeing whether the card works.

> However, if I do not include the reservation of the legacy IDE IO ports,
> I get messages like this during kernel boot, and the IDE controller is
> disabled:
> 
> [    0.500137] pci 0000:00:0f.1: no compatible bridge window for [io  0x01f0-0x01f7]
> [    0.504009] pci 0000:00:0f.1: no compatible bridge window for [io  0x03f6]
> [    0.508009] pci 0000:00:0f.1: no compatible bridge window for [io  0x0170-0x0177]
> [    0.512008] pci 0000:00:0f.1: no compatible bridge window for [io  0x0376]
> [    0.516009] pci 0000:00:0f.1: no compatible bridge window for [io  0xffa0-0xffaf]

Right.  I wasn't suggesting removing those bridge windows, only that
there's a lot of unused space in the 0x0-0xcfff range, even after
reserving the legacy ports, and it's possible that one of the host
bridges would forward that unused space to the PCI bus.

I don't know much about PCMCIA, but I *think* there might be PCMCIA
devices that are not fully configurable, e.g., a device might only
have a few options for where its registers can be mapped.  If all of
those options were in the 0x0-0xcfff range, there'd be no way to make
that device work in this system with your current patch.  But this
is just idle speculation on my part; no action needed on your part :-)

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux