From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id AE75421A0483B for ; Thu, 6 Apr 2017 09:29:10 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F14E428; Thu, 6 Apr 2017 09:29:09 -0700 (PDT) Received: from [192.168.229.136] (u201426.usa.arm.com [10.118.28.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9FB183F3E1; Thu, 6 Apr 2017 09:29:09 -0700 (PDT) To: Ard Biesheuvel , edk2-devel@lists.01.org, leif.lindholm@linaro.org, ryan.harkin@linaro.org, evan.lloyd@arm.com References: <20170406131551.3322-1-ard.biesheuvel@linaro.org> From: Jeremy Linton Message-ID: <48c48135-3cb6-75ad-c13d-7f5df83e9c36@arm.com> Date: Thu, 6 Apr 2017 11:29:08 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170406131551.3322-1-ard.biesheuvel@linaro.org> Subject: Re: [PATCH v2 0/5] ArmPlatformPkg: map VRAM using memory semantics 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 16:29:10 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi, On 04/06/2017 08:15 AM, Ard Biesheuvel wrote: > As reported by Jeremy, the recently introduced accelerated memcpy/memset > routines are causing problems when used on framebuffer memory. While > framebuffers are arguably right on the blurry line between MMIO (with > side effects that are sensitive to ordering) and memory, mapping VRAM > as device memory is unnecessary to begin with, and so we can improve > our situation by using memory semantics for the VRAM mappings. (Whether > we end up reverting to the unaccelerated memcpy/memset routines is a > separate matter) > > So fix both the FVP case, which has a separate VRAM region, and TC2, which > allocates VRAM from normal memory and changes the mapping attributes. > > Note to Ryan: this fixes FVP Base model for me, but not the Foundation model > (whose PL111 support I never saw working to begin with, so I am not sure what > is going on there) So, I applied a similar set of patches against the juno, and everything continues to work. The change also looks good. So, Reviewed-by: Jeremy Linton But I'm still concerned in general, since the HDLCD frame buffer is odd in that its just system memory rather than being attached to an IO bus of some form. AKA its not actually a "VRAM" (cue discussion about GDDR not having multiple ports/etc)... > > Ard Biesheuvel (5): > ArmPlatformPkg/FVP: map motherboard VRAM as uncached memory > ArmPlatformPkg/HdLcdArmVExpressLib: fix incorrect FreePool () call > ArmPlatformPkg/PL111LcdArmVExpressLib: fix incorrect FreePool () call > ArmPlatformPkg/HdLcdArmVExpressLib: use write-combine mapping for VRAM > ArmPlatformPkg/PL111LcdArmVExpressLib: use write-combine mapping for > VRAM > > ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM/ArmPlatform.h | 10 ++++++---- > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSMMem.c | 8 +++++++- > ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c | 14 +++++--------- > ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpressLib.inf | 3 ++- > ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c | 14 +++++--------- > ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf | 3 ++- > 6 files changed, 27 insertions(+), 25 deletions(-) >