[Fw_Os_Forum] USB Media Path in the Boot Option's device path - inconsistency with USB port parent numbering

Greg KH gregkh at linuxfoundation.org
Mon Feb 6 04:47:49 EST 2017


On Sun, Feb 05, 2017 at 03:53:08PM -0500, Karen Gabrielyan wrote:
> I'm pretty certain of behavior, as I've forced computers to boot into my
> USB-based OS through USB multiple ports on multiple USB host controllers.
> We tried the behavior on PC-s that have varying number of USB controllers,
> different number of USB hubs between USB device and the controller.
> And even with cases where there were multiple USB hubs involved in the full
> device path, the port numbers of entire USB hub chain had to be wither 0-based
> or 1-based.
> 
> PciRoot(0)/PCI(x,y/USB(1,0)/USB(3,0)/USB(2,0) - in this example all USB
> components had to have 1-based ports for boot option to load my OS.
> PciRoot(0)/PCI(x,y/USB(0,0)/(1,0) - and here all USB components had to have
> 0-based ports for my OS to load properly.

As you are finding out, USB port and device numbers are not consistant,
nor ever will be, sorry, that's not how USB works at all.

> I need to find a reliable way to boot into the operating system from USB device
> which I know resides on specific USB controller/port/hub.

You can't do this by trying to specify the USB port and device numbers,
sorry.

> And our product requires this to work consistently on different models of
> UEFI-based computers.

That's a tall order, if not impossible given the different UEFI
implementations and hardware configurations.

> But this 0-based vs 1-based USB Parent Port numbering throws off the logic of
> our software. 
> 
> Can anyone help out with what's at play here with USB port numbers?
> Is the port numbering supposed to be strict, or any UEFI vendor is free to
> choose their how to interpret it?

They can change at any time, even be different between boots, sorry.

I don't know if UEFI has any way to scan the partition name and use
that, but if so, that's the only way you are going to be able to do this
in a reliable way, as that is what is done in other operating systems in
order to achive this type of thing.

Good luck!

greg k-h


More information about the Fw_os_forum mailing list