edk2/OvmfPkg/Library/PlatformBmPrintScLib
Laszlo Ersek 0d472346df OvmfPkg/PlatformBmPrintScLib: hint at Secure Boot verification
The UEFI spec 2.11 documents EFI_SECURITY_VIOLATION for both
gBS->LoadImage() and gBS->StartImage() as

> [Image was loaded and an ImageHandle was created with a valid
> EFI_LOADED_IMAGE_PROTOCOL. However,] the current platform policy
> specifies that the image should not be started.

Additionally, the spec documents EFI_ACCESS_DENIED for gBS->LoadImage() as

> Image was not loaded because the platform policy prohibits the image
> from being loaded. NULL is returned in ImageHandle.

When image loading/starting fails under the above conditions (according to
the status code being reported), print a hint about Secure Boot. This
should help users diagnose and fix their Secure Boot configuration.

Updates: 77874ceebb
Fixes: https://github.com/tianocore/edk2/issues/10901
Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
2025-06-10 17:54:56 +00:00
..
PlatformBmPrintScLib.inf OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
StatusCodeHandler.c OvmfPkg/PlatformBmPrintScLib: hint at Secure Boot verification 2025-06-10 17:54:56 +00:00