mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Use same import structure as in post
This commit is contained in:
13
src/gdt.rs
13
src/gdt.rs
@@ -1,10 +1,6 @@
|
|||||||
use x86_64::{
|
use x86_64::structures::gdt::{Descriptor, GlobalDescriptorTable, SegmentSelector};
|
||||||
VirtAddr,
|
use x86_64::structures::tss::TaskStateSegment;
|
||||||
structures::gdt::{GlobalDescriptorTable, Descriptor, SegmentSelector},
|
use x86_64::VirtAddr;
|
||||||
structures::tss::TaskStateSegment,
|
|
||||||
instructions::segmentation::set_cs,
|
|
||||||
instructions::tables::load_tss,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const DOUBLE_FAULT_IST_INDEX: u16 = 0;
|
pub const DOUBLE_FAULT_IST_INDEX: u16 = 0;
|
||||||
|
|
||||||
@@ -36,6 +32,9 @@ struct Selectors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn init() {
|
pub fn init() {
|
||||||
|
use x86_64::instructions::segmentation::set_cs;
|
||||||
|
use x86_64::instructions::tables::load_tss;
|
||||||
|
|
||||||
GDT.0.load();
|
GDT.0.load();
|
||||||
unsafe {
|
unsafe {
|
||||||
set_cs(GDT.1.code_selector);
|
set_cs(GDT.1.code_selector);
|
||||||
|
|||||||
Reference in New Issue
Block a user