|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v3 2/3] xen/riscv: read/save hart_id and dtb_base passed by bootloader
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
Changes since v2:
* Add the comment for start() function with the explanation what and
how OpenSBI pass to start() function.
* Clean up start() code related to read&save hart_id & dtb_base.
---
Changes since v1:
* read/save/pass of hart_id and dtb_base passed by a bootloader
were moved to head.S.
* Update start_xen() to recieve hard_id & dtb_base
---
xen/arch/riscv/riscv64/head.S | 5 +++++
xen/arch/riscv/setup.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S
index 52fa41c778..adf5d6c74a 100644
--- a/xen/arch/riscv/riscv64/head.S
+++ b/xen/arch/riscv/riscv64/head.S
@@ -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
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index 1c87899e8e..d9723fe1c0 100644
--- a/xen/arch/riscv/setup.c
+++ b/xen/arch/riscv/setup.c
@@ -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,
+ unsigned long dtb_base)
{
early_printk("Hello from C env\n");
--
2.39.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |