grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] loader/i386/linux.c Correct wrong initrd address for debug


From: Jeremy Szu
Subject: [PATCH] loader/i386/linux.c Correct wrong initrd address for debug
Date: Fri, 9 Dec 2022 12:07:49 +0800

From: Jeremy Su <os369510@gmail.com>

The 'addr' is used to request the memory with specific ranges but the
real loadable address come from the relocator.
Thus, print the final retrieved addresses (virtual and physical) for
initrd.
---
 grub-core/loader/i386/linux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
index ee1c3b985..953639445 100644
--- a/grub-core/loader/i386/linux.c
+++ b/grub-core/loader/i386/linux.c
@@ -1207,8 +1207,8 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ 
((unused)),
   if (grub_initrd_load (&initrd_ctx, initrd_mem))
     goto fail;
 
-  grub_dprintf ("linux", "Initrd, addr=0x%x, size=0x%x\n",
-               (unsigned) addr, (unsigned) size);
+  grub_dprintf ("linux", "Initrd (%p) at 0x%" PRIxGRUB_ADDR ", size=0x%x\n",
+               initrd_mem, initrd_mem_target, (unsigned) size);
 
   linux_params.ramdisk_image = GRUB_LINUX_ADDR_LOW_U32(initrd_mem_target);
   linux_params.ramdisk_size = GRUB_LINUX_SIZE_LOW_U32(size);
-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]