Use same import structure as in post

This commit is contained in:
Philipp Oppermann
2018-06-18 21:17:42 +02:00
parent 1ed7a4ceb8
commit 0b6174ace6

View File

@@ -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);