在riscv输出hello world (#466)

增加了以下内容:
- SBI驱动
- 把内核的rust工具链升级到2023-08-15版本
- 输出riscv的helloworld
- 设置内核是PIC的
This commit is contained in:
LoGin
2023-12-07 02:13:22 +08:00
committed by GitHub
parent fca83acef4
commit 1a72a751b1
41 changed files with 722 additions and 122 deletions

View File

@ -0,0 +1,34 @@
#include "common/asm.h"
.section .bootstrap
#define CSR_SIE 0x104
#define CSR_SIP 0x144
#define CSR_IE CSR_SIE
#define CSR_IP CSR_SIP
// DragonStub
//
// a0: hartid ID
// a1: fdt
.global _start
.type _start, @function
ENTRY(_start)
/* Mask all interrupts */
csrw CSR_IE, zero
csrw CSR_IP, zero
/* Load the global pointer */
.option push
.option norelax
la sp, BSP_IDLE_STACK_SPACE
li t0, 32768
add sp, sp, t0
.option pop
/* Call the kernel */
call kernel_main
nop
_loop:
j _loop