]> git.proxmox.com Git - mirror_edk2.git/commit - ArmPkg/Library/ArmLib/AArch64/AArch64LibPei.inf
ArmPkg/ArmLib: avoid cache maintenance in PEIMs when executing in place
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 12 May 2016 13:52:59 +0000 (15:52 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 15 Jun 2016 15:23:09 +0000 (17:23 +0200)
commit469e1e1e4203b5d369fdce790883cb0aa035a744
treec858ec1b0d4bfe973232e23fbd0e3da0eb80016b
parent16146b984db10f87e30a6f6ac08ba9716a9eea79
ArmPkg/ArmLib: avoid cache maintenance in PEIMs when executing in place

On some platforms, performing cache maintenance on regions that are backed
by NOR flash result in SErrors. Since cache maintenance is unnecessary in
that case, create a PEIM specific version that only performs said cache
maintenance in its constructor if the module is shadowed in RAM. To avoid
performing the cache maintenance if the MMU code is not used to begin with,
check that explicitly in the constructor.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPkg/Library/ArmLib/AArch64/AArch64BaseLibConstructor.c [new file with mode: 0644]
ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
ArmPkg/Library/ArmLib/AArch64/AArch64LibConstructor.c [deleted file]
ArmPkg/Library/ArmLib/AArch64/AArch64LibPei.inf [new file with mode: 0644]
ArmPkg/Library/ArmLib/AArch64/AArch64Mmu.c
ArmPkg/Library/ArmLib/AArch64/AArch64PeiLibConstructor.c [new file with mode: 0644]