summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-06-05 11:42:03 -0400
committerRobert Morris <[email protected]>2019-06-05 11:42:03 -0400
commitf1a727b971a59bab6025b4c4111342c27356ca40 (patch)
treed22d52c613bfc003e6fb75b5d137aeff9d954201 /main.c
parentec3d3a1fceee437c640f9c5c05fc517edfb1899e (diff)
downloadxv6-labs-f1a727b971a59bab6025b4c4111342c27356ca40.tar.gz
xv6-labs-f1a727b971a59bab6025b4c4111342c27356ca40.tar.bz2
xv6-labs-f1a727b971a59bab6025b4c4111342c27356ca40.zip
start at support for multiple CPUs
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