From 3abc567a73f3701a9bacec2ed08a3f7d9c7062d0 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 11 Oct 2023 02:59:41 -0700 Subject: [PATCH] kern/ldr: move crt0 into .rodata --- .../include/mesosphere/init/kern_init_layout.hpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/libmesosphere/include/mesosphere/init/kern_init_layout.hpp b/libmesosphere/include/mesosphere/init/kern_init_layout.hpp index daf0e81a..db952edf 100644 --- a/libmesosphere/include/mesosphere/init/kern_init_layout.hpp +++ b/libmesosphere/include/mesosphere/init/kern_init_layout.hpp @@ -31,8 +31,22 @@ namespace ams::kern::init { u32 dynamic_offset; u32 init_array_offset; u32 init_array_end_offset; + u32 sysreg_offset; }; static_assert(util::is_pod::value); - static_assert(sizeof(KernelLayout) == 0x30); + static_assert(sizeof(KernelLayout) == 0x34); + + #if defined(ATMOSPHERE_ARCH_ARM64) + struct KernelSystemRegisters { + u64 ttbr0_el1; + u64 ttbr1_el1; + u64 tcr_el1; + u64 mair_el1; + u64 sctlr_el1; + }; + #else + struct KernelSystemRegisters { + }; + #endif } \ No newline at end of file