diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-03 15:44:28 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-03 15:44:28 +0100 |
| commit | c7fe1ab6e2f97a7f0bfc6aaf97374f841fb63c0d (patch) | |
| tree | edfef006c63d73ef6b48b537b6f21295db6ffe9a /src/kernel/HALKit/AMD64/HalDebugOutput.cpp | |
| parent | 92bbadf36f8bdffed9090cb345e57fc252c5a133 (diff) | |
feat: syschk, hal{x64}: ATA PIO patches, reworked I/O system.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/HALKit/AMD64/HalDebugOutput.cpp')
| -rw-r--r-- | src/kernel/HALKit/AMD64/HalDebugOutput.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/kernel/HALKit/AMD64/HalDebugOutput.cpp b/src/kernel/HALKit/AMD64/HalDebugOutput.cpp index 37e8b10b..a93d458e 100644 --- a/src/kernel/HALKit/AMD64/HalDebugOutput.cpp +++ b/src/kernel/HALKit/AMD64/HalDebugOutput.cpp @@ -27,6 +27,7 @@ namespace Detail { bool hal_serial_init() { if (kState == kStateReady || kState == kStateTransmit) return true; +#ifdef __DEBUG__ HAL::rt_out8(PORT + 1, 0x00); // Disable all interrupts HAL::rt_out8(PORT + 3, 0x80); // Enable DLAB (set baud rate divisor) HAL::rt_out8(PORT + 0, 0x03); // Set divisor to 3 (lo byte) 38400 baud @@ -43,11 +44,12 @@ namespace Detail { return false; } - kState = kStateReady; - // If serial is not faulty set it in normal operation mode // (not-loopback with IRQs enabled and OUT#1 and OUT#2 bits enabled) HAL::rt_out8(PORT + 4, 0x0F); +#endif + + kState = kStateReady; return true; } @@ -88,7 +90,7 @@ EXTERN_C void ke_utf_io_write(IDevice<const Utf8Char*>* obj, const Utf8Char* byt tmp_str[0] = (bytes[index] > 127) ? '?' : bytes[index]; tmp_str[1] = 0; - cg_render_string(tmp_str, kY, kX, RGB(0xff, 0xff, 0xff)); + cg_render_string(tmp_str, kY, kX, RGB(0x00, 0x00, 0x00)); if (bytes[index] == '\r') { kY += kFontSizeY; @@ -144,7 +146,7 @@ EXTERN_C void ke_io_write(IDevice<const Char*>* obj, const Char* bytes) { tmp_str[0] = bytes[index]; tmp_str[1] = 0; - cg_render_string(tmp_str, kY, kX, RGB(0xff, 0xff, 0xff)); + cg_render_string(tmp_str, kY, kX, RGB(0x00, 0x00, 0x00)); if (bytes[index] == '\r') { kY += kFontSizeY; |
