]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/BdsLib: Fix uInitrd detection
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 14 Apr 2013 09:34:48 +0000 (09:34 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 14 Apr 2013 09:34:48 +0000 (09:34 +0000)
This patch corrects a problem detecting uInitrd signature when booting
with FDT.

BdsBootLinuxFdt was attempting to read the signature from InitrdImage which
is zero at this point in the code.  The code now reads the signature from
InitrdImageBase.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14272 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Library/BdsLib/Arm/BdsLinuxLoader.c

index 0c4d9f6b08a5dee88d76adce10828da98eeba65e..0e8113cb314a5df0412d1cab0382734cd456242d 100644 (file)
@@ -263,7 +263,7 @@ BdsBootLinuxFdt (
     }\r
 \r
     // Check if the initrd is a uInitrd\r
-    if (*(UINT32*)((UINTN)InitrdImage) == LINUX_UIMAGE_SIGNATURE) {\r
+    if (*(UINT32*)((UINTN)InitrdImageBase) == LINUX_UIMAGE_SIGNATURE) {\r
       // Skip the 64-byte image header\r
       InitrdImage = (EFI_PHYSICAL_ADDRESS)((UINTN)InitrdImageBase + 64);\r
       InitrdImageSize = InitrdImageBaseSize - 64;\r