Merge pull request #48 from SamTebbs33/feature/runtime-testing
Add runtime testing harness
This commit is contained in:
commit
811ee30f17
9 changed files with 103 additions and 13 deletions
|
@ -305,4 +305,5 @@ pub fn init() void {
|
|||
|
||||
// Load the TSS
|
||||
arch.ltr();
|
||||
log.logInfo("Done\n");
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -32,10 +32,11 @@ pub export fn kmain(mb_info: *multiboot.multiboot_info_t, mb_magic: u32) void {
|
|||
|
||||
log.logInfo("Init arch " ++ @tagName(builtin.arch) ++ "\n");
|
||||
arch.init(&mem_profile, &fixed_allocator.allocator);
|
||||
log.logInfo("Arch init done\n");
|
||||
vga.init();
|
||||
tty.init();
|
||||
|
||||
log.logInfo("Finished init\n");
|
||||
log.logInfo("Init done\n");
|
||||
tty.print("Hello Pluto from kernel :)\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -644,6 +644,7 @@ pub fn init() void {
|
|||
printLogo();
|
||||
displayPageNumber();
|
||||
updateCursor();
|
||||
log.logInfo("Done\n");
|
||||
}
|
||||
|
||||
fn resetGlobals() void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue