1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:57:45 +00:00

Kernel: Move TrapFrame into its own header on aarch64

This commit is contained in:
Filiph Sandström 2022-08-06 04:16:24 +02:00 committed by Sam Atkins
parent 4aaf38e4f7
commit 99ae4fa161
7 changed files with 88 additions and 20 deletions

View file

@ -4,11 +4,24 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Types.h>
#include <Kernel/Arch/aarch64/RPi/UART.h>
#include <Kernel/Graphics/Console/BootFramebufferConsole.h>
#include <Kernel/kstdio.h>
// FIXME: Merge the code in this file with Kernel/kprintf.cpp once the proper abstractions are in place.
namespace Kernel {
extern Atomic<Graphics::Console*> g_boot_console;
}
static void console_out(char ch)
{
if (auto* boot_console = g_boot_console.load()) {
boot_console->write(ch, true);
}
}
void kernelputstr(char const* characters, size_t length)
{
if (!characters)
@ -16,6 +29,9 @@ void kernelputstr(char const* characters, size_t length)
auto& uart = Kernel::RPi::UART::the();
uart.print_str(characters, length);
for (size_t i = 0; i < length; ++i)
console_out(characters[i]);
}
void kernelcriticalputstr(char const* characters, size_t length)