summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg
diff options
context:
space:
mode:
Diffstat (limited to 'ArmVirtPkg')
-rw-r--r--ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c b/ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c
index 3cc83e3b7b..d3851fd75f 100644
--- a/ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c
+++ b/ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c
@@ -991,7 +991,14 @@ TryRunningQemuKernel (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "%a: LoadImage(): %r\n", __FUNCTION__, Status));
- goto FreeKernelDevicePath;
+ if (Status != EFI_SECURITY_VIOLATION) {
+ goto FreeKernelDevicePath;
+ }
+ //
+ // From the resource allocation perspective, EFI_SECURITY_VIOLATION means
+ // "success", so we must roll back the image loading.
+ //
+ goto UnloadKernelImage;
}
//