mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 06:18:12 +00:00
Kernel: Add aarch64 version of kprintf.cpp
This allows us to use the AK formatting functions in the aarch64 Kernel. Also add FIXME to make sure that this file will be removed when the proper abstractions are in place in the normal Kernel/kprintf.cpp.
This commit is contained in:
parent
b3346aa08d
commit
b9944ca905
3 changed files with 38 additions and 19 deletions
|
@ -212,24 +212,5 @@ bool safe_atomic_store_relaxed(u32 volatile*, u32)
|
|||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
FlatPtr kernel_mapping_base;
|
||||
|
||||
void kernelputstr(char const*, size_t);
|
||||
void kernelputstr(char const*, size_t)
|
||||
{
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
void kernelcriticalputstr(char const*, size_t);
|
||||
void kernelcriticalputstr(char const*, size_t)
|
||||
{
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
void kernelearlyputstr(char const*, size_t);
|
||||
void kernelearlyputstr(char const*, size_t)
|
||||
{
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
|
37
Kernel/Arch/aarch64/kprintf.cpp
Normal file
37
Kernel/Arch/aarch64/kprintf.cpp
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Timon Kruiper <timonkruiper@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/Arch/aarch64/RPi/UART.h>
|
||||
#include <Kernel/kstdio.h>
|
||||
|
||||
// FIXME: Merge the code in this file with Kernel/kprintf.cpp once the proper abstractions are in place.
|
||||
|
||||
void kernelputstr(char const* characters, size_t)
|
||||
{
|
||||
if (!characters)
|
||||
return;
|
||||
|
||||
auto& uart = Prekernel::UART::the();
|
||||
uart.print_str(characters);
|
||||
}
|
||||
|
||||
void kernelcriticalputstr(char const* characters, size_t)
|
||||
{
|
||||
if (!characters)
|
||||
return;
|
||||
|
||||
auto& uart = Prekernel::UART::the();
|
||||
uart.print_str(characters);
|
||||
}
|
||||
|
||||
void kernelearlyputstr(char const* characters, size_t)
|
||||
{
|
||||
if (!characters)
|
||||
return;
|
||||
|
||||
auto& uart = Prekernel::UART::the();
|
||||
uart.print_str(characters);
|
||||
}
|
|
@ -415,6 +415,7 @@ else()
|
|||
Arch/aarch64/BootPPMParser.cpp
|
||||
Arch/aarch64/CrashHandler.cpp
|
||||
Arch/aarch64/Dummy.cpp
|
||||
Arch/aarch64/kprintf.cpp
|
||||
Arch/aarch64/MainIdRegister.cpp
|
||||
Arch/aarch64/PageDirectory.cpp
|
||||
Arch/aarch64/ScopedCritical.cpp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue