File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ lazy_static! {
8
8
9
9
idt. divide_error. set_handler_fn( divide_handler) ;
10
10
idt. breakpoint. set_handler_fn( breakpoint_handler) ;
11
- //idt.double_fault.set_handler_fn(double_fault_handler);
11
+
12
+ idt. double_fault. set_handler_fn( double_fault_handler) ;
12
13
13
14
idt
14
15
} ;
@@ -33,9 +34,8 @@ extern "x86-interrupt" fn breakpoint_handler(
33
34
println ! ( "[Bootloader] [IDT] Breakpoint Hit" ) ;
34
35
}
35
36
36
- /* extern "x86-interrupt" fn double_fault_handler(
37
- stack_frame: &mut InterruptStackFrame, _error_code: u64 ) -> !
37
+ extern "x86-interrupt" fn double_fault_handler (
38
+ stack_frame : & mut InterruptStackFrame , _error_code : u32 ) -> !
38
39
{
39
- panic!("EXCEPTION: DOUBLE FAULT\n{:#?}", stack_frame);
40
- loop {};
41
- }*/
40
+ panic ! ( "[Bootloader] [IDT] Double Fault!" ) ;
41
+ }
Original file line number Diff line number Diff line change @@ -29,9 +29,5 @@ pub extern "C" fn third_stage() -> ! {
29
29
30
30
println ! ( "[Bootloader] [32] Loaded IDT" ) ;
31
31
32
- unsafe { asm ! ( "int 3" ) } ;
33
-
34
- println ! ( "[Bootloader] [32] It didn't crash!" ) ;
35
-
36
32
loop { } ;
37
33
}
Original file line number Diff line number Diff line change @@ -207,12 +207,12 @@ impl EntryOptions {
207
207
pub type HandlerFunc = extern "x86-interrupt" fn ( & mut InterruptStackFrame ) ;
208
208
/// A handler function for an exception that pushes an error code.
209
209
pub type HandlerFuncWithErrCode =
210
- extern "x86-interrupt" fn ( & mut InterruptStackFrame , error_code : u64 ) ;
210
+ extern "x86-interrupt" fn ( & mut InterruptStackFrame , error_code : u32 ) ;
211
211
/// A handler function that must not return, e.g. for a machine check exception.
212
212
pub type DivergingHandlerFunc = extern "x86-interrupt" fn ( & mut InterruptStackFrame ) -> !;
213
213
/// A handler function with an error code that must not return, e.g. for a double fault exception.
214
214
pub type DivergingHandlerFuncWithErrCode =
215
- extern "x86-interrupt" fn ( & mut InterruptStackFrame , error_code : u64 ) -> !;
215
+ extern "x86-interrupt" fn ( & mut InterruptStackFrame , error_code : u32 ) -> !;
216
216
217
217
/// Represents the interrupt stack frame pushed by the CPU on interrupt or exception entry.
218
218
#[ derive( Clone , Debug ) ]
You can’t perform that action at this time.
0 commit comments