Subject: Re: pci probe
To: None <imp@bsdimp.com>
From: None <cgd@broadcom.com>
List: tech-kern
Date: 08/15/2003 16:10:08
At Fri, 15 Aug 2003 23:01:21 +0000 (UTC), "M. Warner Losh" wrote:
> : If you read that back as vendor ID, no, you *cannot* have a function 1.
>
> Where does the standard state that, exactly?
That literally, it doesn't.
> I'll grant that the sun
> hme device is an extreme edge case, but it appears to comply with the
> standard, at least 'a reading of the standard might imply that it
> complies.'
Don't think so, because it returns an invalid ID.
> Vendor ID This field identifies the manufacturer of the device. Valid
> vendor identifiers are allocated by the PCI SIG to ensure
> uniqueness. 0FFFFh is an invalid value for Vendor ID.
Invalid != Sun.
> The standard doesn't say the device can't have a vendor-id
> of 0xffff, just that that vendor id will not be assigned and can be
> considered to be invalid. But what "invalid" means is only by
> implication, not explicitly stated. Does it mean 'the whole device is
> not there?' or 'this function is not there?'
>
> Here's the quoted areas:
>
> 6.2.1 says:
> Vendor ID: ... Valid vendor identifiers are allocated by the PCI SIG
> to ensure uniqueness. 0FFFFh is an invalid value for the Vendor
> ID.[1]
Except, you skip the "This field identifies the manufacturer of the
device" bit.
Invalid != Sun.
> section 6.1 says:
> System software may need to scan the bus to determine what devices are
> actually present. To do this, the configuration software must read
> the Vendor ID in each possible PCI "slot." The host bus to PCI must
> unambiguously report attempts to read the Vendor ID of non-existant
> devices. Since 0FFFFh is an invalid Vendor ID, it is adequate for the
> host bus to PCI bridge to return a value of all 1's on read access to
> Configuration Space of non-existant devices.[2]
>
> [1] there's no implication as to what invalid means for the bigger
> picture in this section.
>
> [2] notice that this says 'invalid devices will return 0xffff' and not
> the contrapositive that 'no device may return 0xffff' except by
> implication.
No, I think logic gets you that from "No vendor == Invalid". 8-)
cgd