From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (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 4C4EF1A1E06 for ; Fri, 2 Sep 2016 04:40:45 -0700 (PDT) Received: by mail-wm0-x22c.google.com with SMTP id 1so26853015wmz.1 for ; Fri, 02 Sep 2016 04:40:45 -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=PVHxmrMj7qPJlMEoJ4FQOkugNbo9Klfcqw101FYgpo0=; b=MF+YaNtA1D9mWCWgyyrX3S5w6WtVE5dBMi11M0Dc0L7m/4I49FIywoI7ZcAdQ57Ifs lMbNBGogOtnPOedzi2L9W5hkS+siSMICrtXk5HmQ3YIj9SOtndmUwY+qS52KhU9jLyov JCzfVORo9Qr1KhSHJF0BTBPPh03aA+I02U5QA= 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=PVHxmrMj7qPJlMEoJ4FQOkugNbo9Klfcqw101FYgpo0=; b=U8tf9ebZpRh8Izq3XctDjCSFzpuoK5v3sLb0VpPCQN5tWAvdYQWZxt4rE3n3BbgVMV TzqZVpO+TLZc6eFsDYLWM0+hOfuzoO+0HyCgNb828zZoDQN7/vv84OJ44URYk/+GS+Op SBmkwBSijUhl+UhrUT5e7Z/gdU9K7TsdRCgsRJqh8TClZ4Qpe7PsW67IBRaTMrw6lEmN acFPfAsHuCH1ARp0FTCy8p0VA+d7iIJ3sU2Q/s6dzb8JQWYd7jdKTnNe/wqW3zIJWuyg WSvw2rS0xW/vYpK2PG/fAZYuUpafY4WkbRK6/6iEM31AzN0sp/LUFlmYIZtI5dw92Ng7 fl2g== X-Gm-Message-State: AE9vXwNOLRKEraPysvip1+VFeT90CY/vmCWR80y+fof/YoDhLF2lCxbH29p9KsitNh+hwybU X-Received: by 10.194.66.3 with SMTP id b3mr20051725wjt.119.1472816443232; Fri, 02 Sep 2016 04:40:43 -0700 (PDT) Received: from localhost.localdomain ([160.165.63.90]) by smtp.gmail.com with ESMTPSA id h7sm10088490wjd.17.2016.09.02.04.40.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Sep 2016 04:40:42 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, liming.gao@intel.com Cc: leif.lindholm@linaro.org, lersek@redhat.com, michael.d.kinney@intel.com, Ard Biesheuvel Date: Fri, 2 Sep 2016 12:40:35 +0100 Message-Id: <1472816437-4525-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [PATCH 0/2] MdePkg: add 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: Fri, 02 Sep 2016 11:40:45 -0000 Now that ArmPkg's BaseMemoryLib implementation is broken due to upstream API changes, now is a good time to move to the MdePkg versions. So add 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. Ard Biesheuvel (2): MdePkg/BaseMemoryLib: widen aligned accesses to 32 or 64 bits MdePkg/BaseMemoryLibOptDxe: added 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 | 149 +++++++++++ MdePkg/Library/BaseMemoryLibOptDxe/AArch64/CopyMem.S | 283 ++++++++++++++++++++ MdePkg/Library/BaseMemoryLibOptDxe/AArch64/ScanMem.S | 161 +++++++++++ MdePkg/Library/BaseMemoryLibOptDxe/AArch64/SetMem.S | 244 +++++++++++++++++ MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf | 24 +- 8 files changed, 987 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 -- 2.7.4