From patchwork Thu Sep 8 09:49:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 75748 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp750945qgf; Thu, 8 Sep 2016 02:49:57 -0700 (PDT) X-Received: by 10.157.18.227 with SMTP id g90mr24122416otg.84.1473328197819; Thu, 08 Sep 2016 02:49:57 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t19si20545918oih.156.2016.09.08.02.49.57; Thu, 08 Sep 2016 02:49:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 479DC6187D; Thu, 8 Sep 2016 09:49:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 3ED8361726; Thu, 8 Sep 2016 09:49:41 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 7EDB86173E; Thu, 8 Sep 2016 09:49:38 +0000 (UTC) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by lists.linaro.org (Postfix) with ESMTPS id 575F26171C for ; Thu, 8 Sep 2016 09:49:37 +0000 (UTC) Received: by mail-wm0-f44.google.com with SMTP id w12so25293260wmf.0 for ; Thu, 08 Sep 2016 02:49:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eE4CLjnqQCrFVWc12segAOwGDj5Rcfgq92XIUpkelHw=; b=Ol2CmwAZew8BIK5M0F3TelXqejXLE9ML2fMhGoVU40ZgRO97RPaIuWO9xe99vkrh2k OK5+1qznp9RyNPLvHhtZzCyxDagXi4w/RbXcC/Ht5MqG+Laz49sPVO0Yws1CUWMkt5HJ 31pvKCpv+8KSSU7JssUhHN87U99BXSw5D8K2iy7hJmp3yF+y2mxVQZvnOeySFwE9zVFN DEoJr9qOAhPXUJ/kLsftBNBPfQf9iKFaOnQytWS8q0rkHSzrX6Maonh8Ae1LCOT8zosF WT1qcuSIpH4+vM+Hz2gR1nzmKAP1kcuPM0Fhi3j05fHZbXHKw4jpN0ht+/Z51AwCuTDX h5+Q== X-Gm-Message-State: AE9vXwNaveKr+iC7wx1Dc7G9bA8YEmqvY7XC+DEBcDtz/Ls1cob35vhDqZ59Xj64N3pZYzcExkY= X-Received: by 10.28.134.8 with SMTP id i8mr7791863wmd.59.1473328176499; Thu, 08 Sep 2016 02:49:36 -0700 (PDT) Received: from localhost.localdomain ([197.130.133.164]) by smtp.gmail.com with ESMTPSA id k2sm8683912wmg.23.2016.09.08.02.49.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Sep 2016 02:49:35 -0700 (PDT) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org, heyi.guo@linaro.org, leif.lindholm@linaro.org Date: Thu, 8 Sep 2016 10:49:26 +0100 Message-Id: <1473328166-18228-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473328166-18228-1-git-send-email-ard.biesheuvel@linaro.org> References: <1473328166-18228-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [Linaro-uefi] [PATCH 2/2] Platforms/Hisilicon/D0x: remove EFI_MEMORY_UC attribute from normal memory X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" 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. 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 --- Platforms/Hisilicon/Binary/D02/MemoryInitPei/MemoryInitPeiLib.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Platforms/Hisilicon/Binary/D02/MemoryInitPei/MemoryInitPeiLib.c b/Platforms/Hisilicon/Binary/D02/MemoryInitPei/MemoryInitPeiLib.c index fb712909e873..6eb85bb62f30 100644 --- a/Platforms/Hisilicon/Binary/D02/MemoryInitPei/MemoryInitPeiLib.c +++ b/Platforms/Hisilicon/Binary/D02/MemoryInitPei/MemoryInitPeiLib.c @@ -114,7 +114,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 |