mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
aab9212fa9
commit
38851e781d
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue