Merge pull request #48 from SamTebbs33/feature/runtime-testing

Add runtime testing harness
This commit is contained in:
Sam Tebbs 2019-07-09 23:27:44 +01:00 committed by GitHub
commit 811ee30f17
9 changed files with 103 additions and 13 deletions

View file

@ -305,4 +305,5 @@ pub fn init() void {
// Load the TSS
arch.ltr();
log.logInfo("Done\n");
}

View file

@ -122,4 +122,5 @@ pub fn closeInterruptGate(index: u8) void {
pub fn init() void {
log.logInfo("Init idt\n");
arch.lidt(&idt_ptr);
log.logInfo("Done\n");
}

View file

@ -273,6 +273,7 @@ pub fn getFrequency() u32 {
/// Initialise the PIT with a handler to IRQ 0.
///
pub fn init() void {
log.logInfo("Init pit\n");
// Set up counter 0 at 1000hz in a square wave mode counting in binary
const f: u32 = 10000;
setupCounter(OCW_SELECT_COUNTER_0, f, OCW_MODE_SQUARE_WAVE_GENERATOR | OCW_BINARY_COUNT_BINARY);
@ -281,4 +282,5 @@ pub fn init() void {
// Installs 'pitHandler' to IRQ0 (pic.IRQ_PIT)
irq.registerIrq(pic.IRQ_PIT, pitHandler);
log.logInfo("Done\n");
}