summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorrtm <rtm>2006-06-13 15:50:06 +0000
committerrtm <rtm>2006-06-13 15:50:06 +0000
commit0a70d042d04e084da4226e7d0d684dedcae06d78 (patch)
tree3dfa629b4e4b44b399fb13b384ed9b50dd03f997 /main.c
parent70a895f63c504f255a28f63efdcfc6b39b2572c5 (diff)
downloadxv6-labs-0a70d042d04e084da4226e7d0d684dedcae06d78.tar.gz
xv6-labs-0a70d042d04e084da4226e7d0d684dedcae06d78.tar.bz2
xv6-labs-0a70d042d04e084da4226e7d0d684dedcae06d78.zip
more or less take traps/interrupts
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index a1c08c9..7c3677e 100644
--- a/main.c
+++ b/main.c
@@ -14,8 +14,8 @@ main()
cprintf("\nxV6\n\n");
- // initialize physical memory allocator
- kinit();
+ kinit(); // physical memory allocator
+ tinit(); // traps and interrupts
// create fake process zero
p = &proc[0];
@@ -33,6 +33,10 @@ main()
p = newproc(&proc[0]);
// xxx copy instructions to p->mem
+ p->mem[0] = 0x90; // nop
+ p->mem[1] = 0x90; // nop
+ p->mem[2] = 0x42; // inc %edx
+ p->mem[3] = 0x42; // inc %edx
p->tf->tf_eip = 0;
p->tf->tf_esp = p->sz;