From 7ae58a11d75f3caec79135da6bde521be2cb45cc Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 1 Sep 2016 16:46:34 -0600 Subject: [PATCH] Remove debugging times, set PIT to slower frequency --- arch/x86_64/src/device/display.rs | 2 +- arch/x86_64/src/interrupt/irq.rs | 5 ----- bootloader/x86_64/initialize.asm | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/x86_64/src/device/display.rs b/arch/x86_64/src/device/display.rs index 1329284..23012ae 100644 --- a/arch/x86_64/src/device/display.rs +++ b/arch/x86_64/src/device/display.rs @@ -102,7 +102,7 @@ pub unsafe fn init(active_table: &mut ActivePageTable) { let start_frame = Frame::containing_address(PhysicalAddress::new(onscreen)); let end_frame = Frame::containing_address(PhysicalAddress::new(onscreen + size * 4 - 1)); for frame in Frame::range_inclusive(start_frame, end_frame) { - active_table.identity_map(frame, entry::HUGE_PAGE /*actually sets PAT for write combining*/ | entry::PRESENT | entry::WRITABLE | entry::NO_EXECUTE); + active_table.identity_map(frame, /*actually sets PAT for write combining*/ entry::HUGE_PAGE | entry::PRESENT | entry::WRITABLE | entry::NO_EXECUTE); } } diff --git a/arch/x86_64/src/interrupt/irq.rs b/arch/x86_64/src/interrupt/irq.rs index acec106..fbc82af 100644 --- a/arch/x86_64/src/interrupt/irq.rs +++ b/arch/x86_64/src/interrupt/irq.rs @@ -15,11 +15,6 @@ unsafe fn slave_ack() { } interrupt!(pit, { - io::outb(0x43, 0); - let low = io::inb(0x40); - let high = io::inb(0x40); - let count = (high as u16) << 8 | (low as u16); - let _missed = 5370 - count; master_ack(); }); diff --git a/bootloader/x86_64/initialize.asm b/bootloader/x86_64/initialize.asm index 2c21e08..20f059b 100644 --- a/bootloader/x86_64/initialize.asm +++ b/bootloader/x86_64/initialize.asm @@ -38,7 +38,7 @@ initialize: .pit: ;initialize the PIT - mov ax, 5370 ;this is the divider for the PIT + mov ax, 65535 ;5370 ;this is the divider for the PIT out 0x40, al rol ax, 8 out 0x40, al