Merge branch 'post-07-switch-pic-crate' into post-07

This commit is contained in:
Philipp Oppermann
2021-05-17 12:43:49 +02:00
3 changed files with 9 additions and 15 deletions

16
Cargo.lock generated
View File

@@ -21,7 +21,7 @@ dependencies = [
"bootloader",
"lazy_static",
"pc-keyboard",
"pic8259_simple",
"pic8259",
"spin",
"uart_16550",
"volatile 0.2.7",
@@ -34,12 +34,6 @@ version = "0.9.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfe7a297d22859b1cb0b939cfa0b01288d77804c8544acefd2c1135135587f7d"
[[package]]
name = "cpuio"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d531514efb06912141fa65967447de805691b685a7565c87d1765afe34a98aa7"
[[package]]
name = "lazy_static"
version = "1.4.0"
@@ -56,12 +50,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c6f2d937e3b8d63449b01401e2bae4041bc9dd1129c2e3e0d239407cf6635ac"
[[package]]
name = "pic8259_simple"
version = "0.2.0"
name = "pic8259"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af2a5497fb8e59bf8015f67b7dff238d75ef445e03f23edac24ac3a8f09be952"
checksum = "08cc920d83ee33c0f9b73aa441e75468bf2d10c959a3eb6260cf720b05ac91a1"
dependencies = [
"cpuio",
"x86_64",
]
[[package]]

View File

@@ -18,7 +18,7 @@ volatile = "0.2.6"
spin = "0.5.2"
x86_64 = "0.14.2"
uart_16550 = "0.2.0"
pic8259_simple = "0.2.0"
pic8259 = "0.10.1"
pc-keyboard = "0.5.0"
[dependencies.lazy_static]

View File

@@ -1,6 +1,6 @@
use crate::{gdt, print, println};
use lazy_static::lazy_static;
use pic8259_simple::ChainedPics;
use pic8259::ChainedPics;
use spin;
use x86_64::structures::idt::{InterruptDescriptorTable, InterruptStackFrame};
@@ -57,7 +57,7 @@ extern "x86-interrupt" fn double_fault_handler(
panic!("EXCEPTION: DOUBLE FAULT\n{:#?}", stack_frame);
}
extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: &mut InterruptStackFrame) {
extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: InterruptStackFrame) {
print!(".");
unsafe {
PICS.lock()
@@ -65,7 +65,7 @@ extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: &mut InterruptSt
}
}
extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: &mut InterruptStackFrame) {
extern "x86-interrupt" fn keyboard_interrupt_handler(_stack_frame: InterruptStackFrame) {
use pc_keyboard::{layouts, DecodedKey, HandleControl, Keyboard, ScancodeSet1};
use spin::Mutex;
use x86_64::instructions::port::Port;