Fix warnings

This commit is contained in:
Yash Karandikar 2021-09-16 17:30:15 -05:00
parent fd306dae01
commit 1298fc2bbe
Signed by: karx
GPG key ID: A794DA2529474BA5
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,5 @@
use x86_64::VirtAddr;
use x86_64::instructions::segmentation::Segment;
use x86_64::structures::tss::TaskStateSegment;
use x86_64::structures::gdt::{GlobalDescriptorTable, Descriptor, SegmentSelector};
use lazy_static::lazy_static;
@ -35,12 +36,12 @@ lazy_static! {
}
pub fn init_gdt() {
use x86_64::instructions::segmentation::set_cs;
use x86_64::instructions::segmentation::CS;
use x86_64::instructions::tables::load_tss;
GDT.0.load();
unsafe {
set_cs(GDT.1.code_selector);
CS::set_reg(GDT.1.code_selector);
load_tss(GDT.1.tss_selector);
}
}

View file

@ -1,3 +1,4 @@
#![allow(non_snake_case)]
#![no_std]
#![no_main]