From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (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 E02FE1A1EC1 for ; Tue, 6 Sep 2016 23:47:48 -0700 (PDT) Received: by mail-wm0-x230.google.com with SMTP id 1so13462724wmz.1 for ; Tue, 06 Sep 2016 23:47:48 -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=PFFGJJrJasqrjUzg5ynpTqw7chatTcIGeRXCprzsRtk=; b=P+30DgjDK5lNQuC9irgtsl29EbwmmQS7DGDXF11y8kSPyiXKRUf+zUBsvbn/nOfF+k 1rS+Z/awE+M+Uk4ykkifFq+tZfJ/ulGhA+7+wn1wny+X4pnxYB7evcg+RrmPpcD1yE0I eiawxPT+zys+24GflHQlWmGlgvNcNMXEzXEF8= 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=PFFGJJrJasqrjUzg5ynpTqw7chatTcIGeRXCprzsRtk=; b=ErjeKdir8PGeOcwBjXZSN9VIrGjGY+Z7QWtTUxFt7kBQasKvbLaeHkkAVHbPWFedqu oTieibG2LFqQi9yFCS2NfFsk8gx9LHCR9nNpmzIKoX+6t9PjuS3O4I5V26k5gz6QldlZ 8QCnB5QIw300ljRFSw4ZduAlyi1GXYPlGJj7TE0QGHEOphcl9yoDlPfCB6lWB8ST5vkE Dxal4aUQv0IaLVGQG2Se1T+tF4PXs/zaZtyaF5ovsbByIAef5U1v0HzgobjLvKFTvn11 za5OkMXjc0qIvPhnZen6ESiTRsjtAPCIeF4TRLF3Usz0y+bDugK9CML5CT2Txs/okBhn XGEw== X-Gm-Message-State: AE9vXwNbAs0yROk7xA+rYONV/VES/UKnsTz56AMihufZz9bvgJCfQsEVBciNH1B7BcYoA3Q+ X-Received: by 10.28.220.197 with SMTP id t188mr2342173wmg.114.1473230867284; Tue, 06 Sep 2016 23:47:47 -0700 (PDT) Received: from localhost.localdomain ([197.130.133.164]) by smtp.gmail.com with ESMTPSA id w71sm2501962wmw.17.2016.09.06.23.47.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Sep 2016 23:47:46 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, liming.gao@intel.com Cc: michael.d.kinney@intel.com, Ard Biesheuvel Date: Wed, 7 Sep 2016 07:47:39 +0100 Message-Id: <1473230862-20689-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [PATCH v3 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 06:47:49 -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 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 | 67 +++++ MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.asm | 74 +++++ MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf | 37 ++- 17 files changed, 2167 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