mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
When booting on RPI3 firmware puts CPU in EL2 mode which is different from QEMU's default EL3. I've added logic to discover initial mode at boot and then act accordingly. This results in Serenity corectly switching to EL1 on target hardware now.
17 lines
365 B
C
17 lines
365 B
C
/*
|
|
* Copyright (c) 2021, Marcin Undak <mcinek@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "AarchRegisters.h"
|
|
|
|
extern "C" uint8_t get_current_exception_level();
|
|
extern "C" void wait_cycles(int n);
|
|
|
|
// CPU initialization functions
|
|
extern "C" [[noreturn]] void return_from_el2();
|
|
extern "C" [[noreturn]] void return_from_el3();
|