mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Remove unneeded pubs
This commit is contained in:
@@ -67,13 +67,13 @@ impl Entry {
|
|||||||
pub struct EntryOptions(BitField<u16>);
|
pub struct EntryOptions(BitField<u16>);
|
||||||
|
|
||||||
impl EntryOptions {
|
impl EntryOptions {
|
||||||
pub fn minimal() -> Self {
|
fn minimal() -> Self {
|
||||||
let mut options = BitField::new(0);
|
let mut options = BitField::new(0);
|
||||||
options.set_range(9..12, 0b111); // required 'one' bits
|
options.set_range(9..12, 0b111); // required 'one' bits
|
||||||
EntryOptions(options)
|
EntryOptions(options)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new() -> Self {
|
fn new() -> Self {
|
||||||
let mut options = Self::minimal();
|
let mut options = Self::minimal();
|
||||||
options.set_present(true);
|
options.set_present(true);
|
||||||
options
|
options
|
||||||
|
|||||||
@@ -68,22 +68,23 @@ pub fn init() {
|
|||||||
IDT.load();
|
IDT.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub extern "C" fn divide_by_zero_handler() -> ! {
|
extern "C" fn divide_by_zero_handler() -> ! {
|
||||||
unsafe { print_error(format_args!("EXCEPTION: DIVIDE BY ZERO")) };
|
unsafe { print_error(format_args!("EXCEPTION: DIVIDE BY ZERO")) };
|
||||||
loop {}
|
loop {}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub extern "C" fn double_fault_handler() -> ! {
|
extern "C" fn double_fault_handler() -> ! {
|
||||||
unsafe { print_error(format_args!("EXCEPTION: DOUBLE FAULT")) };
|
unsafe { print_error(format_args!("EXCEPTION: DOUBLE FAULT")) };
|
||||||
|
unsafe { asm!("iretq")};
|
||||||
loop {}
|
loop {}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub extern "C" fn general_protection_fault_handler() -> ! {
|
extern "C" fn general_protection_fault_handler() -> ! {
|
||||||
unsafe { print_error(format_args!("EXCEPTION: GENERAL PROTECTION FAULT")) };
|
unsafe { print_error(format_args!("EXCEPTION: GENERAL PROTECTION FAULT")) };
|
||||||
loop {}
|
loop {}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub extern "C" fn page_fault_handler() -> ! {
|
extern "C" fn page_fault_handler() -> ! {
|
||||||
unsafe { print_error(format_args!("EXCEPTION: PAGE FAULT")) };
|
unsafe { print_error(format_args!("EXCEPTION: PAGE FAULT")) };
|
||||||
loop {}
|
loop {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user