Port-amd64 archive

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

Re: constraints on rbus_min_start?



"Steven M. Bellovin" <smb%cs.columbia.edu@localhost> writes:

>> The only way to determine the used addresses is to enumerate all the
>> devices. That is potentially dangerous since you have to rewrite the
>> BARs with a base address of 0 in order to determine the size.
>> Presumably the NetBSD PCI device grope code will have done this
>> during boot and remembered the addresses that are in use.
>
> Which should, then, be in some data structure somewhere...

NetBSD doesn't normally do this on desktop boxes; we assume that the
firmware has done it. The option to probe and allocate all the BARs
ourself (PCI_NETBSD_CONFIGURE) is more commonly used on embedded
systems with minimal or PCI-unaware firmware. 

If PCI_CONFIG_DUMP is enabled, we will read the existing values and do
the read/write/read/rewrite dance to size the BAR but restore the
firmware-programmed value; I don't think that data is saved anywhere
but the dmesg output.

        - Nathan



Home | Main Index | Thread Index | Old Index