]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/LoadLinuxLib/Linux.c
OvmfPkg: LoadLinuxLib: Fix check for relocatable kernel
[mirror_edk2.git] / OvmfPkg / Library / LoadLinuxLib / Linux.c
index 96c985bc2d7e574c20030d886b811e8647efe4dd..b06285c51a545721f07d79fb900d76a62b90923e 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -60,7 +60,8 @@ LoadLinuxCheckKernelSetup (
 \r
   if ((Bp->hdr.signature != 0xAA55) || // Check boot sector signature\r
       (Bp->hdr.header != SETUP_HDR) ||\r
-      (Bp->hdr.version < 0x205)        // We only support relocatable kernels\r
+      (Bp->hdr.version < 0x205) || // We only support relocatable kernels\r
+      (!Bp->hdr.relocatable_kernel)\r
      ) {\r
     return EFI_UNSUPPORTED;\r
   } else {\r
@@ -606,7 +607,7 @@ LoadLinux (
 \r
   Bp = (struct boot_params *) KernelSetup;\r
 \r
-  if (Bp->hdr.version < 0x205) {\r
+  if (Bp->hdr.version < 0x205 || !Bp->hdr.relocatable_kernel) {\r
     //\r
     // We only support relocatable kernels\r
     //\r