From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (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 6191320D77DAA for ; Thu, 6 Apr 2017 11:29:08 -0700 (PDT) Received: by mail-wr0-x22d.google.com with SMTP id c55so1839382wrc.3 for ; Thu, 06 Apr 2017 11:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+r1oyCO5PBYeA37IoSRhDsv/Z32Az7QVdFQ+5qFOx5Q=; b=eWaxEQ+69J8UhDDhISKj6xjd91bYNs4jF4JnpaNdv3lmA72cJAigV3dNugIwfGUrf+ /qd9lWldeQdCJzF+oNb1pplt/h0zAl45HZa2zZeBa4xC9PLsoiMNZ5Sn5R2q7pS9T75Z jR9WVOspJlraQ58bfy0VR6wYfp4TQ52K6SuHU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+r1oyCO5PBYeA37IoSRhDsv/Z32Az7QVdFQ+5qFOx5Q=; b=n3ej0qbj7tELSYn24fCM8OhdZhl0lgXB+q7tqtapsCa4wRssjrtAgIIbnR06rcKARF 16/lmO7I91rb4iIeCKh8YqBbABSTOTymJN0SQjAprqOncKDwRRLub5BeFi5JCzN113MS nzLcn0bXnRVt52X4aLJpKZYBy4vo5nHjva3HFJgDsjfKzAJ6LH3qLuNVFMa4M1eWLTvJ p/zxka7X3rMdrCEEpxB1zT87vHzflH7yJftLQG4PJJCnUezHc2+CvRevLpDRA03dMMVg 3WqK2hPD6buZyTuhwqN2FqVPI7sMt/v3MGiNj2yeQym2W2IZW+b4/sECuSqVWbkr6FOx IIeg== X-Gm-Message-State: AFeK/H2O2Ej9SnhsRG1PUqMG+x2cyaj8+ump7Szhis6eeEbsi7GNTMYwHzjKXgrDkUrHwj2w X-Received: by 10.223.133.188 with SMTP id 57mr30629195wrt.191.1491503347006; Thu, 06 Apr 2017 11:29:07 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id e21sm3361755wma.5.2017.04.06.11.29.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Apr 2017 11:29:05 -0700 (PDT) Date: Thu, 6 Apr 2017 19:29:04 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, ryan.harkin@linaro.org, evan.lloyd@arm.com, jeremy.linton@arm.com Message-ID: <20170406182904.GL25239@bivouac.eciton.net> References: <20170406131551.3322-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20170406131551.3322-1-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 18:29:08 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Apr 06, 2017 at 02:15:46PM +0100, 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. For 2-5/5: Reviewed-by: Leif Lindholm > > 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) > > 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(-) > > -- > 2.9.3 >