From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1BE9F1A1EE2 for ; Wed, 7 Sep 2016 07:52:59 -0700 (PDT) Received: by mail-wm0-x22a.google.com with SMTP id i204so90631081wma.0 for ; Wed, 07 Sep 2016 07:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Ds6tYGMcKjJplfnrrOiWMgevOf7KHBgCFfBiVLhQYsk=; b=OYa4Uz5jFh0iyeb+yH26PadG3vTlOsTCNYsd7ch6yK9HJ+mqR12i/jTVrqBTWL0UaZ BkX+rIeqhLtDnRB9tas0Xlc+z/wPksHk3AxQTah5+ibPFXxg/giIGJcYOga7w04tJghl 6PpX6JDC75dBeDd2z/XWvVvacEV0dITCXV60w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Ds6tYGMcKjJplfnrrOiWMgevOf7KHBgCFfBiVLhQYsk=; b=hjyy+M946OfKNlixc0JQywio6ttrcJHklka78tb6B26jdAb2mO9eK1LG42Td3gf8rC Gluykt40SK8OgA2EXXNEei4yj6fRyXdF6qRqj2iYlO84d7J/5Itt3Eyu15IRrx9AQ25K uBXINN8quNtaQm0/n/XGkWMuavaluwXnPg+Z3HJk+VWxPrlOxwNgh/DxxDEPYuxD0H92 rTw7ZlEKNaUixTRygnqeQUk1rLn40UlYCBQkAaoxHIKgm+dUA/eVUSu7MYUba4jlAelc 6fmiRZ+KcWEoUz+Z5I9LUBr+R1PioWdzC7EBgopJL6ZLgpev2TJsNH3DtkjFfJIDKYyY n6mQ== X-Gm-Message-State: AE9vXwN+mdRvf/UXpGrne2rdD43gq5noih6xHC/cDi5B1I02vqLAnzcdAb0KxDpyBgMRAbiV X-Received: by 10.194.63.146 with SMTP id g18mr11334054wjs.39.1473259976816; Wed, 07 Sep 2016 07:52:56 -0700 (PDT) Received: from localhost.localdomain ([197.130.133.164]) by smtp.gmail.com with ESMTPSA id o2sm39228293wjo.3.2016.09.07.07.52.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Sep 2016 07:52:56 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Cc: liming.gao@intel.com, ryan.harkin@linaro.org, Ard Biesheuvel Date: Wed, 7 Sep 2016 15:52:45 +0100 Message-Id: <1473259968-7221-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [PATCH v4 0/3] MdePkg: add ARM/AARCH64 support to BaseMemoryLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2016 14:52:59 -0000 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). 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 (3): MdePkg/BaseMemoryLib: widen aligned accesses to 32 or 64 bits MdePkg/BaseMemoryLibOptDxe: add accelerated ARM routines MdePkg/BaseMemoryLibOptDxe: add accelerated AARCH64 routines 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 | 75 ++++++ MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.asm | 81 ++++++ MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf | 37 ++- 17 files changed, 2182 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