From 0a70d042d04e084da4226e7d0d684dedcae06d78 Mon Sep 17 00:00:00 2001 From: rtm Date: Tue, 13 Jun 2006 15:50:06 +0000 Subject: more or less take traps/interrupts --- trapasm.S | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'trapasm.S') 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 -- cgit v1.2.3