From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::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 A384B21A04830 for ; Thu, 6 Apr 2017 03:40:41 -0700 (PDT) Received: by mail-it0-x235.google.com with SMTP id 68so23967040itx.0 for ; Thu, 06 Apr 2017 03:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tmt+3IwhnieL0CQ6VqDq7FZIYTjYAWg9X3I8xUYOwYQ=; b=OddrVP3QeY93koQxL1HvoVe6bbOStP2tCrE4Ph5fKMFWuNAzxJEi/XqHwT4GBMz7Jp qUgIvczEOYK95MXCOaHPbA8dT3vEbD96NkMXQzbJXcnzA0oqxvIHuxtGbR2L9RyQwBBP ZItNd/dai++d+BsrFZkYjlPrjwxAKYh+4vaNo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tmt+3IwhnieL0CQ6VqDq7FZIYTjYAWg9X3I8xUYOwYQ=; b=C/eQq9FVMoLNwvvEI+VT9bqo013F9f49Va7xpRtOmC+EABOEbkkiwSqE9olQF1uM5x Mo7BaL1Q7ml5lMIyj6l0a/2r1LF6qgvOahgusuLSNFf+znbYv9q2yPEa8PkXlPwNndzR 4Gsl3E3O+ncsceU0ByetAWysETypgvPgqahjh+6YMGalHSKkR4G5ZXr9aD1WPvitkum2 NJnu4727xQAB8lw7o7FjXZXFqTKkZL63GSRMZd5EDRjE8rQvUCdCuCglcOrC/rgJzkab K5TtQZJVBNGzt75JP18QPpyzD05SxAn01mItHiRYxd4V0q+2sfgkEUvN1kQD+l8CO5cj ULYA== X-Gm-Message-State: AFeK/H1gBqqlVNdxlRRMFLJEilVP5i3JE1FiRJMczrvd7B5k4rwgTfWv TZWWz21t78kCjhSVEFbWSmAe5jHrDhMk X-Received: by 10.36.58.210 with SMTP id m201mr6784816itm.37.1491475241020; Thu, 06 Apr 2017 03:40:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.10.27 with HTTP; Thu, 6 Apr 2017 03:40:40 -0700 (PDT) In-Reply-To: <20170406093742.GS25239@bivouac.eciton.net> References: <1491424713-5203-1-git-send-email-ard.biesheuvel@linaro.org> <20170406093742.GS25239@bivouac.eciton.net> From: Ard Biesheuvel Date: Thu, 6 Apr 2017 11:40:40 +0100 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" , Jeremy Linton , Evan Lloyd , Ryan Harkin Subject: Re: [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: , X-List-Received-Date: Thu, 06 Apr 2017 10:40:41 -0000 Content-Type: text/plain; charset=UTF-8 On 6 April 2017 at 10:37, Leif Lindholm wrote: > On Wed, Apr 05, 2017 at 09:38:32PM +0100, Ard Biesheuvel wrote: >> 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 > > If you can get a nod each from Ryan and Evan, for the series: > Reviewed-by: Leif Lindholm > >> --- >> ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> 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); Actually, it would be more appropriate for this code to use DXE services, i.e., gDS->SetMemorySpaceAttributes (xxx) which internally calls Cpu->SetMemoryAttributes(), but also checks the validity of the request against the capabilities of the region