public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v5 0/4] MdePkg: add ARM/AARCH64 support to BaseMemoryLib
@ 2016-09-09 14:00 Ard Biesheuvel
  2016-09-09 14:00 ` [PATCH v5 1/4] MdePkg/BaseMemoryLib: widen aligned accesses to 32 or 64 bits Ard Biesheuvel
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Ard Biesheuvel @ 2016-09-09 14:00 UTC (permalink / raw)
  To: edk2-devel, liming.gao, leif.lindholm, michael.d.kinney; +Cc: Ard Biesheuvel

This adds ARM and AARCH64 support to both BaseMemoryLib (generic C) and
BaseMemoryLibOptDxe (accelerated). The former can be used anywhere, the
latter only in places where the caches are guaranteed to be on, not only
due to the unaligned accesses but also due to the fact that it uses
DC ZVA instructions for clearing memory (AArch64 only).

Liming: I will need your R-b for patch #4 (assuming you are ok with it). Thanks.

I have tested this version of the series with various emulated, virtualized and
bare metal implementations, and I think this is good to go in now. I will follow
up with a series that adds BaseMemoryLibOptDxe to ArmVirtQemu and other
platforms once I have independent confirmation that everything works as expected
(in other wors, Tested-by's are highly appreciated)

Changes since v4:
- update SetMem() for ARM yet again (reduce code size, and minor performance
  tweak)
- add patch #4 to disallow BaseMemoryLibOptDxe in SEC and PEI phases on ARM
  and AARCH64

Branch can be found here
https://git.linaro.org/people/ard.biesheuvel/uefi-next.git/shortlog/refs/heads/arm64-basememorylib-v5

Changes since v3:
- added Liming's R-b
- updated SetMem() to avoid unaligned strd (store pair) instructions, which
  require 32-bit alignment even in cases where ordinary loads and stores do
  tolerate unaligned accesses (#2)
- fix Clang issue in NEON dialect (#3)

Branch can be found here
https://git.linaro.org/people/ard.biesheuvel/uefi-next.git/shortlog/refs/heads/arm64-basememorylib-v4

Changes since v2:
- avoid open coded 64-bit shift (#1)
- tweak SetMem implementation (#2)

Ard Biesheuvel (4):
  MdePkg/BaseMemoryLib: widen aligned accesses to 32 or 64 bits
  MdePkg/BaseMemoryLibOptDxe: add accelerated ARM routines
  MdePkg/BaseMemoryLibOptDxe: add accelerated AARCH64 routines
  MdePkg/BaseMemoryLibOptDxe ARM|AARCH64: disallow use in SEC & PEI
    phases

 MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf             |   2 +-
 MdePkg/Library/BaseMemoryLib/CopyMem.c                     | 112 +++++++-
 MdePkg/Library/BaseMemoryLib/SetMem.c                      |  40 ++-
 MdePkg/Library/BaseMemoryLibOptDxe/AArch64/CompareMem.S    | 142 ++++++++++
 MdePkg/Library/BaseMemoryLibOptDxe/AArch64/CopyMem.S       | 284 ++++++++++++++++++++
 MdePkg/Library/BaseMemoryLibOptDxe/AArch64/ScanMem.S       | 161 +++++++++++
 MdePkg/Library/BaseMemoryLibOptDxe/AArch64/SetMem.S        | 244 +++++++++++++++++
 MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareMem.S        | 138 ++++++++++
 MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareMem.asm      | 140 ++++++++++
 MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S           | 172 ++++++++++++
 MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.asm         | 147 ++++++++++
 MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S           | 146 ++++++++++
 MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.asm         | 147 ++++++++++
 MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMemGeneric.c    | 142 ++++++++++
 MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.S            |  77 ++++++
 MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.asm          |  84 ++++++
 MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf |  46 +++-
 17 files changed, 2196 insertions(+), 28 deletions(-)
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/AArch64/CompareMem.S
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/AArch64/CopyMem.S
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/AArch64/ScanMem.S
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/AArch64/SetMem.S
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareMem.S
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareMem.asm
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.asm
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.asm
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMemGeneric.c
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.S
 create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.asm

-- 
2.7.4



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-04-06 10:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09 14:00 [PATCH v5 0/4] MdePkg: add ARM/AARCH64 support to BaseMemoryLib Ard Biesheuvel
2016-09-09 14:00 ` [PATCH v5 1/4] MdePkg/BaseMemoryLib: widen aligned accesses to 32 or 64 bits Ard Biesheuvel
2016-09-09 14:00 ` [PATCH v5 2/4] MdePkg/BaseMemoryLibOptDxe: add accelerated ARM routines Ard Biesheuvel
2016-09-09 14:00 ` [PATCH v5 3/4] MdePkg/BaseMemoryLibOptDxe: add accelerated AARCH64 routines Ard Biesheuvel
2016-09-09 14:00 ` [PATCH v5 4/4] MdePkg/BaseMemoryLibOptDxe ARM|AARCH64: disallow use in SEC & PEI phases Ard Biesheuvel
2016-09-13 14:49   ` Ard Biesheuvel
2016-09-13 15:00     ` Gao, Liming
2017-04-05 20:12   ` Jeremy Linton
2017-04-05 20:34     ` Ard Biesheuvel
2017-04-05 21:28       ` Jeremy Linton
2017-04-05 21:55         ` Ard Biesheuvel
2017-04-06  9:35           ` Leif Lindholm
2017-04-06  9:43             ` Ard Biesheuvel
2017-04-06 10:16               ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox