Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: f433fa59d22480f3ae60ea29e98a6b33227cbd7a https://github.com/tianocore/edk2/commit/f433fa59d22480f3ae60ea29e98a6b33227cbd7a Author: Marvin Häuser <mhaeu...@posteo.de> Date: 2023-04-20 (Thu, 20 Apr 2023)
Changed paths: M ArmPkg/Include/AsmMacroIoLibV8.h Log Message: ----------- ArmPkg/AsmMacroIoLibV8: Introduce ASM_FUNC_ALIGN() With the current ASM_FUNC() macro, there is no good way to declare an alignment constraint for a function. As ASM_FUNC() switches sections, declaring the constraint before the macro invocation applies it to the current location in the previous section. Declaring the constraint after the macro invocation lets the function label point to the location prior to alignment. Depending on toolchain behaviour, this may cause the label to point to alignment padding preceding the actual function definition. To address these issues, introduce the ASM_FUNC_ALIGN() macro, which declares the alignment constraint right before the function label. Signed-off-by: Marvin Häuser <mhaeu...@posteo.de> Reviewed-by: Ard Biesheuvel <a...@kernel.org> Commit: 8f4ec0cc433a33967cdbbb945acd37b6ae1d3fce https://github.com/tianocore/edk2/commit/8f4ec0cc433a33967cdbbb945acd37b6ae1d3fce Author: Marvin Häuser <mhaeu...@posteo.de> Date: 2023-04-20 (Thu, 20 Apr 2023) Changed paths: M ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibReplaceEntry.S Log Message: ----------- 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 <mhaeu...@posteo.de> Reviewed-by: Leif Lindholm <quic_llind...@quicinc.com> Reviewed-by: Ard Biesheuvel <a...@kernel.org> Compare: https://github.com/tianocore/edk2/compare/e3d2c08322bc...8f4ec0cc433a _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits