From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 033281A1F54 for ; Thu, 8 Sep 2016 02:21:57 -0700 (PDT) Received: by mail-wm0-x236.google.com with SMTP id w12so24029559wmf.0 for ; Thu, 08 Sep 2016 02:21:57 -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=ionkcToKnLI9V8vhLGnL1SvAcALYD/PYispgwix1w4A=; b=aOVj5JredfvKzqBXe+YyB2v6GXchzncU6v+rhUYN0n28EVfj5rGNiXw/Y514cGGTJV i1FPm0o6+7wBjH35jQUNHRDQF50lsGpnFYx5mb1vH2FHucWK7DEcF+8XtuDW8DQtzjyI 6RFEKJ3nYULs9m24xFLIQFY6y0BEdZ3SPsIUk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ionkcToKnLI9V8vhLGnL1SvAcALYD/PYispgwix1w4A=; b=UG70nGluKHdvTx0542YYVIxu2SBHfUC2mM/jgQqUo5usThtwOb7MoZGhwjQC7r/sid y/jfty8OgxqV4FttfeBrzDDg4GM1H8Mkf70fnwD2t3gZaCp8RdDie2cAf5E2V9IGSOq7 IGrhgiggjaVNnJfvseM58vHkN+ALdHw3qFJcPkU22SGXXp9kJiMpBX6XASycTlpEQDsp 2W0X6KuwM9oeH2g7oP6pcoQ9zT+xfeC8DFqVcjtFcc5TPJmD8s9JfToDanNNdXohGGgE BnP3py+pejVDmsC9El5w8OaJbjGU3T/AuYckafeUSzr212T55TZlirn4wsJRzjAN6BC5 jSQA== X-Gm-Message-State: AE9vXwNlCirpBm1UUFCpHR5kdrknrz26vyTJ97Ig+eXbCG1GxcvHJsO8+Nj5dHWiLZw8pjNY X-Received: by 10.194.172.229 with SMTP id bf5mr37317322wjc.37.1473326516325; Thu, 08 Sep 2016 02:21:56 -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 r67sm8620545wmb.14.2016.09.08.02.21.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Sep 2016 02:21:55 -0700 (PDT) Date: Thu, 8 Sep 2016 10:21:54 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org Message-ID: <20160908092153.GH16080@bivouac.eciton.net> References: <1473322418-9158-1-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <1473322418-9158-1-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH] ArmPlatformPkg: remove EFI_MEMORY_UC attribute from normal memory 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: Thu, 08 Sep 2016 09:21:58 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 08, 2016 at 09:13:38AM +0100, Ard Biesheuvel wrote: > On ARM systems, mapping normal memory as device memory may have unintended > side effects, given that unaligned accesses or loads and stores with special > semantics (e.g., load/store exclusive) may fault or may not work as expected. > Similarly, DC ZVA instructions are only supported on normal memory, not > device memory. I think this is the right thing to do; Arguably, on the modern ARM architectures, UNCACHEABLE and WRITE_COMBINEABLE are mutually exclusive. I'll discuss with Charles whether we should codify this in the UEFI specification. > So remove the EFI_MEMORY_UC attribute that we set by default on system RAM. > If any region requires this attribute, it is up to the driver to set this > attribute, and to ensure that no offending operations are performed on it. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > ArmPlatformPkg/ArmJunoPkg/Library/ArmJunoLib/ArmJunoMem.c | 1 - > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSMMem.c | 1 - > ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c | 1 - > 3 files changed, 3 deletions(-) > > diff --git a/ArmPlatformPkg/ArmJunoPkg/Library/ArmJunoLib/ArmJunoMem.c b/ArmPlatformPkg/ArmJunoPkg/Library/ArmJunoLib/ArmJunoMem.c > index 41731c1ebdb8..aa8d7d9c3b0d 100644 > --- a/ArmPlatformPkg/ArmJunoPkg/Library/ArmJunoLib/ArmJunoMem.c > +++ b/ArmPlatformPkg/ArmJunoPkg/Library/ArmJunoLib/ArmJunoMem.c > @@ -56,7 +56,6 @@ ArmPlatformGetVirtualMemoryMap ( > ResourceAttributes = > EFI_RESOURCE_ATTRIBUTE_PRESENT | > EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE | > EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | > EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | > EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE | > diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSMMem.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSMMem.c > index c6df2e1b3de4..115df246796d 100644 > --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSMMem.c > +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSMMem.c > @@ -61,7 +61,6 @@ ArmPlatformGetVirtualMemoryMap ( > ResourceAttributes = > EFI_RESOURCE_ATTRIBUTE_PRESENT | > EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE | > EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | > EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | > EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE | > diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c > index 75e6631d7f30..2feb11f21d5d 100644 > --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c > +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c > @@ -89,7 +89,6 @@ MemoryPeim ( > ResourceAttributes = ( > EFI_RESOURCE_ATTRIBUTE_PRESENT | > EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > - EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE | > EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | > EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | > EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE | > -- > 2.7.4 >