summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-09-24 18:33:56 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2013-09-24 18:33:56 +0000
commitb1362258ef660d72471abf3dd6dab3835a01b0f7 (patch)
treed79a9b95bed95930d939ec121ec6ec46b8fdf9e5
parent4b734e61f842d3139516a985d71d53dde448347b (diff)
downloadedk2-b1362258ef660d72471abf3dd6dab3835a01b0f7.tar.gz
edk2-b1362258ef660d72471abf3dd6dab3835a01b0f7.tar.bz2
edk2-b1362258ef660d72471abf3dd6dab3835a01b0f7.zip
OvmfPkg: EFI handover flags are in Bp->hdr.xloadflags
LoadLinux() is looking at the wrong field for the kernel's EFI handover protocol flags. It's not currently possible for JumpToUefiKernel() to ever be called (even accidentally) because BIT2 and BIT3 of Bp->hdr.load_flags are never set in modern kernels, which means that control is always transferred to the kernel via the legacy entry point. Look at the correct field so that the EFI handover protocol is used whenever it's available. Contributed-under: TianoCore Contribution Agreement 1.0 Cc: David Woodhouse <David.Woodhouse@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Borislav Petkov <bp@suse.de> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14721 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--OvmfPkg/Library/LoadLinuxLib/Linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/OvmfPkg/Library/LoadLinuxLib/Linux.c b/OvmfPkg/Library/LoadLinuxLib/Linux.c
index 4a3e2c13cb..37b14f5612 100644
--- a/OvmfPkg/Library/LoadLinuxLib/Linux.c
+++ b/OvmfPkg/Library/LoadLinuxLib/Linux.c
@@ -647,7 +647,7 @@ LoadLinux (
Bp->hdr.code32_start = (UINT32)(UINTN) Kernel;
if (Bp->hdr.version >= 0x20c && Bp->hdr.handover_offset &&
- (Bp->hdr.load_flags & (sizeof (UINTN) == 4 ? BIT2 : BIT3))) {
+ (Bp->hdr.xloadflags & (sizeof (UINTN) == 4 ? BIT2 : BIT3))) {
DEBUG ((EFI_D_INFO, "Jumping to kernel EFI handover point at ofs %x\n", Bp->hdr.handover_offset));
DisableInterrupts ();