summaryrefslogtreecommitdiff
path: root/trapasm.S
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 /trapasm.S
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 'trapasm.S')
-rw-r--r--trapasm.S16
1 files changed, 16 insertions, 0 deletions
diff --git a/trapasm.S b/trapasm.S
index 69649ff..c75ab39 100644
--- a/trapasm.S
+++ b/trapasm.S
@@ -1,4 +1,20 @@
+#include "mmu.h"
+
.text
+ .globl alltraps
+ .globl trap
+alltraps:
+ /* vectors.S sends all traps here */
+ pushl %ds # build
+ pushl %es # trap
+ pushal # frame
+ movl $16,%eax # SEG_KDATA << 3
+ movw %ax,%ds # kernel
+ movw %ax,%es # segments
+ pushl %esp # pass pointer to this trapframe
+ call trap # and call trap()
+ # return falls through to trapret...
+
.globl trapret
/*
* a forked process RETs here