diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-10-30 16:23:15 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-11-01 10:27:51 +0200 |
| commit | d5e5afae9249da312b417bc4f5f45ac164404846 (patch) | |
| tree | 91c486085c6e9618ae4acd1e18aae5d4fe627d04 /arch/riscv64/kernel/core_bringup.S | |
| parent | dc71f4f38f49ed3a3b67098b7926a0731e9ce225 (diff) | |
| download | kmi-d5e5afae9249da312b417bc4f5f45ac164404846.tar.gz kmi-d5e5afae9249da312b417bc4f5f45ac164404846.zip | |
smp on visionfive2 'works'
Diffstat (limited to 'arch/riscv64/kernel/core_bringup.S')
| -rw-r--r-- | arch/riscv64/kernel/core_bringup.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/riscv64/kernel/core_bringup.S b/arch/riscv64/kernel/core_bringup.S index 8a5a6f5..db68dce 100644 --- a/arch/riscv64/kernel/core_bringup.S +++ b/arch/riscv64/kernel/core_bringup.S @@ -1,3 +1,4 @@ +#include "../kernel/csr.h" #include "asm.h" /* pic forces core_bringup to be placed in .got that we can access both from @@ -11,6 +12,9 @@ riscv_bringup: csrw satp, a1 sfence.vma + /* set scratch to zero in case we crash */ + csrw CSR_SSCRATCH, x0 + /* fetch the stack allocated to us at our hart index in smp_init_stacks */ lui t0, %hi(smp_init_stacks) addi t0, t0, %lo(smp_init_stacks) |
