summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index db9a6b9..24793cd 100644
--- a/main.c
+++ b/main.c
@@ -8,11 +8,12 @@
// Allocate a real stack and switch to it, first
// doing some setup required for memory allocator to work.
void
-main()
+main(int hartid)
{
+ w_tp(hartid); // save hartid where cpuid() can find it
uartinit(); // serial port
consoleinit();
- printf("entering main()\n");
+ printf("entering main() on hart %d\n", hartid);
kinit(); // physical page allocator
kvminit(); // kernel page table
procinit(); // process table