From patchwork Wed Apr 5 20:38:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 96905 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp437704qgd; Wed, 5 Apr 2017 13:38:50 -0700 (PDT) X-Received: by 10.84.238.202 with SMTP id l10mr38738806pln.7.1491424730365; Wed, 05 Apr 2017 13:38:50 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id r83si21575070pfd.338.2017.04.05.13.38.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 13:38:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A6F13203BF032; Wed, 5 Apr 2017 13:38:49 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wr0-x22e.google.com (mail-wr0-x22e.google.com [IPv6:2a00:1450:400c:c0c::22e]) (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 CC5CD20080934 for ; Wed, 5 Apr 2017 13:38:47 -0700 (PDT) Received: by mail-wr0-x22e.google.com with SMTP id o21so4442726wrb.2 for ; Wed, 05 Apr 2017 13:38:47 -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=34EHLjezh01HAgfUa0Z/zt0CjFglqzpsRDqmyNqobfE=; b=NC1gO2Cg4RTgfzhJvws+pP8JAOgjCLJeBzg7Vkh7yIe/VR8a8kRgVqZoPOmE6/32YK fjDrbEnTOUeiRmJ+91Evbu1tV4BpU1+Z5e6rLE30PDDvF2KLX6eKY1QK10N/HGEG3Ep2 fxA8jblsS81+kIUDMI384eSjyv7Ft3zonUKbU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=34EHLjezh01HAgfUa0Z/zt0CjFglqzpsRDqmyNqobfE=; b=DBFstH+r0r25rpVofzLONBXgQcveV6FSuZJv0jVoZmiONOQ4q+Fr3ZDgxiETmvFuhc 5Tr3KX8GtG+OC8nUVVh2AYLhkry8u4w0Xlp6GglXC2RHQIH6at3ytb0yV1sCI5CvQ0V8 nzDGp46+jePdS+LJe+0qr1Vo7jd0cWuY2ncsqa/udEOaXEqEve7zvo4X5g/d/deCIrLb RdlNxdrwqYYJd/zrWariuXuZLvBwPTZ4Vczd+48SdxcLVCWv+XYVrp8RoObzaJ8bJPR7 ao4f5qxzDAZwXkKc5AqsIz5HkPjIsi6MlwPQm9coXpcMb4vOUfS9mIbeKHWtqJn0Xg+G neYg== X-Gm-Message-State: AFeK/H0EFGwGdR+K5cpQ/licaXvYB7BvIytGQqwyW17cQQWMiElWrybJhUPytEAlv88Q8mTh X-Received: by 10.28.33.66 with SMTP id h63mr21476840wmh.86.1491424725764; Wed, 05 Apr 2017 13:38:45 -0700 (PDT) Received: from localhost.localdomain ([160.163.145.113]) by smtp.gmail.com with ESMTPSA id b199sm23690032wmb.13.2017.04.05.13.38.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Apr 2017 13:38:44 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, jeremy.linton@arm.com Date: Wed, 5 Apr 2017 21:38:32 +0100 Message-Id: <1491424713-5203-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [edk2] [PATCH 1/2] ArmPlatformPkg/HdLcdArmVExpressLib: use write-combine mapping for VRAM X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Replace the uncached memory mapping of the framebuffer with a write- combining one. This improves performance, and avoids issues with unaligned accesses and DC ZVA instructions performed by the accelerated memcpy/memset routines. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c b/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c index a57846715ed7..d6d47545c824 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c @@ -143,7 +143,7 @@ LcdPlatformGetVram ( ASSERT_EFI_ERROR(Status); // Mark the VRAM as un-cacheable. The VRAM is inside the DRAM, which is cacheable. - Status = Cpu->SetMemoryAttributes (Cpu, *VramBaseAddress, *VramSize, EFI_MEMORY_UC); + Status = Cpu->SetMemoryAttributes (Cpu, *VramBaseAddress, *VramSize, EFI_MEMORY_WC); ASSERT_EFI_ERROR(Status); if (EFI_ERROR(Status)) { gBS->FreePool (VramBaseAddress); From patchwork Wed Apr 5 20:38:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 96906 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp437724qgd; Wed, 5 Apr 2017 13:38:52 -0700 (PDT) X-Received: by 10.98.139.134 with SMTP id e6mr31225878pfl.257.1491424732905; Wed, 05 Apr 2017 13:38:52 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id 73si21577551ple.186.2017.04.05.13.38.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 13:38:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D5517203BF037; Wed, 5 Apr 2017 13:38:50 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) (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 74188203BF030 for ; Wed, 5 Apr 2017 13:38:49 -0700 (PDT) Received: by mail-wr0-x235.google.com with SMTP id w43so30665048wrb.0 for ; Wed, 05 Apr 2017 13:38:49 -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:in-reply-to:references; bh=lfoKuHMVyW5qfNXR9WVPzH6IjhKaSqvA1j4YA2kTeFg=; b=T2z9qlnQcQy0Nli++pNhrWL+WAiukg/R+jM+XspuqtVf0CTv2vNIeDMvAHZNZN/q34 j4uKM0zmkRJGEpLk4GJcO5LH5CK7NJorB4RzrfNytTG/aVMFSVMtABA9LR7Wv+Jti0uP H4L8gzrU7TsxM5BEmozcXE5YYN+9bASFa0F3M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lfoKuHMVyW5qfNXR9WVPzH6IjhKaSqvA1j4YA2kTeFg=; b=ZHeJoCYuVfXrWEbLOFcyZqdTu/qeThG7AKxFeeATnBTT8a2hrHIIXZ7YMEoXDxGk9T U51oGh5q+gx5Oy3o1fCIDZ5tQuJ2z8YzeGro8b0tIb0WeCmAa3c4ire3ZuC0pM4KLigc ++UhXMl0Hc1Tgz/pClvl7l1kBJtd2lFFJ4hEfbAKMUok7+UVQYYBoSDyzW0qjuuIxDPF CUuqbygAB8i2kpciMeTXiZJUDUhr54MEV+K260OIa3aRsSRAaZCThxV56h9NWCYtx7HC LkwUuzN7+XGwlhgZRCx/IqAIPxBOlIYmnZW/99NPqaaC7DFnoqGE5Lk4wmsoZZUXKw6w RwUg== X-Gm-Message-State: AFeK/H24OQ5pRVPRII7G7iWwSPTE+yFNAhfnfb43vhAZAEWkYVdQmV5lqB14tdimlCmtYk3S X-Received: by 10.28.140.19 with SMTP id o19mr21432530wmd.123.1491424727555; Wed, 05 Apr 2017 13:38:47 -0700 (PDT) Received: from localhost.localdomain ([160.163.145.113]) by smtp.gmail.com with ESMTPSA id b199sm23690032wmb.13.2017.04.05.13.38.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Apr 2017 13:38:46 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, jeremy.linton@arm.com Date: Wed, 5 Apr 2017 21:38:33 +0100 Message-Id: <1491424713-5203-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491424713-5203-1-git-send-email-ard.biesheuvel@linaro.org> References: <1491424713-5203-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 2/2] ArmPlatformPkg/PL111LcdArmVExpressLib: use write-combine mapping for VRAM X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Replace the uncached memory mapping of the framebuffer with a write- combining one. This improves performance, and avoids issues with unaligned accesses and DC ZVA instructions performed by the accelerated memcpy/memset routines. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c index 2000c9bdf436..d18d6b3e1665 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c @@ -192,7 +192,7 @@ LcdPlatformGetVram ( ASSERT_EFI_ERROR(Status); // Mark the VRAM as un-cachable. The VRAM is inside the DRAM, which is cachable. - Status = Cpu->SetMemoryAttributes(Cpu, *VramBaseAddress, *VramSize, EFI_MEMORY_UC); + Status = Cpu->SetMemoryAttributes(Cpu, *VramBaseAddress, *VramSize, EFI_MEMORY_WC); ASSERT_EFI_ERROR(Status); if (EFI_ERROR(Status)) { gBS->FreePool(VramBaseAddress);