Committed in r15197. Thanks! -Jordan
On Tue, Jan 28, 2014 at 10:01 AM, Laszlo Ersek <[email protected]> wrote: > When this option is passed to qemu, it appends the word HALT to the > "bootorder" fw_cfg file, as last entry. For example, > > /pci@i0cf8/ethernet@3/ethernet-phy@0 > /pci@i0cf8/scsi@4/disk@0,0 > HALT > > The option's purpose is to prevent SeaBIOS from booting from devices that > have not been specified explicitly (with bootindex=N device properties nor > -boot options). When SeaBIOS sees HALT, it doesn't proceed to boot from > default locations (after boot fails from all of the listed locations). > > The HALT string currently causes OVMF to reject the entire "bootorder" > fw_cfg contents, with "parse error". This is not good, because since a > recent libvirt commit, libvirt unconditionally passes "-boot strict=on" to > qemu. Consequently, the boot order logic in QemuBootOrder.c has stopped > working for libvirt users. > > OVMF's SetBootOrderFromQemu() function actually implements the idea behind > "-boot strict=on": it drops all boot options not in the fw_cfg list. (*) > Therefore, let's recognize HALT, and just do what we've been doing all > along. > > (*) Except the UEFI shell, according to the survival policy in > BootOrderComplete(), but the memory mapped UEFI shell is not expressible > via fw_cfg anyway, and its preservation has been requested on edk2-devel. > Hence it's a good boot option to keep in any case. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek <[email protected]> > --- > OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c > b/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c > index daab658..055cee3 100644 > --- a/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c > +++ b/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c > @@ -842,42 +842,50 @@ TranslateOfwNodes ( > successfully, but its translation did not > fit into the number of bytes provided. > Further calls to this function are > possible. > > @retval RETURN_UNSUPPORTED The OpenFirmware device path was parsed > successfully, but it can't be translated > in > the current implementation. Further calls > to this function are possible. > > - @retval RETURN_NOT_FOUND Translation terminated, *Ptr was (and is) > - pointing to an empty string. > + @retval RETURN_NOT_FOUND Translation terminated. On input, *Ptr > was > + pointing to the empty string or "HALT". > On > + output, *Ptr points to the empty string > + (ie. "HALT" is consumed transparently > when > + present). > > @retval RETURN_INVALID_PARAMETER Parse error. This is a permanent error. > > **/ > STATIC > RETURN_STATUS > TranslateOfwPath ( > IN OUT CONST CHAR8 **Ptr, > OUT CHAR16 *Translated, > IN OUT UINTN *TranslatedSize > ) > { > UINTN NumNodes; > RETURN_STATUS Status; > OFW_NODE Node[EXAMINED_OFW_NODES]; > BOOLEAN IsFinal; > OFW_NODE Skip; > > NumNodes = 0; > - Status = ParseOfwNode (Ptr, &Node[NumNodes], &IsFinal); > + if (AsciiStrCmp (*Ptr, "HALT") == 0) { > + *Ptr += 4; > + Status = RETURN_NOT_FOUND; > + } else { > + Status = ParseOfwNode (Ptr, &Node[NumNodes], &IsFinal); > + } > > if (Status == RETURN_NOT_FOUND) { > DEBUG ((DEBUG_VERBOSE, "%a: no more nodes\n", __FUNCTION__)); > return RETURN_NOT_FOUND; > } > > while (Status == RETURN_SUCCESS && !IsFinal) { > ++NumNodes; > Status = ParseOfwNode ( > Ptr, > -- > 1.8.3.1 > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
