1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:07:34 +00:00

Kernel/aarch64: Make REGISTER_STATE_SIZE a multiple of 16 bytes

This ensure that the stack pointer also stays 16 byte aligned. This
fixes a baremetal issue when getting an exception.
This commit is contained in:
Timon Kruiper 2023-05-15 20:29:59 +02:00 committed by Andrew Kaster
parent 65ed5419ae
commit 55e8ffd122

View file

@ -6,7 +6,13 @@
.section .text.vector_table
#define REGISTER_STATE_SIZE 264
// NOTE: This size must be a multiple of 16 bytes, to ensure that the stack pointer
// stays 16 byte aligned.
#define REGISTER_STATE_SIZE 272
#if REGISTER_STATE_SIZE % 16 != 0
# error "REGISTER_STATE_SIZE is not a multiple of 16 bytes!"
#endif
#define SPSR_EL1_SLOT (31 * 8)
#define ELR_EL1_SLOT (32 * 8)
#define SP_EL0_SLOT (33 * 8)