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::{
VirtAddr,
structures::gdt::{GlobalDescriptorTable, Descriptor, SegmentSelector},
structures::tss::TaskStateSegment,
instructions::segmentation::set_cs,
instructions::tables::load_tss,
};
use x86_64::structures::gdt::{Descriptor, GlobalDescriptorTable, SegmentSelector};
use x86_64::structures::tss::TaskStateSegment;
use x86_64::VirtAddr;
pub const DOUBLE_FAULT_IST_INDEX: u16 = 0;
@@ -36,6 +32,9 @@ struct Selectors {
}
pub fn init() {
use x86_64::instructions::segmentation::set_cs;
use x86_64::instructions::tables::load_tss;
GDT.0.load();
unsafe {
set_cs(GDT.1.code_selector);