Skip to content

Commit

Permalink
2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei Hu committed May 24, 2010
1 parent 796039d commit 17f22e7
Show file tree
Hide file tree
Showing 3 changed files with 568 additions and 9 deletions.
7 changes: 5 additions & 2 deletions kern/trap.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@ static const char *trapname(int trapno)
}


extern uint32_t vectors[]; // in trapentry.S: array of 256 entry pointers
void
idt_init(void)
{
extern struct Segdesc gdt[];

// LAB 3: Your code here.

int i = 0;
for (; i < 256; i++)
SETGATE(idt[i], 0, GD_KT, vectors[i], 0);

// Setup a TSS so that we get the right stack
// when we trap to the kernel.
Expand Down
Loading

0 comments on commit 17f22e7

Please sign in to comment.