Fix for TailQueue and std.log changes

This commit is contained in:
Sam Tebbs 2020-08-23 14:32:32 +01:00
parent fb66e2795f
commit b7c3084f09
24 changed files with 137 additions and 112 deletions

View file

@ -1,5 +1,6 @@
const std = @import("std");
const Allocator = std.mem.Allocator;
const log = std.log.scoped(.x86_arch);
const builtin = @import("builtin");
const cmos = @import("cmos.zig");
const gdt = @import("gdt.zig");
@ -326,16 +327,16 @@ pub fn initTTY(boot_payload: BootPayload) TTY {
/// Allocator.Error.OutOfMemory - There wasn't enough memory in the allocated created to populate the memory profile, consider increasing mem.FIXED_ALLOC_SIZE
///
pub fn initMem(mb_info: BootPayload) Allocator.Error!MemProfile {
std.log.info(.arch_x86, "Init\n", .{});
defer std.log.info(.arch_x86, "Done\n", .{});
log.info("Init\n", .{});
defer log.info("Done\n", .{});
std.log.debug(.arch_x86, "KERNEL_ADDR_OFFSET: 0x{X}\n", .{@ptrToInt(&KERNEL_ADDR_OFFSET)});
std.log.debug(.arch_x86, "KERNEL_STACK_START: 0x{X}\n", .{@ptrToInt(&KERNEL_STACK_START)});
std.log.debug(.arch_x86, "KERNEL_STACK_END: 0x{X}\n", .{@ptrToInt(&KERNEL_STACK_END)});
std.log.debug(.arch_x86, "KERNEL_VADDR_START: 0x{X}\n", .{@ptrToInt(&KERNEL_VADDR_START)});
std.log.debug(.arch_x86, "KERNEL_VADDR_END: 0x{X}\n", .{@ptrToInt(&KERNEL_VADDR_END)});
std.log.debug(.arch_x86, "KERNEL_PHYSADDR_START: 0x{X}\n", .{@ptrToInt(&KERNEL_PHYSADDR_START)});
std.log.debug(.arch_x86, "KERNEL_PHYSADDR_END: 0x{X}\n", .{@ptrToInt(&KERNEL_PHYSADDR_END)});
log.debug("KERNEL_ADDR_OFFSET: 0x{X}\n", .{@ptrToInt(&KERNEL_ADDR_OFFSET)});
log.debug("KERNEL_STACK_START: 0x{X}\n", .{@ptrToInt(&KERNEL_STACK_START)});
log.debug("KERNEL_STACK_END: 0x{X}\n", .{@ptrToInt(&KERNEL_STACK_END)});
log.debug("KERNEL_VADDR_START: 0x{X}\n", .{@ptrToInt(&KERNEL_VADDR_START)});
log.debug("KERNEL_VADDR_END: 0x{X}\n", .{@ptrToInt(&KERNEL_VADDR_END)});
log.debug("KERNEL_PHYSADDR_START: 0x{X}\n", .{@ptrToInt(&KERNEL_PHYSADDR_START)});
log.debug("KERNEL_PHYSADDR_END: 0x{X}\n", .{@ptrToInt(&KERNEL_PHYSADDR_END)});
const mods_count = mb_info.mods_count;
mem.ADDR_OFFSET = @ptrToInt(&KERNEL_ADDR_OFFSET);

View file

@ -1,6 +1,7 @@
const std = @import("std");
const expect = std.testing.expect;
const expectEqual = std.testing.expectEqual;
const log = std.log.scoped(.x86_gdt);
const builtin = @import("builtin");
const is_test = builtin.is_test;
const panic = @import("../../panic.zig").panic;
@ -405,8 +406,8 @@ fn makeGdtEntry(base: u32, limit: u20, access: AccessBits, flags: FlagBits) GdtE
/// Initialise the Global Descriptor table.
///
pub fn init() void {
std.log.info(.gdt, "Init\n", .{});
defer std.log.info(.gdt, "Done\n", .{});
log.info("Init\n", .{});
defer log.info("Done\n", .{});
// Initiate TSS
gdt_entries[TSS_INDEX] = makeGdtEntry(@ptrToInt(&main_tss_entry), @sizeOf(Tss) - 1, TSS_SEGMENT, NULL_FLAGS);
@ -567,7 +568,7 @@ fn rt_loadedGDTSuccess() void {
if (gdt_ptr.base != loaded_gdt.base) {
panic(@errorReturnTrace(), "FAILURE: GDT not loaded properly: 0x{X} != {X}\n", .{ gdt_ptr.base, loaded_gdt.base });
}
std.log.info(.gdt, "Tested loading GDT\n", .{});
log.info("Tested loading GDT\n", .{});
}
///

View file

@ -2,6 +2,7 @@ const std = @import("std");
const expect = std.testing.expect;
const expectEqual = std.testing.expectEqual;
const expectError = std.testing.expectError;
const log = std.log.scoped(.x86_idt);
const builtin = @import("builtin");
const is_test = builtin.is_test;
const panic = @import("../../panic.zig").panic;
@ -178,8 +179,8 @@ pub fn openInterruptGate(index: u8, handler: InterruptHandler) IdtError!void {
/// Initialise the Interrupt descriptor table
///
pub fn init() void {
std.log.info(.idt, "Init\n", .{});
defer std.log.info(.idt, "Done\n", .{});
log.info("Init\n", .{});
defer log.info("Done\n", .{});
idt_ptr.base = @ptrToInt(&idt_entries);
@ -333,7 +334,7 @@ fn rt_loadedIDTSuccess() void {
if (idt_ptr.base != loaded_idt.base) {
panic(@errorReturnTrace(), "FAILURE: IDT not loaded properly: 0x{X} != {X}\n", .{ idt_ptr.base, loaded_idt.base });
}
std.log.info(.idt, " Tested loading IDT\n", .{});
log.info("Tested loading IDT\n", .{});
}
///

View file

@ -4,6 +4,7 @@ const is_test = builtin.is_test;
const expect = std.testing.expect;
const expectEqual = std.testing.expectEqual;
const expectError = std.testing.expectError;
const log = std.log.scoped(.x86_irq);
const build_options = @import("build_options");
const panic = @import("../../panic.zig").panic;
const mock_path = build_options.arch_mock_path;
@ -130,8 +131,8 @@ pub fn registerIrq(irq_num: u8, handler: IrqHandler) IrqError!void {
/// the IDT interrupt gates for each IRQ.
///
pub fn init() void {
std.log.info(.irq, "Init\n", .{});
defer std.log.info(.irq, "Done\n", .{});
log.info("Init\n", .{});
defer log.info("Done\n", .{});
comptime var i = IRQ_OFFSET;
inline while (i < IRQ_OFFSET + 16) : (i += 1) {
@ -246,7 +247,7 @@ fn rt_unregisteredHandlers() void {
}
}
std.log.info(.irq, "Tested registered handlers\n", .{});
log.info("Tested registered handlers\n", .{});
}
///
@ -264,7 +265,7 @@ fn rt_openedIdtEntries() void {
}
}
std.log.info(.irq, "Tested opened IDT entries\n", .{});
log.info("Tested opened IDT entries\n", .{});
}
///

View file

@ -4,6 +4,7 @@ const is_test = builtin.is_test;
const expect = std.testing.expect;
const expectEqual = std.testing.expectEqual;
const expectError = std.testing.expectError;
const log = std.log.scoped(.x86_isr);
const build_options = @import("build_options");
const mock_path = build_options.arch_mock_path;
const syscalls = @import("syscalls.zig");
@ -158,7 +159,7 @@ export fn isrHandler(ctx: *arch.CpuState) usize {
// Regular ISR exception, if there is one registered.
ret_esp = handler(ctx);
} else {
std.log.info(.isr, "State: {X}\n", .{ctx});
log.info("State: {X}\n", .{ctx});
panic(@errorReturnTrace(), "ISR {} ({}) triggered with error code 0x{X} but not registered\n", .{ exception_msg[isr_num], isr_num, ctx.error_code });
}
}
@ -237,8 +238,8 @@ pub fn registerIsr(isr_num: u16, handler: IsrHandler) IsrError!void {
/// Initialise the exception and opening up all the IDT interrupt gates for each exception.
///
pub fn init() void {
std.log.info(.isr, "Init\n", .{});
defer std.log.info(.isr, "Done\n", .{});
log.info("Init\n", .{});
defer log.info("Done\n", .{});
comptime var i = 0;
inline while (i < 32) : (i += 1) {
@ -384,7 +385,7 @@ fn rt_unregisteredHandlers() void {
panic(@errorReturnTrace(), "FAILURE: Pre-testing failed for syscall: {}\n", .{h});
}
std.log.info(.isr, "Tested registered handlers\n", .{});
log.info("Tested registered handlers\n", .{});
}
///
@ -402,7 +403,7 @@ fn rt_openedIdtEntries() void {
}
}
std.log.info(.isr, "Tested opened IDT entries\n", .{});
log.info("Tested opened IDT entries\n", .{});
}
///

View file

@ -3,10 +3,10 @@ const build_options = @import("build_options");
const std = @import("std");
const Allocator = std.mem.Allocator;
const testing = std.testing;
const log = std.log.scoped(.x86_keyboard);
const irq = @import("irq.zig");
const pic = @import("pic.zig");
const arch = if (builtin.is_test) @import(build_options.arch_mock_path ++ "arch_mock.zig") else @import("arch.zig");
const log = if (builtin.is_test) @import(build_options.arch_mock_path ++ "log_mock.zig") else @import("../../log.zig");
const panic = @import("../../panic.zig").panic;
const kb = @import("../../keyboard.zig");
const Keyboard = kb.Keyboard;
@ -164,7 +164,7 @@ fn onKeyEvent(ctx: *arch.CpuState) usize {
const scan_code = readKeyboardBuffer();
if (parseScanCode(scan_code)) |action| {
if (!keyboard.writeKey(action)) {
std.log.notice(.x86_keyboard, "No room for keyboard action {}\n", .{action});
log.notice("No room for keyboard action {}\n", .{action});
}
}
return @ptrToInt(ctx);

View file

@ -2,6 +2,7 @@ const std = @import("std");
const testing = std.testing;
const expectEqual = testing.expectEqual;
const expect = testing.expect;
const log = std.log.scoped(.x86_paging);
const builtin = @import("builtin");
const is_test = builtin.is_test;
const panic = @import("../../panic.zig").panic;
@ -383,7 +384,7 @@ pub fn unmap(virtual_start: usize, virtual_end: usize, dir: *Directory) (Allocat
/// IN state: *arch.CpuState - The CPU's state when the fault occurred.
///
fn pageFault(state: *arch.CpuState) u32 {
std.log.info(.paging, "State: {X}\n", .{state});
log.info("State: {X}\n", .{state});
var cr0 = asm volatile ("mov %%cr0, %[cr0]"
: [cr0] "=r" (-> u32)
);
@ -396,7 +397,7 @@ fn pageFault(state: *arch.CpuState) u32 {
var cr4 = asm volatile ("mov %%cr4, %[cr4]"
: [cr4] "=r" (-> u32)
);
std.log.info(.paging, "CR0: 0x{X}, CR2: 0x{X}, CR3: 0x{X}, CR4: 0x{X}\n", .{ cr0, cr2, cr3, cr4 });
log.info("CR0: 0x{X}, CR2: 0x{X}, CR3: 0x{X}, CR4: 0x{X}\n", .{ cr0, cr2, cr3, cr4 });
@panic("Page fault");
}
@ -407,8 +408,8 @@ fn pageFault(state: *arch.CpuState) u32 {
/// IN mem_profile: *const MemProfile - The memory profile of the system and kernel
///
pub fn init(mem_profile: *const MemProfile) void {
std.log.info(.paging, "Init\n", .{});
defer std.log.info(.paging, "Done\n", .{});
log.info("Init\n", .{});
defer log.info("Done\n", .{});
isr.registerIsr(isr.PAGE_FAULT, if (build_options.test_mode == .Initialisation) rt_pageFault else pageFault) catch |e| {
panic(@errorReturnTrace(), "Failed to register page fault ISR: {}\n", .{e});
@ -594,7 +595,7 @@ fn rt_accessUnmappedMem(v_end: u32) void {
var ptr = @intToPtr(*u8, v_end);
var value = ptr.*;
// Need this as in release builds the above is optimised out so it needs to be use
std.log.emerg(.paging, "FAILURE: Value: {}\n", .{value});
log.emerg("FAILURE: Value: {}\n", .{value});
// This is the label that we return to after processing the page fault
asm volatile (
\\.global rt_fault_callback
@ -603,7 +604,7 @@ fn rt_accessUnmappedMem(v_end: u32) void {
if (!faulted) {
panic(@errorReturnTrace(), "FAILURE: Paging should have faulted\n", .{});
}
std.log.info(.paging, "Tested accessing unmapped memory\n", .{});
log.info("Tested accessing unmapped memory\n", .{});
}
fn rt_accessMappedMem(v_end: u32) void {
@ -619,7 +620,7 @@ fn rt_accessMappedMem(v_end: u32) void {
if (faulted) {
panic(@errorReturnTrace(), "FAILURE: Paging shouldn't have faulted\n", .{});
}
std.log.info(.paging, "Tested accessing mapped memory\n", .{});
log.info("Tested accessing mapped memory\n", .{});
}
pub fn runtimeTests(v_end: u32) void {

View file

@ -1,6 +1,7 @@
const std = @import("std");
const expect = std.testing.expect;
const expectEqual = std.testing.expectEqual;
const log = std.log.scoped(.x86_pic);
const builtin = @import("builtin");
const is_test = builtin.is_test;
const build_options = @import("build_options");
@ -431,8 +432,8 @@ pub fn clearMask(irq_num: u8) void {
/// by Intel up to 0x1F. So this will move the IRQs from 0x00-0x0F to 0x20-0x2F.
///
pub fn init() void {
std.log.info(.pic, "Init\n", .{});
defer std.log.info(.pic, "Done\n", .{});
log.info("Init\n", .{});
defer log.info("Done\n", .{});
// Initiate
sendCommandMaster(ICW1_INITIALISATION | ICW1_EXPECT_ICW4);
@ -823,7 +824,7 @@ fn rt_picAllMasked() void {
panic(@errorReturnTrace(), "FAILURE: Slave masks are not set, found: {}\n", .{readDataSlave()});
}
std.log.info(.pic, "Tested masking\n", .{});
log.info("Tested masking\n", .{});
}
///

View file

@ -5,6 +5,7 @@ const is_test = builtin.is_test;
const expect = std.testing.expect;
const expectEqual = std.testing.expectEqual;
const expectError = std.testing.expectError;
const log = std.log.scoped(.x86_pit);
const build_options = @import("build_options");
const mock_path = build_options.arch_mock_path;
const arch = if (is_test) @import(mock_path ++ "arch_mock.zig") else @import("arch.zig");
@ -362,8 +363,8 @@ pub fn getFrequency() u32 {
/// Initialise the PIT with a handler to IRQ 0.
///
pub fn init() void {
std.log.info(.pit, "Init\n", .{});
defer std.log.info(.pit, "Done\n", .{});
log.info("Init\n", .{});
defer log.info("Done\n", .{});
// Set up counter 0 at 10000hz in a square wave mode counting in binary
const freq: u32 = 10000;
@ -371,7 +372,7 @@ pub fn init() void {
panic(@errorReturnTrace(), "Invalid frequency: {}\n", .{freq});
};
std.log.debug(.pit, "Set frequency at: {}Hz, real frequency: {}Hz\n", .{ freq, getFrequency() });
log.debug("Set frequency at: {}Hz, real frequency: {}Hz\n", .{ freq, getFrequency() });
// Installs 'pitHandler' to IRQ0 (pic.IRQ_PIT)
irq.registerIrq(pic.IRQ_PIT, pitHandler) catch |err| switch (err) {
@ -549,7 +550,7 @@ fn rt_waitTicks() void {
panic(@errorReturnTrace(), "FAILURE: Waiting failed. difference: {}, previous_count: {}. Epsilon: {}\n", .{ difference, previous_count, epsilon });
}
std.log.info(.pit, "Tested wait ticks\n", .{});
log.info("Tested wait ticks\n", .{});
}
///
@ -576,7 +577,7 @@ fn rt_waitTicks2() void {
// Reset ticks
ticks = 0;
std.log.info(.pit, "Tested wait ticks 2\n", .{});
log.info("Tested wait ticks 2\n", .{});
}
///
@ -621,7 +622,7 @@ fn rt_initCounter_0() void {
panic(@errorReturnTrace(), "FAILURE: Operating mode don't not set properly. Found: {}, expecting: {}\n", .{ actual_mode, expected_mode });
}
std.log.info(.pit, "Tested init\n", .{});
log.info("Tested init\n", .{});
}
///

View file

@ -4,6 +4,7 @@ const is_test = builtin.is_test;
const expect = std.testing.expect;
const expectEqual = std.testing.expectEqual;
const expectError = std.testing.expectError;
const log = std.log.scoped(.x86_rtc);
const build_options = @import("build_options");
const mock_path = build_options.arch_mock_path;
const arch = if (is_test) @import(mock_path ++ "arch_mock.zig") else @import("arch.zig");
@ -265,8 +266,8 @@ fn enableInterrupts() void {
/// Initialise the RTC.
///
pub fn init() void {
std.log.info(.rtc, "Init\n", .{});
defer std.log.info(.rtc, "Done\n", .{});
log.info("Init\n", .{});
defer log.info("Done\n", .{});
// Register the interrupt handler
irq.registerIrq(pic.IRQ_REAL_TIME_CLOCK, rtcHandler) catch |err| switch (err) {
@ -726,7 +727,7 @@ fn rt_init() void {
panic(@errorReturnTrace(), "FAILURE: Interrupts not enabled\n", .{});
}
std.log.info(.rtc, "Tested init\n", .{});
log.info("Tested init\n", .{});
}
///
@ -741,7 +742,7 @@ fn rt_interrupts() void {
panic(@errorReturnTrace(), "FAILURE: No interrupt happened\n", .{});
}
std.log.info(.rtc, "Tested interrupts\n", .{});
log.info("Tested interrupts\n", .{});
}
///

View file

@ -1,4 +1,5 @@
const std = @import("std");
const log = std.log.scoped(.x86_syscalls);
const builtin = @import("builtin");
const is_test = builtin.is_test;
const build_options = @import("build_options");
@ -57,10 +58,10 @@ fn handle(ctx: *arch.CpuState) u32 {
if (handlers[syscall]) |handler| {
ctx.eax = handler(ctx, syscallArg(ctx, 0), syscallArg(ctx, 1), syscallArg(ctx, 2), syscallArg(ctx, 3), syscallArg(ctx, 4));
} else {
std.log.warn(.syscall, "Syscall {} triggered but not registered\n", .{syscall});
log.warn("Syscall {} triggered but not registered\n", .{syscall});
}
} else {
std.log.warn(.syscall, "Syscall {} is invalid\n", .{syscall});
log.warn("Syscall {} is invalid\n", .{syscall});
}
return @ptrToInt(ctx);
}
@ -242,8 +243,8 @@ inline fn syscallArg(ctx: *arch.CpuState, comptime arg_idx: u32) u32 {
/// Initialise syscalls. Registers the isr associated with INTERRUPT.
///
pub fn init() void {
std.log.info(.syscall, "Init\n", .{});
defer std.log.info(.syscall, "Done\n", .{});
log.info("Init\n", .{});
defer log.info("Done\n", .{});
isr.registerIsr(INTERRUPT, handle) catch unreachable;
@ -330,5 +331,5 @@ fn runtimeTests() void {
panic(@errorReturnTrace(), "FAILURE syscall5\n", .{});
}
std.log.info(.syscall, "Tested all args\n", .{});
log.info("Tested all args\n", .{});
}

View file

@ -5,6 +5,7 @@ const is_test = builtin.is_test;
const expect = std.testing.expect;
const expectEqual = std.testing.expectEqual;
const expectError = std.testing.expectError;
const log = std.log.scoped(.x86_tty);
const build_options = @import("build_options");
const mock_path = build_options.mock_path;
const vga = if (is_test) @import("../../" ++ mock_path ++ "vga_mock.zig") else @import("vga.zig");
@ -380,7 +381,7 @@ pub fn pageUp() void {
page_index += 1;
// Bounds have been checked, so shouldn't error
videoCopy(START_OF_DISPLAYABLE_REGION, pages[page_index][0..TOTAL_CHAR_ON_PAGE], TOTAL_CHAR_ON_PAGE) catch |e| {
std.log.crit(.tty, "Error moving page up. Error: {}\n", .{e});
log.crit("Error moving page up. Error: {}\n", .{e});
};
vga.disableCursor();
}
@ -396,7 +397,7 @@ pub fn pageDown() void {
page_index -= 1;
// Bounds have been checked, so shouldn't error
videoCopy(START_OF_DISPLAYABLE_REGION, pages[page_index][0..TOTAL_CHAR_ON_PAGE], TOTAL_CHAR_ON_PAGE) catch |e| {
std.log.crit(.tty, "Error moving page down. Error: {}\n", .{e});
log.crit("Error moving page down. Error: {}\n", .{e});
};
if (page_index == 0) {
@ -416,7 +417,7 @@ pub fn clearScreen() void {
// Move all the rows up
// This is within bounds, so shouldn't error
pagesMoveRowsUp(ROW_TOTAL) catch |e| {
std.log.crit(.tty, "Error moving all pages up. Error: {}\n", .{e});
log.crit("Error moving all pages up. Error: {}\n", .{e});
};
// Clear the screen
@ -535,13 +536,13 @@ pub fn init() void {
// Set the top 7 rows blank
setVideoBuffer(blank, START_OF_DISPLAYABLE_REGION) catch |e| {
std.log.crit(.tty, "Error clearing the top 7 rows. Error: {}\n", .{e});
log.crit("Error clearing the top 7 rows. Error: {}\n", .{e});
};
row += @truncate(u8, row_offset + ROW_MIN);
} else {
// Clear the screen
setVideoBuffer(blank, VIDEO_BUFFER_SIZE) catch |e| {
std.log.crit(.tty, "Error clearing the screen. Error: {}\n", .{e});
log.crit("Error clearing the screen. Error: {}\n", .{e});
};
// Set the row to below the logo
row = ROW_MIN;
@ -900,7 +901,7 @@ test "putEntryAt in displayable region page_index is not 0" {
column = @truncate(u8, vga.WIDTH) - @truncate(u8, text.len);
row = ROW_MIN - 1;
writeString(text) catch |e| {
std.log.crit(.tty, "Unable to print page number, printing out of bounds. Error: {}\n", .{e});
log.crit("Unable to print page number, printing out of bounds. Error: {}\n", .{e});
};
column = column_temp;
row = row_temp;
@ -1558,7 +1559,7 @@ test "pageUp bottom page" {
column = @truncate(u8, vga.WIDTH) - @truncate(u8, text.len);
row = ROW_MIN - 1;
writeString(text) catch |e| {
std.log.crit(.tty, "Unable to print page number, printing out of bounds. Error: {}\n", .{e});
log.crit("Unable to print page number, printing out of bounds. Error: {}\n", .{e});
};
column = column_temp;
row = row_temp;
@ -1638,7 +1639,7 @@ test "pageDown top page" {
column = @truncate(u8, vga.WIDTH) - @truncate(u8, text.len);
row = ROW_MIN - 1;
writeString(text) catch |e| {
std.log.crit(.tty, "Unable to print page number, printing out of bounds. Error: {}\n", .{e});
log.crit("Unable to print page number, printing out of bounds. Error: {}\n", .{e});
};
column = column_temp;
row = row_temp;
@ -2044,7 +2045,7 @@ fn rt_initialisedGlobals() void {
panic(@errorReturnTrace(), "Screen all blank, should have logo and page number\n", .{});
}
std.log.info(.tty, "Tested globals\n", .{});
log.info("Tested globals\n", .{});
}
///
@ -2096,7 +2097,7 @@ fn rt_printString() void {
// Clear the text
writeString(clear_text) catch |e| panic(@errorReturnTrace(), "Failed to print string to tty: {}\n", .{e});
std.log.info(.tty, "Tested printing\n", .{});
log.info("Tested printing\n", .{});
}
///

View file

@ -2,6 +2,7 @@ const std = @import("std");
const builtin = @import("builtin");
const is_test = builtin.is_test;
const expectEqual = std.testing.expectEqual;
const log = std.log.scoped(.x86_vga);
const build_options = @import("build_options");
const arch = if (is_test) @import(build_options.arch_mock_path ++ "arch_mock.zig") else @import("arch.zig");
const panic = @import("../../panic.zig").panic;
@ -283,8 +284,8 @@ pub fn setCursorShape(shape: CursorShape) void {
/// Initialise the VGA text mode. This sets the cursor and underline shape.
///
pub fn init() void {
std.log.info(.vga, "Init\n", .{});
defer std.log.info(.vga, "Done\n", .{});
log.info("Init\n", .{});
defer log.info("Done\n", .{});
// Set the maximum scan line to 0x0F
sendPortData(REG_MAXIMUM_SCAN_LINE, CURSOR_SCANLINE_END);
@ -536,7 +537,7 @@ fn rt_correctMaxScanLine() void {
panic(@errorReturnTrace(), "FAILURE: Max scan line not {}, found {}\n", .{ CURSOR_SCANLINE_END, max_scan_line });
}
std.log.info(.vga, "Tested max scan line\n", .{});
log.info("Tested max scan line\n", .{});
}
///
@ -555,7 +556,7 @@ fn rt_correctCursorShape() void {
panic(@errorReturnTrace(), "FAILURE: Cursor scanline are incorrect. Start: {}, end: {}\n", .{ cursor_start, cursor_end });
}
std.log.info(.vga, "Tested cursor shape\n", .{});
log.info("Tested cursor shape\n", .{});
}
///
@ -587,7 +588,7 @@ fn rt_setCursorGetCursor() void {
// Restore the previous x and y
updateCursor(prev_x_loc, prev_y_loc);
std.log.info(.vga, "Tested updating cursor\n", .{});
log.info("Tested updating cursor\n", .{});
}
///