Kernel/aarch64: Implement dbgput{str,char} in kprintf.cpp
Also changes the implementation of kernelearlyputstr to call kernelputstr, to deduplicate some logic.
This commit is contained in:
parent
b991cff60f
commit
ee883b839c
Notes:
sideshowbarker
2024-07-17 16:42:19 +09:00
Author: https://github.com/FireFox317 Commit: https://github.com/SerenityOS/serenity/commit/ee883b839c Pull-request: https://github.com/SerenityOS/serenity/pull/16690 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/nico ✅
2 changed files with 16 additions and 24 deletions
|
@ -50,22 +50,6 @@ bool g_pci_access_is_disabled_from_commandline { false };
|
|||
|
||||
}
|
||||
|
||||
// kprintf.cpp
|
||||
void dbgputstr(StringView)
|
||||
{
|
||||
TODO_AARCH64();
|
||||
}
|
||||
|
||||
void dbgputstr(char const*, size_t)
|
||||
{
|
||||
TODO_AARCH64();
|
||||
}
|
||||
|
||||
void dbgputchar(char)
|
||||
{
|
||||
TODO_AARCH64();
|
||||
}
|
||||
|
||||
// x86 init
|
||||
|
||||
multiboot_module_entry_t multiboot_copy_boot_modules_array[16];
|
||||
|
|
|
@ -55,12 +55,20 @@ void kernelcriticalputstr(char const* characters, size_t length)
|
|||
|
||||
void kernelearlyputstr(char const* characters, size_t length)
|
||||
{
|
||||
if (!characters)
|
||||
return;
|
||||
|
||||
auto& uart = Kernel::RPi::UART::the();
|
||||
uart.print_str(characters, length);
|
||||
|
||||
for (size_t i = 0; i < length; ++i)
|
||||
console_out(characters[i]);
|
||||
kernelputstr(characters, length);
|
||||
}
|
||||
|
||||
void dbgputstr(char const* characters, size_t length)
|
||||
{
|
||||
kernelputstr(characters, length);
|
||||
}
|
||||
|
||||
void dbgputstr(StringView view)
|
||||
{
|
||||
dbgputstr(view.characters_without_null_termination(), view.length());
|
||||
}
|
||||
|
||||
void dbgputchar(char ch)
|
||||
{
|
||||
kernelputstr(&ch, 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue