summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/BdsLib/BdsLinuxLoader.c
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Library/BdsLib/BdsLinuxLoader.c')
-rw-r--r--ArmPkg/Library/BdsLib/BdsLinuxLoader.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ArmPkg/Library/BdsLib/BdsLinuxLoader.c b/ArmPkg/Library/BdsLib/BdsLinuxLoader.c
index 3ff67f9b12..5c24366e45 100644
--- a/ArmPkg/Library/BdsLib/BdsLinuxLoader.c
+++ b/ArmPkg/Library/BdsLib/BdsLinuxLoader.c
@@ -1,6 +1,6 @@
/** @file
*
-* Copyright (c) 2011, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -75,6 +75,12 @@ StartLinux (
LinuxKernel = (LINUX_KERNEL)(UINTN)LinuxImage;
}
+ // Check if the Linux Image is a uImage
+ if (*(UINT32*)LinuxKernel == LINUX_UIMAGE_SIGNATURE) {
+ // Assume the Image Entry Point is just after the uImage header (64-byte size)
+ LinuxKernel = (LINUX_KERNEL)((UINTN)LinuxKernel + 64);
+ }
+
//TODO: Check there is no overlapping between kernel and Atag
//
@@ -96,7 +102,7 @@ StartLinux (
// Outside BootServices, so can't use Print();
DEBUG((EFI_D_ERROR, "\nStarting the kernel:\n\n"));
- // jump to kernel with register set
+ // Jump to kernel with register set
LinuxKernel ((UINTN)0, MachineType, (UINTN)KernelParamsAddress);
// Kernel should never exit