We must use the ramdisk address for the initrd_addr field, not the kernel
address. Fix this.

Signed-off-by: Simon Glass <s...@chromium.org>
Fixes: e05cda3004f ("boot: pxe: Refactor label_run_boot() to avoid")
Reviewed-by: Tom Rini <tr...@konsulko.com>
---

(no changes since v1)

 boot/pxe_utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index 16608c6ebc8..d827b1135bb 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -601,7 +601,8 @@ static int label_run_boot(struct pxe_context *ctx, struct 
pxe_label *label,
 
        if (initrd_addr_str) {
                bmi.conf_ramdisk = initrd_str;
-               bootm_x86_set(&bmi, initrd_addr, hextoul(kernel_addr, NULL));
+               bootm_x86_set(&bmi, initrd_addr,
+                             hextoul(initrd_addr_str, NULL));
                bootm_x86_set(&bmi, initrd_size,
                              hextoul(initrd_filesize, NULL));
        }
-- 
2.43.0

Reply via email to