On Thu, 2019-06-20 at 09:43 -0400, Kevin O'Connor wrote:
On Thu, Jun 20, 2019 at 01:07:45PM +0100, David Woodhouse wrote:
For CSM, the highest priority for a boot entry is zero. SeaBIOS doesn't use zero, and the highest priority is 1.
FYI, SeaBIOS does treat zero as the highest priority. And a negative priority means "use default priority".
I'm fine with the change, though.
I don't think find_prio ever returns zero.
dprintf(1, "Searching bootorder for: %s\n", glob); int i; for (i = 0; i < BootorderCount; i++) if (glob_prefix(glob, Bootorder[i])) return i+1; return -1;
Our downstream patch for not initialising NVMe controllers if we aren't going to boot from them, makes its decision based on the priority.
Originally it had 'if (bootprio_find_pci_device(pci) == 1)' to start only the top priority boot device; nowadays it has '> 0' to match all bootable drives.
Now, I can fix that patch fairly easily to be '>= 0' now that it no longer wants to match precisely only the first. But in general, it seems that '1' is the top priority so making the CSM values match that seems sensible.