-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OvmfPkg: Introduce UEFI config support for fw_cfg v2 #10668
base: master
Are you sure you want to change the base?
Conversation
1ffe864
to
4f21032
Compare
It is not clear at all from the patches why any of this is needed. And commits with no text at all are really not done. So please add some text to every commit why it is needed. And don't worry about duplication, each commit should make sense by itself, so if there is some underlying goal that gets documented numerous times, that is perfectly fine. |
Add BootManagerMenuApp to all OvmfPkg dependencies. To make UiApp optional, switch from UiApp to BootManagerMenuApp as default BootManagerMenu. Signed-off-by: Gerd Hoffmann <[email protected]> Signed-off-by: Luigi Leonardi <[email protected]>
This is part of the effort to enable/disable firmware configuration (UiApp) from the QEMU CLI. Because the UiApp can be disabled at runtime and it's currently the default BootManagerMenu, change the default from UiApp to BootManagerMenuApp. Signed-off-by: Gerd Hoffmann <[email protected]> Signed-off-by: Luigi Leonardi <[email protected]>
Setting the LOAD_OPTION_CATEGORY_APP flag for EFI Shell prevents the boot loader from using it as a fallback if all other entries fail to boot. With a boot manager menu available, it can be annoying to enter the EFI Shell directly, because from the menu, the user can try to boot again (e.g. temporary network problem) or enter the shell/firmware config only if necessary. Signed-off-by: Gerd Hoffmann <[email protected]> Signed-off-by: Luigi Leonardi <[email protected]>
…tion Introduce gUiAppFileGuid: it has the same value of UiApp guid defined in the .inf file. This is used to register UiApp as a boot entry in the BootManagerMenu. This registration is done in PlatformBootManagerBeforeConsole because it must be done before the hotkeys are registered. This is because in a system with hotkeys still bound to UiApp, but with firmware disabled, you can still boot into the latter by hitting ESC or F2 during boot. UiApp can be enabled/disabled using fw_cfg option FirmwareSetupSupport Signed-off-by: Gerd Hoffmann <[email protected]> Signed-off-by: Luigi Leonardi <[email protected]>
gUiAppFileGuid, which is used to register EFI Firmware Config as a boot option, has the same value as UiApp guid. This would trigger a duplicate guid error from the CI pipeline, but because these two guids are necessary, this commit adds a duplicate exception. Signed-off-by: Luigi Leonardi <[email protected]>
OvmfFindLoadOption behaves like EfiBootManagerFindLoadOption, it searches for an entry in the array: an entry is found if the two paths are equal. This removes possible duplicates in the boot entries: two entries with the same path and different attributes are not detected as equal by EfiBootManagerFindLoadOption. In this case, the old entry is deleted and replaced by the new one. Signed-off-by: Luigi Leonardi <[email protected]>
…etup Document FirwareSetup fw_cfg option for QEMU CLI: it allows to enable/disable UiApp at runtime. Signed-off-by: Luigi Leonardi <[email protected]>
4f21032
to
be3a06b
Compare
@ardbiesheuvel Commits messages are now more verbose, please let me know if you want me to change anything! I rebased on lastest master, code is unchanged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not completely familiar with this path/function of the code, but all looks very reasonable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR is linked to #6494. This is to disable the UEFI config using fw_cfg from QEMU cli.
The approach is to change the default BootManagerMenu from UiApp to BootManagerMenuApp.
UiApp, if enabled, is added as a boot entry.
How This Was Tested
Run QEMU on X86-64 with and without the fw_cfg flag set.
For reference qemu -fw_cfg name=opt/org.tianocore/FirmwareSetupSupport=no
Integration Instructions
N/A