On 28 July 2015 at 19:10, Ryan Harkin ryan.harkin@linaro.org wrote:
In DEBUG builds, output the addresses of the FDT, initrd and kernel images before booting the kernel.
This will help spot problems with images being loaded at addresses the kernel doesn't like.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ryan Harkin ryan.harkin@linaro.org
Reviewed-by: Ard Biesheuvel ard.biesheuvel@linaro.org
ArmPkg/Application/LinuxLoader/AArch64/LinuxStarter.c | 11 +++++++++++ ArmPkg/Application/LinuxLoader/Arm/LinuxStarter.c | 11 +++++++++++ 2 files changed, 22 insertions(+)
diff --git a/ArmPkg/Application/LinuxLoader/AArch64/LinuxStarter.c b/ArmPkg/Application/LinuxLoader/AArch64/LinuxStarter.c index 0d540c9..da4a79d 100644 --- a/ArmPkg/Application/LinuxLoader/AArch64/LinuxStarter.c +++ b/ArmPkg/Application/LinuxLoader/AArch64/LinuxStarter.c @@ -128,6 +128,12 @@ StartLinux ( // // Start the Linux Kernel //
DEBUG_CODE_BEGIN();
DEBUG ((EFI_D_ERROR, "linux: address 0x%x\n", LinuxKernel));
DEBUG ((EFI_D_ERROR, "linux: length 0x%x\n", LinuxImageSize));
DEBUG ((EFI_D_ERROR, "fdt: address 0x%x\n", FdtBlobBase));
DEBUG ((EFI_D_ERROR, "fdt: length 0x%x\n", FdtBlobSize));
DEBUG_CODE_END();
// x1-x3 are reserved (set to zero) for future use. LinuxKernel ((UINTN)FdtBlobBase, 0, 0, 0);
@@ -349,6 +355,11 @@ BootLinuxFdt ( goto EXIT_FREE_FDT; }
- DEBUG_CODE_BEGIN();
- DEBUG ((EFI_D_ERROR, "initrd: address 0x%x\n", InitrdImage));
- DEBUG ((EFI_D_ERROR, "initrd: length 0x%x\n", InitrdImageSize));
- DEBUG_CODE_END();
- return StartLinux (LinuxImage, LinuxImageSize, FdtBlobBase, FdtBlobSize);
EXIT_FREE_FDT: diff --git a/ArmPkg/Application/LinuxLoader/Arm/LinuxStarter.c b/ArmPkg/Application/LinuxLoader/Arm/LinuxStarter.c index 960fdd6..34185b8 100644 --- a/ArmPkg/Application/LinuxLoader/Arm/LinuxStarter.c +++ b/ArmPkg/Application/LinuxLoader/Arm/LinuxStarter.c @@ -126,6 +126,12 @@ StartLinux ( // // Start the Linux Kernel //
DEBUG_CODE_BEGIN();
DEBUG ((EFI_D_ERROR, "linux: address 0x%x\n", LinuxKernel));
DEBUG ((EFI_D_ERROR, "linux: length 0x%x\n", LinuxImageSize));
DEBUG ((EFI_D_ERROR, "fdt: address 0x%x\n", KernelParamsAddress));
DEBUG ((EFI_D_ERROR, "fdt: length 0x%x\n", KernelParamsSize));
DEBUG_CODE_END();
// Outside BootServices, so can't use Print(); DEBUG ((EFI_D_ERROR, "\nStarting the kernel:\n\n"));
@@ -329,6 +335,11 @@ BootLinuxFdt ( goto EXIT_FREE_FDT; }
- DEBUG_CODE_BEGIN();
- DEBUG ((EFI_D_ERROR, "initrd: address 0x%x\n", InitrdImage));
- DEBUG ((EFI_D_ERROR, "initrd: length 0x%x\n", InitrdImageSize));
- DEBUG_CODE_END();
- return StartLinux (SystemMemoryBase, LinuxImage, LinuxImageSize, FdtBlobBase, FdtBlobSize, ARM_FDT_MACHINE_TYPE);
EXIT_FREE_FDT:
2.1.0