diff mbox series

[v1,1/3] Recieve boot_param from RDI Instead of RSI

Message ID 20250623081550.1262-1-khaliidcaliy@gmail.com
State New
Headers show
Series x86/boot: Supply boot_param in rdi instead of rsi from startup_64() | expand

Commit Message

Khalid Ali June 23, 2025, 8:15 a.m. UTC
From: Khalid Ali <khaliidcaliy@gmail.com>

Adjust the kernel entry point to recieve arguments from RDI instead of
RSI.

Signed-off-by: Khalid Ali <khaliidcaliy@gmail.com>
---
 arch/x86/kernel/head_64.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index dfb5390e5c9a..d24fea15b6a6 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -43,7 +43,7 @@  SYM_CODE_START_NOALIGN(startup_64)
 	 * for us.  These identity mapped page tables map all of the
 	 * kernel pages and possibly all of memory.
 	 *
-	 * %RSI holds the physical address of the boot_params structure
+	 * %RDI holds the physical address of the boot_params structure
 	 * provided by the bootloader. Preserve it in %R15 so C function calls
 	 * will not clobber it.
 	 *
@@ -56,7 +56,7 @@  SYM_CODE_START_NOALIGN(startup_64)
 	 * compiled to run at we first fixup the physical addresses in our page
 	 * tables and then reload them.
 	 */
-	mov	%rsi, %r15
+	mov	%rdi, %r15
 
 	/* Set up the stack for verify_cpu() */
 	leaq	__top_init_kernel_stack(%rip), %rsp