diff options
| author | Tianhao Wang <wth@riseup.net> | 2024-02-01 15:10:11 +0100 |
|---|---|---|
| committer | Tianhao Wang <shrik3@mailbox.org> | 2024-06-11 15:13:37 +0200 |
| commit | c01e440d014253fd4cae9f642c949720a54baf4b (patch) | |
| tree | 68d9fc26ccf2f124702b2c2a000892c344f203fe /src/lib.rs | |
| parent | 753955dbb4e6c77b9c56c659fe766a867c575023 (diff) | |
basic interrupt/PIC support
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -7,6 +7,9 @@ mod io; mod machine; use core::panic::PanicInfo; use machine::cgascr::CGAScreen; +use machine::interrupt; +use arch::x86_64::interrupt::pic_8259; +use arch::x86_64::interrupt::pic_8259::PicDeviceInt; #[cfg(not(test))] #[panic_handler] @@ -25,5 +28,9 @@ pub extern "C" fn _entry() -> ! { println!(" `-.-' \\ )-`( , o o)"); println!(" `- \\`_`\"'-"); println!("it works!"); + + // testing interrupt/PIC + pic_8259::allow(PicDeviceInt::KEYBOARD); + interrupt::interrupt_enable(); loop {} } |
