aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Shipp <nick@shipp.ninja>2021-03-15 18:36:03 -0400
committerNick Shipp <nick@shipp.ninja>2021-03-15 18:36:03 -0400
commit638dff9bef5e4c7353e077127541b9f36df3b356 (patch)
tree1945ec6cef925ad3bbc1c7f0f4da336d36981c65
parent9204e0dc00f16053c80986896aeb32f582fcb48e (diff)
Update for modern cratesHEADmaster
-rw-r--r--bunny/Cargo.toml8
-rw-r--r--bunny/src/interrupt.rs478
-rw-r--r--bunny/src/io.rs4
-rw-r--r--bunny/src/main.rs139
4 files changed, 288 insertions, 341 deletions
diff --git a/bunny/Cargo.toml b/bunny/Cargo.toml
index 119113b..d267550 100644
--- a/bunny/Cargo.toml
+++ b/bunny/Cargo.toml
@@ -6,9 +6,9 @@ build = "build.rs"
edition = "2018"
[dependencies]
-uefi = { path = "uefi-rs" }
-uefi-exts = { path = "uefi-rs/uefi-exts" }
-uefi-services = { path = "uefi-rs/uefi-services" }
+uefi = "*"
+uefi-services = "*"
x86_64 = "*"
volatile = "*"
-log = "*"
+log = { version = "*", default-features = false }
+rlibc = "*"
diff --git a/bunny/src/interrupt.rs b/bunny/src/interrupt.rs
index a79e4ed..4eef381 100644
--- a/bunny/src/interrupt.rs
+++ b/bunny/src/interrupt.rs
@@ -1,6 +1,6 @@
use core::mem::size_of;
-use x86_64::structures::idt::{InterruptDescriptorTable, ExceptionStackFrame, PageFaultErrorCode};
+use x86_64::structures::idt::{InterruptDescriptorTable, InterruptStackFrame, PageFaultErrorCode};
pub use x86_64::instructions::interrupts::{are_enabled, disable, enable, without_interrupts};
@@ -8,956 +8,957 @@ pub const IRQ_APIC_LVT_ERROR: u8 = 0x20;
static mut IDT: InterruptDescriptorTable = InterruptDescriptorTable::new();
-extern "x86-interrupt" fn handle_divzero(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn handle_divzero(exc: &mut InterruptStackFrame) {
error!("DIVISION BY ZERO: {:x?}", exc);
loop {}
}
-extern "x86-interrupt" fn handle_seg_not_present(exc: &mut ExceptionStackFrame, code: u64) {
+extern "x86-interrupt" fn handle_seg_not_present(exc: &mut InterruptStackFrame, code: u64) {
error!("SEGMENT NOT PRESENT 0x{:x}: {:x?}", code, exc);
}
-extern "x86-interrupt" fn handle_ss_fault(exc: &mut ExceptionStackFrame, code: u64) {
+extern "x86-interrupt" fn handle_ss_fault(exc: &mut InterruptStackFrame, code: u64) {
error!("STACK SEGMENT FAULT 0x{:x}: {:x?}", code, exc);
loop {}
}
-extern "x86-interrupt" fn handle_gp(exc: &mut ExceptionStackFrame, code: u64) {
+extern "x86-interrupt" fn handle_gp(exc: &mut InterruptStackFrame, code: u64) {
error!("GENERAL PROTECTION FAULT 0x{:x}: {:x?}", code, exc);
loop {}
}
-extern "x86-interrupt" fn handle_iopc(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn handle_iopc(exc: &mut InterruptStackFrame) {
error!("INVALID OPCODE @ 0x{:x}: {:x?}", exc.instruction_pointer.as_u64(), exc);
loop {}
}
-extern "x86-interrupt" fn handle_pagefault(exc: &mut ExceptionStackFrame, code: PageFaultErrorCode) {
+extern "x86-interrupt" fn handle_pagefault(exc: &mut InterruptStackFrame, code: PageFaultErrorCode) {
error!("PAGE FAULT {:?}: {:x?}", code, exc);
loop {}
}
-extern "x86-interrupt" fn handle_inval_tss(exc: &mut ExceptionStackFrame, code: u64) {
+extern "x86-interrupt" fn handle_inval_tss(exc: &mut InterruptStackFrame, code: u64) {
error!("INVALID TSS 0x{:x}: {:x?}", code, exc);
loop {}
}
-extern "x86-interrupt" fn handle_doublefault(exc: &mut ExceptionStackFrame, code: u64) {
+extern "x86-interrupt" fn handle_doublefault(exc: &mut InterruptStackFrame, code: u64) -> ! {
error!("DOUBLE FAULT 0x{:x}: {:x?}", code, exc);
loop {}
}
-extern "x86-interrupt" fn handle_mce(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn handle_mce(exc: &mut InterruptStackFrame) -> ! {
error!("MACHINE CHECK EXCEPTION: {:x?}", exc);
loop {}
}
-extern "x86-interrupt" fn handle_breakpoint(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn handle_breakpoint(exc: &mut InterruptStackFrame) {
error!("BREAKPOINT AT 0x{:x}: {:x?}", exc.instruction_pointer.as_u64(), exc);
}
-extern "x86-interrupt" fn handle_apic_error(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn handle_apic_error(exc: &mut InterruptStackFrame) {
error!("APIC ERROR AT 0x{:x}: {:x?}", exc.instruction_pointer.as_u64(), exc);
}
-fn unhandled_irq(exc: &mut ExceptionStackFrame, num: u8) {
+fn unhandled_irq(exc: &mut InterruptStackFrame, num: u8) {
error!("UNHANDLED IRQ#{:02x}h: {:x?}", num, exc);
+ // loop {}
}
-extern "x86-interrupt" fn unhandled_irq_20(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_20(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x20);
}
-extern "x86-interrupt" fn unhandled_irq_21(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_21(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x21);
}
-extern "x86-interrupt" fn unhandled_irq_22(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_22(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x22);
}
-extern "x86-interrupt" fn unhandled_irq_23(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_23(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x23);
}
-extern "x86-interrupt" fn unhandled_irq_24(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_24(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x24);
}
-extern "x86-interrupt" fn unhandled_irq_25(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_25(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x25);
}
-extern "x86-interrupt" fn unhandled_irq_26(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_26(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x26);
}
-extern "x86-interrupt" fn unhandled_irq_27(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_27(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x27);
}
-extern "x86-interrupt" fn unhandled_irq_28(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_28(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x28);
}
-extern "x86-interrupt" fn unhandled_irq_29(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_29(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x29);
}
-extern "x86-interrupt" fn unhandled_irq_2a(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_2a(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x2a);
}
-extern "x86-interrupt" fn unhandled_irq_2b(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_2b(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x2b);
}
-extern "x86-interrupt" fn unhandled_irq_2c(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_2c(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x2c);
}
-extern "x86-interrupt" fn unhandled_irq_2d(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_2d(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x2d);
}
-extern "x86-interrupt" fn unhandled_irq_2e(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_2e(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x2e);
}
-extern "x86-interrupt" fn unhandled_irq_2f(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_2f(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x2f);
}
-extern "x86-interrupt" fn unhandled_irq_30(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_30(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x30);
}
-extern "x86-interrupt" fn unhandled_irq_31(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_31(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x31);
}
-extern "x86-interrupt" fn unhandled_irq_32(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_32(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x32);
}
-extern "x86-interrupt" fn unhandled_irq_33(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_33(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x33);
}
-extern "x86-interrupt" fn unhandled_irq_34(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_34(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x34);
}
-extern "x86-interrupt" fn unhandled_irq_35(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_35(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x35);
}
-extern "x86-interrupt" fn unhandled_irq_36(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_36(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x36);
}
-extern "x86-interrupt" fn unhandled_irq_37(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_37(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x37);
}
-extern "x86-interrupt" fn unhandled_irq_38(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_38(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x38);
}
-extern "x86-interrupt" fn unhandled_irq_39(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_39(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x39);
}
-extern "x86-interrupt" fn unhandled_irq_3a(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_3a(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x3a);
}
-extern "x86-interrupt" fn unhandled_irq_3b(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_3b(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x3b);
}
-extern "x86-interrupt" fn unhandled_irq_3c(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_3c(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x3c);
}
-extern "x86-interrupt" fn unhandled_irq_3d(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_3d(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x3d);
}
-extern "x86-interrupt" fn unhandled_irq_3e(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_3e(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x3e);
}
-extern "x86-interrupt" fn unhandled_irq_3f(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_3f(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x3f);
}
-extern "x86-interrupt" fn unhandled_irq_40(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_40(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x40);
}
-extern "x86-interrupt" fn unhandled_irq_41(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_41(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x41);
}
-extern "x86-interrupt" fn unhandled_irq_42(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_42(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x42);
}
-extern "x86-interrupt" fn unhandled_irq_43(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_43(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x43);
}
-extern "x86-interrupt" fn unhandled_irq_44(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_44(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x44);
}
-extern "x86-interrupt" fn unhandled_irq_45(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_45(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x45);
}
-extern "x86-interrupt" fn unhandled_irq_46(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_46(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x46);
}
-extern "x86-interrupt" fn unhandled_irq_47(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_47(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x47);
}
-extern "x86-interrupt" fn unhandled_irq_48(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_48(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x48);
}
-extern "x86-interrupt" fn unhandled_irq_49(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_49(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x49);
}
-extern "x86-interrupt" fn unhandled_irq_4a(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_4a(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x4a);
}
-extern "x86-interrupt" fn unhandled_irq_4b(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_4b(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x4b);
}
-extern "x86-interrupt" fn unhandled_irq_4c(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_4c(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x4c);
}
-extern "x86-interrupt" fn unhandled_irq_4d(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_4d(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x4d);
}
-extern "x86-interrupt" fn unhandled_irq_4e(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_4e(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x4e);
}
-extern "x86-interrupt" fn unhandled_irq_4f(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_4f(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x4f);
}
-extern "x86-interrupt" fn unhandled_irq_50(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_50(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x50);
}
-extern "x86-interrupt" fn unhandled_irq_51(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_51(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x51);
}
-extern "x86-interrupt" fn unhandled_irq_52(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_52(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x52);
}
-extern "x86-interrupt" fn unhandled_irq_53(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_53(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x53);
}
-extern "x86-interrupt" fn unhandled_irq_54(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_54(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x54);
}
-extern "x86-interrupt" fn unhandled_irq_55(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_55(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x55);
}
-extern "x86-interrupt" fn unhandled_irq_56(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_56(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x56);
}
-extern "x86-interrupt" fn unhandled_irq_57(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_57(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x57);
}
-extern "x86-interrupt" fn unhandled_irq_58(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_58(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x58);
}
-extern "x86-interrupt" fn unhandled_irq_59(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_59(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x59);
}
-extern "x86-interrupt" fn unhandled_irq_5a(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_5a(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x5a);
}
-extern "x86-interrupt" fn unhandled_irq_5b(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_5b(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x5b);
}
-extern "x86-interrupt" fn unhandled_irq_5c(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_5c(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x5c);
}
-extern "x86-interrupt" fn unhandled_irq_5d(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_5d(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x5d);
}
-extern "x86-interrupt" fn unhandled_irq_5e(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_5e(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x5e);
}
-extern "x86-interrupt" fn unhandled_irq_5f(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_5f(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x5f);
}
-extern "x86-interrupt" fn unhandled_irq_60(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_60(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x60);
}
-extern "x86-interrupt" fn unhandled_irq_61(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_61(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x61);
}
-extern "x86-interrupt" fn unhandled_irq_62(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_62(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x62);
}
-extern "x86-interrupt" fn unhandled_irq_63(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_63(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x63);
}
-extern "x86-interrupt" fn unhandled_irq_64(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_64(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x64);
}
-extern "x86-interrupt" fn unhandled_irq_65(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_65(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x65);
}
-extern "x86-interrupt" fn unhandled_irq_66(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_66(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x66);
}
-extern "x86-interrupt" fn unhandled_irq_67(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_67(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x67);
}
-extern "x86-interrupt" fn unhandled_irq_68(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_68(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x68);
}
-extern "x86-interrupt" fn unhandled_irq_69(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_69(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x69);
}
-extern "x86-interrupt" fn unhandled_irq_6a(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_6a(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x6a);
}
-extern "x86-interrupt" fn unhandled_irq_6b(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_6b(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x6b);
}
-extern "x86-interrupt" fn unhandled_irq_6c(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_6c(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x6c);
}
-extern "x86-interrupt" fn unhandled_irq_6d(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_6d(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x6d);
}
-extern "x86-interrupt" fn unhandled_irq_6e(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_6e(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x6e);
}
-extern "x86-interrupt" fn unhandled_irq_6f(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_6f(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x6f);
}
-extern "x86-interrupt" fn unhandled_irq_70(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_70(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x70);
}
-extern "x86-interrupt" fn unhandled_irq_71(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_71(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x71);
}
-extern "x86-interrupt" fn unhandled_irq_72(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_72(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x72);
}
-extern "x86-interrupt" fn unhandled_irq_73(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_73(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x73);
}
-extern "x86-interrupt" fn unhandled_irq_74(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_74(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x74);
}
-extern "x86-interrupt" fn unhandled_irq_75(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_75(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x75);
}
-extern "x86-interrupt" fn unhandled_irq_76(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_76(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x76);
}
-extern "x86-interrupt" fn unhandled_irq_77(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_77(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x77);
}
-extern "x86-interrupt" fn unhandled_irq_78(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_78(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x78);
}
-extern "x86-interrupt" fn unhandled_irq_79(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_79(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x79);
}
-extern "x86-interrupt" fn unhandled_irq_7a(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_7a(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x7a);
}
-extern "x86-interrupt" fn unhandled_irq_7b(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_7b(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x7b);
}
-extern "x86-interrupt" fn unhandled_irq_7c(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_7c(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x7c);
}
-extern "x86-interrupt" fn unhandled_irq_7d(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_7d(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x7d);
}
-extern "x86-interrupt" fn unhandled_irq_7e(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_7e(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x7e);
}
-extern "x86-interrupt" fn unhandled_irq_7f(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_7f(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x7f);
}
-extern "x86-interrupt" fn unhandled_irq_80(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_80(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x80);
}
-extern "x86-interrupt" fn unhandled_irq_81(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_81(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x81);
}
-extern "x86-interrupt" fn unhandled_irq_82(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_82(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x82);
}
-extern "x86-interrupt" fn unhandled_irq_83(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_83(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x83);
}
-extern "x86-interrupt" fn unhandled_irq_84(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_84(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x84);
}
-extern "x86-interrupt" fn unhandled_irq_85(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_85(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x85);
}
-extern "x86-interrupt" fn unhandled_irq_86(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_86(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x86);
}
-extern "x86-interrupt" fn unhandled_irq_87(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_87(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x87);
}
-extern "x86-interrupt" fn unhandled_irq_88(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_88(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x88);
}
-extern "x86-interrupt" fn unhandled_irq_89(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_89(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x89);
}
-extern "x86-interrupt" fn unhandled_irq_8a(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_8a(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x8a);
}
-extern "x86-interrupt" fn unhandled_irq_8b(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_8b(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x8b);
}
-extern "x86-interrupt" fn unhandled_irq_8c(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_8c(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x8c);
}
-extern "x86-interrupt" fn unhandled_irq_8d(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_8d(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x8d);
}
-extern "x86-interrupt" fn unhandled_irq_8e(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_8e(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x8e);
}
-extern "x86-interrupt" fn unhandled_irq_8f(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_8f(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x8f);
}
-extern "x86-interrupt" fn unhandled_irq_90(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_90(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x90);
}
-extern "x86-interrupt" fn unhandled_irq_91(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_91(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x91);
}
-extern "x86-interrupt" fn unhandled_irq_92(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_92(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x92);
}
-extern "x86-interrupt" fn unhandled_irq_93(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_93(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x93);
}
-extern "x86-interrupt" fn unhandled_irq_94(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_94(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x94);
}
-extern "x86-interrupt" fn unhandled_irq_95(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_95(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x95);
}
-extern "x86-interrupt" fn unhandled_irq_96(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_96(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x96);
}
-extern "x86-interrupt" fn unhandled_irq_97(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_97(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x97);
}
-extern "x86-interrupt" fn unhandled_irq_98(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_98(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x98);
}
-extern "x86-interrupt" fn unhandled_irq_99(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_99(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x99);
}
-extern "x86-interrupt" fn unhandled_irq_9a(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_9a(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x9a);
}
-extern "x86-interrupt" fn unhandled_irq_9b(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_9b(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x9b);
}
-extern "x86-interrupt" fn unhandled_irq_9c(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_9c(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x9c);
}
-extern "x86-interrupt" fn unhandled_irq_9d(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_9d(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x9d);
}
-extern "x86-interrupt" fn unhandled_irq_9e(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_9e(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x9e);
}
-extern "x86-interrupt" fn unhandled_irq_9f(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_9f(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0x9f);
}
-extern "x86-interrupt" fn unhandled_irq_a0(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_a0(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xa0);
}
-extern "x86-interrupt" fn unhandled_irq_a1(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_a1(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xa1);
}
-extern "x86-interrupt" fn unhandled_irq_a2(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_a2(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xa2);
}
-extern "x86-interrupt" fn unhandled_irq_a3(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_a3(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xa3);
}
-extern "x86-interrupt" fn unhandled_irq_a4(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_a4(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xa4);
}
-extern "x86-interrupt" fn unhandled_irq_a5(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_a5(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xa5);
}
-extern "x86-interrupt" fn unhandled_irq_a6(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_a6(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xa6);
}
-extern "x86-interrupt" fn unhandled_irq_a7(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_a7(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xa7);
}
-extern "x86-interrupt" fn unhandled_irq_a8(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_a8(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xa8);
}
-extern "x86-interrupt" fn unhandled_irq_a9(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_a9(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xa9);
}
-extern "x86-interrupt" fn unhandled_irq_aa(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_aa(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xaa);
}
-extern "x86-interrupt" fn unhandled_irq_ab(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ab(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xab);
}
-extern "x86-interrupt" fn unhandled_irq_ac(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ac(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xac);
}
-extern "x86-interrupt" fn unhandled_irq_ad(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ad(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xad);
}
-extern "x86-interrupt" fn unhandled_irq_ae(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ae(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xae);
}
-extern "x86-interrupt" fn unhandled_irq_af(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_af(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xaf);
}
-extern "x86-interrupt" fn unhandled_irq_b0(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_b0(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xb0);
}
-extern "x86-interrupt" fn unhandled_irq_b1(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_b1(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xb1);
}
-extern "x86-interrupt" fn unhandled_irq_b2(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_b2(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xb2);
}
-extern "x86-interrupt" fn unhandled_irq_b3(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_b3(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xb3);
}
-extern "x86-interrupt" fn unhandled_irq_b4(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_b4(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xb4);
}
-extern "x86-interrupt" fn unhandled_irq_b5(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_b5(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xb5);
}
-extern "x86-interrupt" fn unhandled_irq_b6(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_b6(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xb6);
}
-extern "x86-interrupt" fn unhandled_irq_b7(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_b7(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xb7);
}
-extern "x86-interrupt" fn unhandled_irq_b8(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_b8(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xb8);
}
-extern "x86-interrupt" fn unhandled_irq_b9(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_b9(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xb9);
}
-extern "x86-interrupt" fn unhandled_irq_ba(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ba(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xba);
}
-extern "x86-interrupt" fn unhandled_irq_bb(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_bb(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xbb);
}
-extern "x86-interrupt" fn unhandled_irq_bc(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_bc(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xbc);
}
-extern "x86-interrupt" fn unhandled_irq_bd(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_bd(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xbd);
}
-extern "x86-interrupt" fn unhandled_irq_be(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_be(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xbe);
}
-extern "x86-interrupt" fn unhandled_irq_bf(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_bf(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xbf);
}
-extern "x86-interrupt" fn unhandled_irq_c0(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_c0(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xc0);
}
-extern "x86-interrupt" fn unhandled_irq_c1(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_c1(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xc1);
}
-extern "x86-interrupt" fn unhandled_irq_c2(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_c2(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xc2);
}
-extern "x86-interrupt" fn unhandled_irq_c3(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_c3(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xc3);
}
-extern "x86-interrupt" fn unhandled_irq_c4(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_c4(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xc4);
}
-extern "x86-interrupt" fn unhandled_irq_c5(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_c5(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xc5);
}
-extern "x86-interrupt" fn unhandled_irq_c6(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_c6(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xc6);
}
-extern "x86-interrupt" fn unhandled_irq_c7(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_c7(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xc7);
}
-extern "x86-interrupt" fn unhandled_irq_c8(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_c8(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xc8);
}
-extern "x86-interrupt" fn unhandled_irq_c9(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_c9(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xc9);
}
-extern "x86-interrupt" fn unhandled_irq_ca(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ca(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xca);
}
-extern "x86-interrupt" fn unhandled_irq_cb(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_cb(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xcb);
}
-extern "x86-interrupt" fn unhandled_irq_cc(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_cc(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xcc);
}
-extern "x86-interrupt" fn unhandled_irq_cd(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_cd(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xcd);
}
-extern "x86-interrupt" fn unhandled_irq_ce(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ce(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xce);
}
-extern "x86-interrupt" fn unhandled_irq_cf(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_cf(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xcf);
}
-extern "x86-interrupt" fn unhandled_irq_d0(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_d0(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xd0);
}
-extern "x86-interrupt" fn unhandled_irq_d1(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_d1(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xd1);
}
-extern "x86-interrupt" fn unhandled_irq_d2(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_d2(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xd2);
}
-extern "x86-interrupt" fn unhandled_irq_d3(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_d3(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xd3);
}
-extern "x86-interrupt" fn unhandled_irq_d4(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_d4(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xd4);
}
-extern "x86-interrupt" fn unhandled_irq_d5(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_d5(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xd5);
}
-extern "x86-interrupt" fn unhandled_irq_d6(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_d6(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xd6);
}
-extern "x86-interrupt" fn unhandled_irq_d7(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_d7(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xd7);
}
-extern "x86-interrupt" fn unhandled_irq_d8(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_d8(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xd8);
}
-extern "x86-interrupt" fn unhandled_irq_d9(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_d9(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xd9);
}
-extern "x86-interrupt" fn unhandled_irq_da(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_da(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xda);
}
-extern "x86-interrupt" fn unhandled_irq_db(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_db(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xdb);
}
-extern "x86-interrupt" fn unhandled_irq_dc(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_dc(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xdc);
}
-extern "x86-interrupt" fn unhandled_irq_dd(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_dd(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xdd);
}
-extern "x86-interrupt" fn unhandled_irq_de(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_de(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xde);
}
-extern "x86-interrupt" fn unhandled_irq_df(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_df(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xdf);
}
-extern "x86-interrupt" fn unhandled_irq_e0(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_e0(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xe0);
}
-extern "x86-interrupt" fn unhandled_irq_e1(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_e1(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xe1);
}
-extern "x86-interrupt" fn unhandled_irq_e2(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_e2(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xe2);
}
-extern "x86-interrupt" fn unhandled_irq_e3(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_e3(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xe3);
}
-extern "x86-interrupt" fn unhandled_irq_e4(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_e4(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xe4);
}
-extern "x86-interrupt" fn unhandled_irq_e5(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_e5(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xe5);
}
-extern "x86-interrupt" fn unhandled_irq_e6(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_e6(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xe6);
}
-extern "x86-interrupt" fn unhandled_irq_e7(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_e7(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xe7);
}
-extern "x86-interrupt" fn unhandled_irq_e8(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_e8(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xe8);
}
-extern "x86-interrupt" fn unhandled_irq_e9(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_e9(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xe9);
}
-extern "x86-interrupt" fn unhandled_irq_ea(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ea(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xea);
}
-extern "x86-interrupt" fn unhandled_irq_eb(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_eb(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xeb);
}
-extern "x86-interrupt" fn unhandled_irq_ec(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ec(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xec);
}
-extern "x86-interrupt" fn unhandled_irq_ed(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ed(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xed);
}
-extern "x86-interrupt" fn unhandled_irq_ee(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ee(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xee);
}
-extern "x86-interrupt" fn unhandled_irq_ef(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ef(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xef);
}
-extern "x86-interrupt" fn unhandled_irq_f0(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_f0(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xf0);
}
-extern "x86-interrupt" fn unhandled_irq_f1(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_f1(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xf1);
}
-extern "x86-interrupt" fn unhandled_irq_f2(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_f2(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xf2);
}
-extern "x86-interrupt" fn unhandled_irq_f3(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_f3(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xf3);
}
-extern "x86-interrupt" fn unhandled_irq_f4(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_f4(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xf4);
}
-extern "x86-interrupt" fn unhandled_irq_f5(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_f5(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xf5);
}
-extern "x86-interrupt" fn unhandled_irq_f6(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_f6(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xf6);
}
-extern "x86-interrupt" fn unhandled_irq_f7(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_f7(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xf7);
}
-extern "x86-interrupt" fn unhandled_irq_f8(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_f8(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xf8);
}
-extern "x86-interrupt" fn unhandled_irq_f9(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_f9(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xf9);
}
-extern "x86-interrupt" fn unhandled_irq_fa(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_fa(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xfa);
}
-extern "x86-interrupt" fn unhandled_irq_fb(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_fb(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xfb);
}
-extern "x86-interrupt" fn unhandled_irq_fc(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_fc(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xfc);
}
-extern "x86-interrupt" fn unhandled_irq_fd(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_fd(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xfd);
}
-extern "x86-interrupt" fn unhandled_irq_fe(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_fe(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xfe);
}
-extern "x86-interrupt" fn unhandled_irq_ff(exc: &mut ExceptionStackFrame) {
+extern "x86-interrupt" fn unhandled_irq_ff(exc: &mut InterruptStackFrame) {
unhandled_irq(exc, 0xff);
}
@@ -965,7 +966,6 @@ extern "x86-interrupt" fn unhandled_irq_ff(exc: &mut ExceptionStackFrame) {
pub fn descriptor() -> (u16, u64) {
((size_of::<InterruptDescriptorTable>() - 1) as u16,
unsafe { &IDT } as *const _ as u64)
-
}
pub fn register_handlers() {
@@ -1195,7 +1195,7 @@ pub fn register_handlers() {
IDT[0xfe].set_handler_fn(unhandled_irq_fe);
IDT[0xff].set_handler_fn(unhandled_irq_ff);
- IDT.divide_by_zero.set_handler_fn(handle_divzero);
+ IDT.divide_error.set_handler_fn(handle_divzero);
IDT.invalid_tss.set_handler_fn(handle_inval_tss);
IDT.segment_not_present.set_handler_fn(handle_seg_not_present);
IDT.stack_segment_fault.set_handler_fn(handle_ss_fault);
diff --git a/bunny/src/io.rs b/bunny/src/io.rs
index 2fae55a..08d8c84 100644
--- a/bunny/src/io.rs
+++ b/bunny/src/io.rs
@@ -1,4 +1,4 @@
-use x86_64::instructions::port::{Port, PortReadWrite};
+use x86_64::instructions::port::{Port, PortWrite};
const PIC1 : u16 = 0x20;
const PIC2 : u16 = 0xa0;
@@ -12,7 +12,7 @@ pub const PIC2_DATA : u16 = PIC2 + 1;
pub const PIC_DISABLE : u8 = 0xff;
#[inline(always)]
-pub unsafe fn out<T: PortReadWrite>(port: u16, value: T) {
+pub unsafe fn out<T: PortWrite>(port: u16, value: T) {
let mut p = Port::new(port);
p.write(value)
}
diff --git a/bunny/src/main.rs b/bunny/src/main.rs
index 4a3eb74..c5b1d10 100644
--- a/bunny/src/main.rs
+++ b/bunny/src/main.rs
@@ -1,7 +1,12 @@
-#![feature(lang_items, panic_info_message, abi_x86_interrupt, core_intrinsics, asm, link_llvm_intrinsics, int_to_from_bytes)]
+#![feature(lang_items, panic_info_message, abi_x86_interrupt, core_intrinsics, asm, link_llvm_intrinsics, abi_efiapi)]
#![no_std]
#![no_main]
+extern crate rlibc;
+extern crate alloc;
+extern crate uefi;
+extern crate uefi_services;
+
#[macro_use]
extern crate log;
@@ -11,26 +16,25 @@ mod interrupt;
mod lapic;
mod io;
mod inttraits;
-mod efifb;
use core::ptr;
-use core::slice;
-use core::panic::PanicInfo;
+use core::ffi::c_void;
+use core::sync::atomic::{AtomicUsize, Ordering};
use uefi::prelude::*;
+use uefi::proto::pi::mp::MpServices;
use x86_64::instructions::interrupts;
use self::interrupt::*;
-use self::lapic::*;
-use self::inttraits::*;
-const NUM_CORES: u8 = 4;
-const RESOLUTION: (usize, usize) = (1920, 1080);
+const NUM_CORES: usize = 4;
+// const RESOLUTION: (usize, usize) = (1920, 1080);
-static mut SYSTEM_TABLE: Option<&'static SystemTable> = None;
+static mut SYSTEM_TABLE: Option<SystemTable<Boot>> = None;
+static AP_COUNT: AtomicUsize = AtomicUsize::new(0);
-pub(crate) fn system_table() -> &'static SystemTable {
- SYSTEM_TABLE.expect("System table is missing!")
+pub(crate) fn system_table() -> &'static SystemTable<Boot> {
+ unsafe { SYSTEM_TABLE.as_ref().expect("System table is missing!") }
}
#[allow(improper_ctypes)]
@@ -51,93 +55,56 @@ fn busy() {
}
}
-#[no_mangle]
-pub extern fn efi_main(_handle: uefi::Handle, systab: &'static SystemTable) -> ! {
+extern "efiapi" fn ap_main(_ctxt: *mut c_void) {
+ AP_COUNT.fetch_add(1, Ordering::SeqCst);
+ // loop {
+ // unsafe { asm!("hlt"); }
+ // }
+}
+
+#[entry]
+fn efi_main(_handle: uefi::Handle, systab: SystemTable<Boot>) -> Status {
/*
* Disable interrupts to avoid noise generated before we actually
* have anything to do *with* interrupts
*/
+
+ uefi_services::init(&systab).expect_success("Failed to init services");
+ systab.stdout()
+ .reset(false)
+ .expect_success("Failed to reset stdout");
+
interrupts::disable();
/* Save global reference to the system table */
- SYSTEM_TABLE = Some(systab);
+ unsafe { SYSTEM_TABLE = Some(systab); }
/* Set up basic exception handlers */
register_handlers();
- /* Initialize early framebuffer */
- efifb::init();
-
interrupts::enable();
info!("FUZZY BUNNIES {}", env!("CARGO_PKG_VERSION"));
info!("efi_main @ 0x{:x}", efi_main as *const u8 as usize);
- /* Set up AP bootstrap (real->long transition) code */
- let code = include_bytes!(concat!(env!("OUT_DIR"), "/ap_boot.bin"));
- let dest = unsafe {
- /* Copy the code to somewhere in the first 1MB of memory */
- slice::from_raw_parts_mut(0x8000 as *mut u8, code.len())
- };
-
- dest.copy_from_slice(code);
+ let mp = unsafe { &*system_table()
+ .boot_services()
+ .locate_protocol::<MpServices>()
+ .expect_success("Failed to get MP services")
+ .get() };
- /* Read initial CR3 register to pass off to other cores */
- let cr3_val: u64;
- unsafe {
- asm!("mov $0, cr3" : "=r" (cr3_val) ::: "intel");
- }
-
- let idtr = interrupt::descriptor();
+ info!("Processors: {:?}", mp.get_number_of_processors());
- /* Fill in CR3 (u32) and IDTR (u16; u64) at the end of the bootstrap code */
- dest[code.len()-14..code.len()-10]
- .copy_from_slice(&(cr3_val as u32).as_bytes());
- dest[code.len()-10..code.len()-8]
- .copy_from_slice(&idtr.0.as_bytes());
- dest[code.len()-8..]
- .copy_from_slice(&idtr.1.as_bytes());
-
- /* Initialize AP mutex (unlocked) and count (0) */
- unsafe {
- ptr::write_volatile(0x6000 as *mut u16, 0);
- }
-
- /* Disable the PICs to prepare for other cores */
- interrupts::disable();
- unsafe {
- io::out::<u8>(io::PIC1_DATA, io::PIC_DISABLE);
- io::out::<u8>(io::PIC2_DATA, io::PIC_DISABLE);
- }
+ mp.startup_all_aps(false, ap_main, ptr::null_mut(), None)
+ .expect_success("Failed to start APs");
+ info!("huh?");
- let mut bsp_apic = LocalApic::init();
- bsp_apic.enable();
-
- /* INIT-SIPI-SIPI: Brings up other cores */
- bsp_apic.send_ipi(IpiDestination::AllButMe,
- IpiTriggerMode::Edge,
- IpiLevel::Assert,
- IpiDeliveryMode::Init,
- 0);
- busy();
-
- /*
- * Wait for cores to get themselves figured out, retrying the SIPI
- * broadcast until everyone is accounted for.
- */
- let mut n_aps: u8 = 0;
- while n_aps < NUM_CORES-1 {
- bsp_apic.send_ipi(IpiDestination::AllButMe,
- IpiTriggerMode::Edge,
- IpiLevel::Assert,
- IpiDeliveryMode::StartUp,
- 0x08);
+ while AP_COUNT.load(Ordering::SeqCst) < NUM_CORES - 1 {
+ info!("{} cores", AP_COUNT.load(Ordering::SeqCst));
busy();
-
- n_aps = unsafe { ptr::read_volatile(0x6001 as *const u8) };
}
- debug!("All cores online");
+ info!("{} APs online", AP_COUNT.load(Ordering::SeqCst));
/* All good, turn interrupts back on and idle */
interrupts::enable();
@@ -146,23 +113,3 @@ pub extern fn efi_main(_handle: uefi::Handle, systab: &'static SystemTable) -> !
unsafe { asm!("hlt"); }
}
}
-
-#[lang = "eh_personality"]
-#[no_mangle]
-pub extern fn eh_personality() { }
-
-#[no_mangle]
-#[panic_handler]
-pub extern fn panic_impl(pi: &PanicInfo) -> ! {
- println!("!!! PANIC !!!");
-
- if let Some(loc) = pi.location() {
- println!("in file {}:{}:{}", loc.file(), loc.line(), loc.column());
- }
-
- if let Some(msg) = pi.message() {
- println!("{}", msg);
- }
-
- loop {}
-}