mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 08:20:44 +00:00
Kernel: Print current CPU exception level after booting on Aarch64
This is a first step to switch to exception level 1. This is also my first patch for SerenityOS :)
This commit is contained in:
parent
7beccaf41b
commit
18eb4a59d6
Notes:
sideshowbarker
2024-07-18 02:21:05 +09:00
Author: https://github.com/mundak 🔰
Commit: 18eb4a59d6
Pull-request: https://github.com/SerenityOS/serenity/pull/10403
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/jamesmintram
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/nico
4 changed files with 29 additions and 0 deletions
|
@ -1,10 +1,12 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Nico Weber <thakis@chromium.org>
|
||||
* Copyright (c) 2021, Marcin Undak <mcinek@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Prekernel/Arch/aarch64/Aarch64_asm_utils.h>
|
||||
#include <Kernel/Prekernel/Arch/aarch64/Mailbox.h>
|
||||
#include <Kernel/Prekernel/Arch/aarch64/Timer.h>
|
||||
#include <Kernel/Prekernel/Arch/aarch64/UART.h>
|
||||
|
@ -25,6 +27,11 @@ extern "C" [[noreturn]] void init()
|
|||
uart.print_num(firmware_version);
|
||||
uart.print_str("\r\n");
|
||||
|
||||
auto exception_level = get_current_exception_level();
|
||||
uart.print_str("Current CPU exception level: EL");
|
||||
uart.print_num(exception_level);
|
||||
uart.print_str("\r\n");
|
||||
|
||||
auto& timer = Prekernel::Timer::the();
|
||||
u64 start_musec = 0;
|
||||
for (;;) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue