summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-22 11:01:44 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-22 11:01:44 +0000
commit48be3ea2e0e0c7f4ce88f3466c952aa79d50a094 (patch)
treecfa4265a89ef3831969a1ece44c4ed15f87bd656
parent50e610270c39fe1eb5b1b3930c6b7556f72fa91a (diff)
downloadedk2-48be3ea2e0e0c7f4ce88f3466c952aa79d50a094.tar.gz
edk2-48be3ea2e0e0c7f4ce88f3466c952aa79d50a094.tar.bz2
edk2-48be3ea2e0e0c7f4ce88f3466c952aa79d50a094.zip
ArmPkg/BdsLib: InitrdImageSize was not initialized when no initrd was
passed The PrepareAtagList function is using this variable to determine if a initrd was passed to the kernel. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12181 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--ArmPkg/Library/BdsLib/BdsLinuxLoader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ArmPkg/Library/BdsLib/BdsLinuxLoader.c b/ArmPkg/Library/BdsLib/BdsLinuxLoader.c
index 2b42b28ff4..ce4b2a43b6 100644
--- a/ArmPkg/Library/BdsLib/BdsLinuxLoader.c
+++ b/ArmPkg/Library/BdsLib/BdsLinuxLoader.c
@@ -218,11 +218,14 @@ BdsBootLinux (
UINT32 KernelParamsSize;
EFI_PHYSICAL_ADDRESS KernelParamsAddress;
UINT32 MachineType;
- BOOLEAN FdtSupported = FALSE;
+ BOOLEAN FdtSupported;
LINUX_KERNEL LinuxKernel;
EFI_PHYSICAL_ADDRESS LinuxImage;
EFI_PHYSICAL_ADDRESS InitrdImage;
+ InitrdImageSize = 0;
+ FdtSupported = FALSE;
+
// Ensure the System Memory PCDs have been initialized (PcdSystemMemoryBase and PcdSystemMemorySize)
ASSERT (PcdGet32(PcdSystemMemorySize) != 0);
@@ -238,7 +241,6 @@ BdsBootLinux (
LinuxKernel = (LINUX_KERNEL)(UINTN)LinuxImage;
if (InitrdDevicePath) {
- InitrdImageSize = 0;
Status = BdsLoadImage (InitrdDevicePath, AllocateAnyPages, &InitrdImage, &InitrdImageSize);
if (EFI_ERROR(Status)) {
Print (L"ERROR: Did not find initrd image.\n");