MdePkg/BaseMemoryLibOptDxe ARM|AARCH64: disallow use in SEC & PEI phases

The new accelerated ARM and AARCH64 implementations take advantage of
features that are only available when the MMU and Dcache are on. So
restrict the use of this library to the DXE phase or later.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Ard Biesheuvel 2016-09-09 13:55:34 +01:00
parent c86cd1e175
commit d947fbed72
1 changed files with 9 additions and 0 deletions

View File

@ -116,6 +116,15 @@
X64/CopyMem.S X64/CopyMem.S
X64/IsZeroBuffer.nasm X64/IsZeroBuffer.nasm
[Defines.ARM, Defines.AARCH64]
#
# The ARM implementations of this library may perform unaligned accesses, and
# may use DC ZVA instructions that are only allowed when the MMU and D-cache
# are on. Since SEC, PEI_CORE and PEIM modules may execute with the MMU off,
# omit them from the supported module types list for this library.
#
LIBRARY_CLASS = BaseMemoryLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_DRIVER UEFI_APPLICATION
[Sources.ARM] [Sources.ARM]
Arm/ScanMem.S |GCC Arm/ScanMem.S |GCC
Arm/SetMem.S |GCC Arm/SetMem.S |GCC