[U-Boot] [PATCH] pci: don't skip vendor ID 0

Leon Woestenberg leon at sidebranch.com
Thu Jan 26 13:26:09 CET 2017


Hello all,

my two cents on this one:

On Thu, Jan 26, 2017 at 11:08 AM, Bin Meng <bmeng.cn at gmail.com> wrote:

> >> On Wed, Jan 25, 2017 at 1:25 PM, Gregory Fong
> >> <Gregory.Fong at virgingalactic.com> wrote:
> >> > I've been looking through the book I have on PCI and through various
> online
> >> > resources, and haven't been able to find evidence that a vendor ID of
> 0 is
> >> > invalid, even if it's unusual.
>
> Is it possible that it's zero due to the hardware is buggy? For
> example, on some Intel cards, PCI vendor ID and device ID can be
> loaded from an EEPROM and if EEPROM content is wrong, it may expose
> wrong IDs. Anyway zero does not look like a valid one though.
>
> Regards,
> Bin
>

>From the spec. point of view, 0x0000 seems as valid as any in the range
[0x0001-0xFFFE].
>From the registry point of view, only registered numbers are valid.

I.e. if I create a programmable PCI(e) card, I can pick any number in the
range [0x0000-0xFFFE] during development and it should work. I will try not
to clash with already registered numbers (to prevent the wrong drivers
probing the endpoint), and preferably I would try to re-use the (FPGA)
silicon vendor's ID, although I am well aware that it should change going
into production.

If only 0xFFFF is reserved, then [0-0xFFFE] should be accepted in the code,
right?
If we disallow 0x0000, on what arguments do we do that?

Middle solution is to accept the ID with a warning.

Regards,

Leon.


More information about the U-Boot mailing list