summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Library/LoadLinuxLib
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-16 06:49:27 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-16 06:49:27 +0000
commit38851e781dee0aea1b6dfe11350af5b34ea6d80b (patch)
tree1de4659e9642308c9f8fd6532c8dcbb7f7b7050c /OvmfPkg/Library/LoadLinuxLib
parentaab9212fa9989deb1e11906dca92c2fe31a4e91f (diff)
downloadedk2-38851e781dee0aea1b6dfe11350af5b34ea6d80b.tar.gz
edk2-38851e781dee0aea1b6dfe11350af5b34ea6d80b.tar.bz2
edk2-38851e781dee0aea1b6dfe11350af5b34ea6d80b.zip
OvmfPkg: LoadLinuxLib: Fix check for relocatable kernel
Boot protocol 2.05 just means that the relocatable_kernel field is present in the header. We should actually check that it's *set*. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14051 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/Library/LoadLinuxLib')
-rw-r--r--OvmfPkg/Library/LoadLinuxLib/Linux.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/OvmfPkg/Library/LoadLinuxLib/Linux.c b/OvmfPkg/Library/LoadLinuxLib/Linux.c
index 96c985bc2d..b06285c51a 100644
--- a/OvmfPkg/Library/LoadLinuxLib/Linux.c
+++ b/OvmfPkg/Library/LoadLinuxLib/Linux.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -60,7 +60,8 @@ LoadLinuxCheckKernelSetup (
if ((Bp->hdr.signature != 0xAA55) || // Check boot sector signature
(Bp->hdr.header != SETUP_HDR) ||
- (Bp->hdr.version < 0x205) // We only support relocatable kernels
+ (Bp->hdr.version < 0x205) || // We only support relocatable kernels
+ (!Bp->hdr.relocatable_kernel)
) {
return EFI_UNSUPPORTED;
} else {
@@ -606,7 +607,7 @@ LoadLinux (
Bp = (struct boot_params *) KernelSetup;
- if (Bp->hdr.version < 0x205) {
+ if (Bp->hdr.version < 0x205 || !Bp->hdr.relocatable_kernel) {
//
// We only support relocatable kernels
//