Kernel: Add a Mailbox class for aarch64

As a demo, query the firmware version. `Meta/serenity.sh gdb aarch64`
can be used to observe that qemu puts 0x548E1 in x0 in response
to this mailbox message.
This commit is contained in:
Nico Weber 2021-09-18 21:41:39 -04:00 committed by Linus Groh
commit 697e6ccb89
Notes: sideshowbarker 2024-07-18 03:40:25 +09:00
5 changed files with 129 additions and 2 deletions

View file

@ -5,14 +5,14 @@
*/
#include <AK/Types.h>
#include <Kernel/Prekernel/Arch/aarch64/MMIO.h>
#include <Kernel/Prekernel/Arch/aarch64/Mailbox.h>
extern "C" [[noreturn]] void halt();
extern "C" [[noreturn]] void init();
extern "C" [[noreturn]] void init()
{
[[maybe_unused]] auto& MMIO = Prekernel::MMIO::the();
[[maybe_unused]] u32 firmware_version = Prekernel::Mailbox::query_firmware_version();
halt();
}