diff options
author | Timon Kruiper <timonkruiper@gmail.com> | 2023-02-18 11:08:02 +0100 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-02-18 19:17:21 +0100 |
commit | 13f5aa81e39981de28e380753ea89b2b7ef85393 (patch) | |
tree | 06391f11b95d4059ae42db0011a056e61c50d5fb /Kernel/Arch/aarch64 | |
parent | 5d587ea5626e92f91edcd522ea7eb0effef68eca (diff) | |
download | serenity-13f5aa81e39981de28e380753ea89b2b7ef85393.zip |
Kernel/aarch64: Disable memory access alignment check
Even though we currently build all of Userland and the Kernel with the
-mstrict-align flag, the compiler will still emit unaligned memory
accesses. To work around this, we disable the check for now. See
https://github.com/SerenityOS/serenity/issues/17516 for the relevant
issue.
Diffstat (limited to 'Kernel/Arch/aarch64')
-rw-r--r-- | Kernel/Arch/aarch64/Exceptions.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Kernel/Arch/aarch64/Exceptions.cpp b/Kernel/Arch/aarch64/Exceptions.cpp index af95df6d85..8b6005fbed 100644 --- a/Kernel/Arch/aarch64/Exceptions.cpp +++ b/Kernel/Arch/aarch64/Exceptions.cpp @@ -74,7 +74,10 @@ static void setup_el1() system_control_register_el1.UMA = 1; // Don't trap access to DAIF (debugging) flags of EFLAGS register system_control_register_el1.SA0 = 1; // Enable stack access alignment check for EL0 system_control_register_el1.SA = 1; // Enable stack access alignment check for EL1 - system_control_register_el1.A = 1; // Enable memory access alignment check + + // FIXME: Enable memory access alignment check when userspace will not execute unaligned memory accesses anymore. + // See: https://github.com/SerenityOS/serenity/issues/17516 + system_control_register_el1.A = 0; // Disable memory access alignment check Aarch64::SCTLR_EL1::write(system_control_register_el1); |