Skip to contentSkip to conversation

efi/efistub: Make libstub to supply boot_param from RDI

PATCH NAK Khalid Ali 1 participant 1 message Jun 23, 2025 EFI

lore
Share & tools
lore

Khalid Ali

author
#0 lore raw

PATCH 3/3 efi/efistub: Make libstub to supply boot_param from RDI

From: Khalid Ali <[email protected]>

This adjusts the libstub to supply argument from RDI instead of RSI.

---
 drivers/firmware/efi/libstub/x86-stub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/efi/libstub/x86-stub.c +2 -2
index 09ed1c122106..9da9b6295b1d 100644
@@ -794,8 +794,8 @@ static efi_status_t efi_decompress_kernel(unsigned long *kernel_entry,
 static void __noreturn enter_kernel(unsigned long kernel_addr,
 				    struct boot_params *boot_params)
 {
-	/* enter decompressed kernel with boot_params pointer in RSI/ESI */
-	asm("jmp *%0"::"r"(kernel_addr), "S"(boot_params));
+	/* enter decompressed kernel with boot_params pointer in RDI/EDI */
+	asm("jmp *%0"::"r"(kernel_addr), "D"(boot_params));
 
 	unreachable();
 }
Signature · 1 line
2.49.0