|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v1 7/8] xen/riscv: print hello message from C env
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
xen/arch/riscv/riscv64/head.S | 4 +---
xen/arch/riscv/setup.c | 12 ++++++++++++
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S
index ddc7104701..4e399016e9 100644
--- a/xen/arch/riscv/riscv64/head.S
+++ b/xen/arch/riscv/riscv64/head.S
@@ -5,6 +5,4 @@ ENTRY(start)
li t0, PAGE_SIZE
add sp, sp, t0
-_start_hang:
- wfi
- j _start_hang
+ tail start_xen
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index 2c7dca1daa..785566103b 100644
--- a/xen/arch/riscv/setup.c
+++ b/xen/arch/riscv/setup.c
@@ -1,6 +1,18 @@
#include <xen/init.h>
#include <xen/compile.h>
+#include <asm/early_printk.h>
+
/* Xen stack for bringing up the first CPU. */
unsigned char __initdata cpu0_boot_stack[PAGE_SIZE]
__aligned(PAGE_SIZE);
+
+void __init noreturn start_xen(void)
+{
+ early_printk("Hello from C env\n");
+
+ for ( ;; )
+ asm volatile ("wfi");
+
+ unreachable();
+}
--
2.38.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |