mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-25 18:48:42 +02:00
ArmPkg/ArmMmuLib: Fix ArmReplaceLiveTranslationEntry alignment
This commit is contained in:
parent
d477fd49b1
commit
53f2af3ad5
@ -34,14 +34,25 @@
|
|||||||
cbnz SAFE_XREG, 1f ;\
|
cbnz SAFE_XREG, 1f ;\
|
||||||
b . ;// We should never get here
|
b . ;// We should never get here
|
||||||
|
|
||||||
#define _ASM_FUNC(Name, Section) \
|
#define _ASM_FUNC_HDR(Name, Section) \
|
||||||
.global Name ; \
|
.global Name ; \
|
||||||
.section #Section, "ax" ; \
|
.section #Section, "ax" ; \
|
||||||
.type Name, %function ; \
|
.type Name, %function ;
|
||||||
|
|
||||||
|
#define _ASM_FUNC(Name, Section) \
|
||||||
|
_ASM_FUNC_HDR(Name, Section) \
|
||||||
|
Name:
|
||||||
|
|
||||||
|
#define _ASM_FUNC_ALIGN(Name, Section, Align) \
|
||||||
|
_ASM_FUNC_HDR(Name, Section) \
|
||||||
|
.balign Align ; \
|
||||||
Name:
|
Name:
|
||||||
|
|
||||||
#define ASM_FUNC(Name) _ASM_FUNC(ASM_PFX(Name), .text. ## Name)
|
#define ASM_FUNC(Name) _ASM_FUNC(ASM_PFX(Name), .text. ## Name)
|
||||||
|
|
||||||
|
#define ASM_FUNC_ALIGN(Name, Align) \
|
||||||
|
_ASM_FUNC_ALIGN(ASM_PFX(Name), .text. ## Name, Align)
|
||||||
|
|
||||||
#define MOV32(Reg, Val) \
|
#define MOV32(Reg, Val) \
|
||||||
movz Reg, (Val) >> 16, lsl #16 ; \
|
movz Reg, (Val) >> 16, lsl #16 ; \
|
||||||
movk Reg, (Val) & 0xffff
|
movk Reg, (Val) & 0xffff
|
||||||
|
@ -69,18 +69,16 @@
|
|||||||
.L2_\@:
|
.L2_\@:
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
// Align this routine to a log2 upper bound of its size, so that it is
|
|
||||||
// guaranteed not to cross a page or block boundary.
|
|
||||||
.balign 0x200
|
|
||||||
|
|
||||||
//VOID
|
//VOID
|
||||||
//ArmReplaceLiveTranslationEntry (
|
//ArmReplaceLiveTranslationEntry (
|
||||||
// IN UINT64 *Entry,
|
// IN UINT64 *Entry,
|
||||||
// IN UINT64 Value,
|
// IN UINT64 Value,
|
||||||
// IN UINT64 Address
|
// IN UINT64 Address
|
||||||
// )
|
// )
|
||||||
ASM_FUNC(ArmReplaceLiveTranslationEntry)
|
//
|
||||||
|
// Align this routine to a log2 upper bound of its size, so that it is
|
||||||
|
// guaranteed not to cross a page or block boundary.
|
||||||
|
ASM_FUNC_ALIGN(ArmReplaceLiveTranslationEntry, 0x200)
|
||||||
// disable interrupts
|
// disable interrupts
|
||||||
mrs x4, daif
|
mrs x4, daif
|
||||||
msr daifset, #0xf
|
msr daifset, #0xf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user