On Fri, Sep 06, 2013 at 11:40:43PM +0200, Laszlo Ersek wrote: > When QemuBootOrder finds at least one match between the "bootorder" > fw_cfg file (after translation) and the enumerated, active UEFI boot > options, QemuBootOrder rewrites the BootOrder variable so that it > reflects the order requested via fw_cfg. > > Until now, each boot option that remained unmatched by all fw_cfg > entries used to get a visit from the guy with the big scythe. > > Unfortunately, there are some boot options that cannot be expressed via > fw_cfg at all, such as the memory-mapped EFI shell. Consequently, > whenever the intersection between fw_cfg's "bootorder" and the UEFI boot > option enumeration was nonempty, QemuBootOrder invariably deleted the > EFI shell's option. > > These patches introduce an "infrastructure" and a first-approach > "policy" to salvage boot options that would fall off the wagon under the > above circumstances: > > - Mark all options that have been matched by some fw_cfg bootorder > entry. > - After the outer matching/picking loop is complete, iterate over the > enumerated boot options. > - For each unmarked option: if it starts with HD() or PciRoot(), skip it > (the user could have added it to fw_cfg if he/she had wanted it). If > it starts with something else (no way for the user to specify), append > it to the end. This should also keep relative ordering between such > "unspecifiable" entries. > > As a result, the EFI shell's option survives, at the trailing edge of > the boot order. If necessary, the policy can be refined going forward. > > > Note: this series is independent of my > > [PATCH] OvmfPkg: QemuBootOrder: expand relative device paths in UEFI > boot options > > (which has been Tested-by: Michael Chang <[email protected]>). Said patch > and this series can be applied in isolation, or in combination, in any > order. I tested the tree with both applied in chronological / posting > order. > > Thanks, > Laszlo > > Laszlo Ersek (3): > OvmfPkg: QemuBootOrder: collect active UEFI boot options in advance > OvmfPkg: QemuBootOrder: mark UEFI boot options selected by fw_cfg > OvmfPkg: QemuBootOrder: keep some boot options that have not been > selected
I've tested this patch set and it works as expected, therefore I'd like to ack it with. Tested-by: Michael Chang <[email protected]> Thanks, Michael > > OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c | 239 > +++++++++++++++++++++--- > 1 files changed, 215 insertions(+), 24 deletions(-) > ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
