audk/ArmPkg/Library/ArmMmuLib
Marvin Häuser 8f4ec0cc43 ArmPkg/ArmMmuLib: Fix ArmReplaceLiveTranslationEntry() alignment
As the ASM_FUNC() macro performs a section switch, the preceding
.balign directive applies the alignment constraint to the current
location in the previous section. As the linker may not merge the
sections in-order, ArmReplaceLiveTranslationEntry() may be left
unaligned.

Replace the explicit invocation of .balign with the ASM_FUNC_ALIGN()
macro, which guarantees the alignment constraint is applied correctly.
To make sure related issues are reliably caught in the future, align the
end of the function before checking the total occupied size. This
ensures crossing a 0x200 boundary will cause a compilation error.

Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2023-04-20 16:20:35 +00:00
..
AArch64 ArmPkg/ArmMmuLib: Fix ArmReplaceLiveTranslationEntry() alignment 2023-04-20 16:20:35 +00:00
Arm ArmPkg/ArmMmuLib: Introduce region types for RO/XP WB cached memory 2023-03-16 21:14:49 +00:00
ArmMmuBaseLib.inf ArmPkg/ArmMmuLib: Reuse XIP MMU routines when splitting entries 2022-10-19 09:07:13 +00:00
ArmMmuPeiLib.inf ArmPkg/ArmMmuLib: Reuse XIP MMU routines when splitting entries 2022-10-19 09:07:13 +00:00