summaryrefslogtreecommitdiff
path: root/kernel/entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/entry.S')
-rw-r--r--kernel/entry.S7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/entry.S b/kernel/entry.S
index b3d2c55..97eaf11 100644
--- a/kernel/entry.S
+++ b/kernel/entry.S
@@ -2,7 +2,7 @@
# there seem to be provided by qemu, as if it
# were a ROM. the code at 0x1000 jumps to
# 0x8000000, the _start function here,
- # in machine mode.
+ # in machine mode. each CPU starts here.
.section .data
.globl stack0
.section .text
@@ -11,8 +11,9 @@
.globl _entry
_entry:
# set up a stack for C.
- # stack0 is declared in start,
- # with 4096 bytes per CPU.
+ # stack0 is declared in start.c,
+ # with a 4096-byte stack per CPU.
+ # sp = stack0 + (hartid * 4096)
la sp, stack0
li a0, 1024*4
csrr a1, mhartid