mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 12:37:34 +00:00
Kernel: Abstract platform-specific serial port access from kprintf
kprintf should not really care about the hardware-specific details of each UART or serial port out there, so instead of using x86 specific instructions, let's ensure that we will compile only the relevant code for debug output for a targeted-specific platform.
This commit is contained in:
parent
d5ee03ef5b
commit
a02c9c9569
6 changed files with 109 additions and 28 deletions
17
Kernel/Arch/aarch64/RPi/DebugOutput.cpp
Normal file
17
Kernel/Arch/aarch64/RPi/DebugOutput.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/Arch/DebugOutput.h>
|
||||
#include <Kernel/Arch/aarch64/RPi/UART.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
void debug_output(char ch)
|
||||
{
|
||||
RPi::UART::the().send(ch);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue