]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/BaseMemoryLibOptDxe ARM|AARCH64: disallow use in SEC & PEI phases
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 9 Sep 2016 12:55:34 +0000 (13:55 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 13 Sep 2016 15:28:54 +0000 (16:28 +0100)
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>
MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf

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