diff options
| author | Nathan Lee <me@nwlee.tech> | 2026-10-03 21:37:57 -0500 |
|---|---|---|
| committer | Nathan Lee <me@nwlee.tech> | 2026-10-03 21:37:57 -0500 |
| commit | 0189cc9d771e5911b07fbf91ca18da3a338f8d30 (patch) | |
| tree | dbf2c8a366547dda3ec99f752417a4085a5a5599 /website-kernel/arch/start.S | |
| parent | 182ad75161c77b4a75d48275979ce44cde213e3f (diff) | |
add first userspace invocation
Diffstat (limited to 'website-kernel/arch/start.S')
| -rw-r--r-- | website-kernel/arch/start.S | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/website-kernel/arch/start.S b/website-kernel/arch/start.S index 20ddeb1..b5c7a4b 100644 --- a/website-kernel/arch/start.S +++ b/website-kernel/arch/start.S @@ -2,12 +2,14 @@ .global _start .type _start, @function -.extern user_regs _start: csrw mstatus, zero csrw mie, zero + la t0, _syscall + csrw mtvec, t0 + la sp, __stack_top la t0, __data_load @@ -33,3 +35,7 @@ _start: call kernel_main wfi + +_syscall: + call handle_syscall + wfi |
