mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Update code for changes in x86_64 0.5.0
This commit is contained in:
@@ -10,7 +10,7 @@ use core::panic::PanicInfo;
|
|||||||
pub extern "C" fn _start() -> ! {
|
pub extern "C" fn _start() -> ! {
|
||||||
blog_os::interrupts::init_idt();
|
blog_os::interrupts::init_idt();
|
||||||
|
|
||||||
x86_64::instructions::int3();
|
x86_64::instructions::interrupts::int3();
|
||||||
|
|
||||||
serial_println!("ok");
|
serial_println!("ok");
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
use crate::println;
|
use crate::println;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use x86_64::structures::idt::{ExceptionStackFrame, InterruptDescriptorTable};
|
use x86_64::structures::idt::{InterruptDescriptorTable, InterruptStackFrame};
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref IDT: InterruptDescriptorTable = {
|
static ref IDT: InterruptDescriptorTable = {
|
||||||
@@ -20,6 +20,6 @@ pub fn init_idt() {
|
|||||||
IDT.load();
|
IDT.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "x86-interrupt" fn breakpoint_handler(stack_frame: &mut ExceptionStackFrame) {
|
extern "x86-interrupt" fn breakpoint_handler(stack_frame: &mut InterruptStackFrame) {
|
||||||
println!("EXCEPTION: BREAKPOINT\n{:#?}", stack_frame);
|
println!("EXCEPTION: BREAKPOINT\n{:#?}", stack_frame);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ pub extern "C" fn _start() -> ! {
|
|||||||
blog_os::interrupts::init_idt();
|
blog_os::interrupts::init_idt();
|
||||||
|
|
||||||
// invoke a breakpoint exception
|
// invoke a breakpoint exception
|
||||||
x86_64::instructions::int3();
|
x86_64::instructions::interrupts::int3();
|
||||||
|
|
||||||
println!("It did not crash!");
|
println!("It did not crash!");
|
||||||
loop {}
|
loop {}
|
||||||
|
|||||||
Reference in New Issue
Block a user