Remove debugging times, set PIT to slower frequency
This commit is contained in:
parent
817638b7aa
commit
7ae58a11d7
|
@ -102,7 +102,7 @@ pub unsafe fn init(active_table: &mut ActivePageTable) {
|
||||||
let start_frame = Frame::containing_address(PhysicalAddress::new(onscreen));
|
let start_frame = Frame::containing_address(PhysicalAddress::new(onscreen));
|
||||||
let end_frame = Frame::containing_address(PhysicalAddress::new(onscreen + size * 4 - 1));
|
let end_frame = Frame::containing_address(PhysicalAddress::new(onscreen + size * 4 - 1));
|
||||||
for frame in Frame::range_inclusive(start_frame, end_frame) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,6 @@ unsafe fn slave_ack() {
|
||||||
}
|
}
|
||||||
|
|
||||||
interrupt!(pit, {
|
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();
|
master_ack();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ initialize:
|
||||||
|
|
||||||
.pit:
|
.pit:
|
||||||
;initialize the 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
|
out 0x40, al
|
||||||
rol ax, 8
|
rol ax, 8
|
||||||
out 0x40, al
|
out 0x40, al
|
||||||
|
|
Loading…
Reference in a new issue