mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:57:34 +00:00
Kernel: Add temporary debug printing utilities for Aarch64
Added dbgln() and warnln() debug functions to help bootstraping. Eventually they are going to be replaced by AK/Format.h implementation.
This commit is contained in:
parent
0329a37271
commit
82a73b8499
3 changed files with 36 additions and 0 deletions
20
Kernel/Prekernel/Arch/aarch64/Utils.cpp
Normal file
20
Kernel/Prekernel/Arch/aarch64/Utils.cpp
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021, Marcin Undak <mcinek@gmail.com>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <Kernel/Prekernel/Arch/aarch64/UART.h>
|
||||||
|
#include <Kernel/Prekernel/Arch/aarch64/Utils.h>
|
||||||
|
|
||||||
|
void Prekernel::dbgln(const char* text)
|
||||||
|
{
|
||||||
|
auto& uart = Prekernel::UART::the();
|
||||||
|
uart.print_str(text);
|
||||||
|
uart.print_str("\r\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void Prekernel::warnln(const char* text)
|
||||||
|
{
|
||||||
|
dbgln(text);
|
||||||
|
}
|
15
Kernel/Prekernel/Arch/aarch64/Utils.h
Normal file
15
Kernel/Prekernel/Arch/aarch64/Utils.h
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021, Marcin Undak <mcinek@gmail.com>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace Prekernel {
|
||||||
|
|
||||||
|
// FIXME: to be replaced by real implementation from AK/Format.h
|
||||||
|
void dbgln(const char* text);
|
||||||
|
void warnln(const char* text);
|
||||||
|
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ if ("${SERENITY_ARCH}" STREQUAL "aarch64")
|
||||||
Arch/aarch64/MMIO.cpp
|
Arch/aarch64/MMIO.cpp
|
||||||
Arch/aarch64/Timer.cpp
|
Arch/aarch64/Timer.cpp
|
||||||
Arch/aarch64/UART.cpp
|
Arch/aarch64/UART.cpp
|
||||||
|
Arch/aarch64/Utils.cpp
|
||||||
Arch/aarch64/Aarch64_asm_utils.S
|
Arch/aarch64/Aarch64_asm_utils.S
|
||||||
Arch/aarch64/boot.S
|
Arch/aarch64/boot.S
|
||||||
Arch/aarch64/init.cpp
|
Arch/aarch64/init.cpp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue