add some hints

This commit is contained in:
Yeongjin Jang 2019-04-01 21:22:40 -07:00
parent a37b5511d0
commit f1840b8b11
2 changed files with 20 additions and 2 deletions

View File

@ -59,14 +59,26 @@ static const char *trapname(int trapno)
}
// XYZ: write a function declaration here...
// e.g., void t_divide();
void
trap_init(void)
{
extern struct Segdesc gdt[];
/*
*
* HINT
* Do something like this: SETGATE(idt[T_DIVIDE], 0, GD_KT, t_divide, 0);
* if your trap handler's name for divide by zero is t_device.
* Additionally, you should declare trap handler as a function
* to refer that in C code... (see the comment XYZ above)
*
*/
// LAB 3: Your code here.
// Per-CPU setup
// Per-CPU setup
trap_init_percpu();
}

View File

@ -47,9 +47,15 @@
* Lab 3: Your code here for generating entry points for the different traps.
*/
// HINT 1 : TRAPHANDLER_NOEC(t_divide, T_DIVIDE);
// Do something like this if there is no error code for the trap
// HINT 2 : TRAPHANDLER(t_dblflt, T_DBLFLT);
// Do something like this if the trap includes an error code..
// HINT 3 : READ Intel's manual to check if the trap includes an error code
// or not...
/*
* Lab 3: Your code here for _alltraps
*/