Subject: Re: PCI Physical Address allocation (i386)
To: None <email@example.com>
From: Hayakawa Koichi <firstname.lastname@example.org>
Date: 01/19/2000 17:22:06
From: Michael Richardson <email@example.com>
Subject: PCI Physical Address allocation (i386)
Date: Tue, 18 Jan 2000 21:26:53 -0500
> I want allocate a bunch of physical addresses on a PCI bus.
> The question is, how can I, as a NetBSD driver writer, find out what this
> physical address map looks like? Or better yet, just have the PCI BIOS
> allocate me a chunk of address space.
I think there are no perfect solutions.
According to CardBus-PCI bridge, the attach routine for the
bridge uses config_defer() in order to obtain physical
memory space after all PCI devices are attached. This
method prevents the illigal use of bus space kept for other
PCI devices, but it has no effect for the deives on the
other buses. Please refer to the function pccbbattach()
defined at sys/dev/pci/pccbb.c.
> I suspect that this can't be an isolated problem, since cardbus and
> hot-swap PCI will need this. I was reading through the pccbb.c and cardbus/*,
> and from I can see, if a card inserted has an invalid BAR, ifndef rbus, then
> we use addresses 0x8300. Otherwise, we go through (*cf->cardbus_space_alloc),
> which is probably pccbb_rbus_cb_space_alloc, but I don't know where
> rbus_space_alloc is, or whether or not rbus is defined. From looking at
> related code, pccbb_pcmcia_mem_alloc, it just calls bus_space_alloc.
Rbus is used for all ports, because some ports (i.e. macppc)
do not manage their bus space.
Is this what you need?