mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Run rustfmt
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use lazy_static::lazy_static;
|
||||
use x86_64::structures::gdt::{Descriptor, GlobalDescriptorTable, SegmentSelector};
|
||||
use x86_64::structures::tss::TaskStateSegment;
|
||||
use x86_64::VirtAddr;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
pub const DOUBLE_FAULT_IST_INDEX: u16 = 0;
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
#![cfg(not(windows))]
|
||||
|
||||
use crate::{gdt, print, println};
|
||||
use lazy_static::lazy_static;
|
||||
use pic8259_simple::ChainedPics;
|
||||
use spin;
|
||||
use x86_64::structures::idt::{ExceptionStackFrame, InterruptDescriptorTable, PageFaultErrorCode};
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
pub const PIC_1_OFFSET: u8 = 32;
|
||||
pub const PIC_2_OFFSET: u8 = PIC_1_OFFSET + 8;
|
||||
@@ -74,9 +74,9 @@ extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: &mut ExceptionSt
|
||||
}
|
||||
|
||||
extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: &mut ExceptionStackFrame) {
|
||||
use x86_64::instructions::port::Port;
|
||||
use pc_keyboard::{Keyboard, ScancodeSet1, DecodedKey, layouts};
|
||||
use pc_keyboard::{layouts, DecodedKey, Keyboard, ScancodeSet1};
|
||||
use spin::Mutex;
|
||||
use x86_64::instructions::port::Port;
|
||||
|
||||
lazy_static! {
|
||||
static ref KEYBOARD: Mutex<Keyboard<layouts::Us104Key, ScancodeSet1>> =
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#![cfg_attr(not(test), no_std)] // don't link the Rust standard library
|
||||
#![feature(abi_x86_interrupt)]
|
||||
|
||||
pub mod vga_buffer;
|
||||
pub mod gdt;
|
||||
pub mod interrupts;
|
||||
pub mod serial;
|
||||
pub mod vga_buffer;
|
||||
|
||||
pub unsafe fn exit_qemu() {
|
||||
use x86_64::instructions::port::Port;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use lazy_static::lazy_static;
|
||||
use spin::Mutex;
|
||||
use uart_16550::SerialPort;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref SERIAL1: Mutex<SerialPort> = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use core::fmt;
|
||||
use lazy_static::lazy_static;
|
||||
use spin::Mutex;
|
||||
use volatile::Volatile;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
lazy_static! {
|
||||
/// A global `Writer` instance that can be used for printing to the VGA text buffer.
|
||||
|
||||
Reference in New Issue
Block a user