]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/riscv: read/save hart_id and dtb_base passed by bootloader
authorOleksii Kurochko <oleksii.kurochko@gmail.com>
Mon, 20 Mar 2023 16:11:13 +0000 (17:11 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 20 Mar 2023 16:11:13 +0000 (17:11 +0100)
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Bobby Eshleman <bobbyeshleman@gmail.com>
xen/arch/riscv/riscv64/head.S
xen/arch/riscv/setup.c

index 52fa41c778a1ef079d6b2d53e1a9bf33f9b7d26b..adf5d6c74ad9ae81568528b878957f3b661ca02a 100644 (file)
@@ -2,6 +2,11 @@
 
         .section .text.header, "ax", %progbits
 
+        /*
+         * OpenSBI pass to start():
+         *   a0 -> hart_id ( bootcpu_id )
+         *   a1 -> dtb_base 
+         */
 ENTRY(start)
         /* Mask all interrupts */
         csrw    CSR_SIE, zero
index 1c87899e8e90ac3bd0d545ed6a9c88bda51d96cc..22ef2817ff56b7c90b25fa15775b5fe855d7d4a1 100644 (file)
@@ -7,7 +7,8 @@
 unsigned char __initdata cpu0_boot_stack[STACK_SIZE]
     __aligned(STACK_SIZE);
 
-void __init noreturn start_xen(void)
+void __init noreturn start_xen(unsigned long bootcpu_id,
+                               paddr_t dtb_addr)
 {
     early_printk("Hello from C env\n");