From f1a727b971a59bab6025b4c4111342c27356ca40 Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Wed, 5 Jun 2019 11:42:03 -0400 Subject: start at support for multiple CPUs --- main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main.c') 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 -- cgit v1.2.3