From patchwork Thu Sep 8 09:49:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 75747 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp750879qgf; Thu, 8 Sep 2016 02:49:42 -0700 (PDT) X-Received: by 10.202.217.137 with SMTP id q131mr32762268oig.187.1473328181931; Thu, 08 Sep 2016 02:49:41 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m135si29895650oig.162.2016.09.08.02.49.41; Thu, 08 Sep 2016 02:49:41 -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 3D67961877; Thu, 8 Sep 2016 09:49:41 +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 E598B61726; Thu, 8 Sep 2016 09:49:37 +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 638E561726; Thu, 8 Sep 2016 09:49:36 +0000 (UTC) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by lists.linaro.org (Postfix) with ESMTPS id 74EEC6171C for ; Thu, 8 Sep 2016 09:49:35 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id 72so3908444wme.1 for ; Thu, 08 Sep 2016 02:49:35 -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; bh=UYjGN4X3Tce6SdF4+tqKnwZ7T2QTD2R6+cLZxuRgGlo=; b=ZPpKQ2G28OcPxhuE0jZtcoj75URDAyObQYKX5AKJu2om6zXoKZO1gZF1DE+XttU210 5mUhR0ommSwhWEjcm/thnlv8N0K9I49iuUkTJI9jyCDpZSG1fEvOpPxBnlYT9ku3UjM3 GM01kM933FnaTWGsb4FovCtepzQfs6TgXn0q2D1Dn+ZS/fByMLowDpuw5Wnhu884U/Iq 7ulit5B/NZv9EXsvTk0ovM7NbHbgtZAzV1TyKCoGq8uN/kMnTJ8cZG1WdX+9vrxldhbV t0N3rS9YDdiRR2dBVcpl1ow/J/YbcxBwqV2nlBEoYlgfOdGRwjO3yJXsfq6vctIEevAq 6RfQ== X-Gm-Message-State: AE9vXwP9X+kv6EGDjgKPmnYErjCvtER68/O59EWEf65c3pwGigPC3dcbQEORJuSzvwKchdVHzBg= X-Received: by 10.194.75.225 with SMTP id f1mr45052874wjw.104.1473328174590; Thu, 08 Sep 2016 02:49:34 -0700 (PDT) Received: from localhost.localdomain ([197.130.133.164]) by smtp.gmail.com with ESMTPSA id k2sm8683912wmg.23.2016.09.08.02.49.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Sep 2016 02:49:33 -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:25 +0100 Message-Id: <1473328166-18228-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [Linaro-uefi] [PATCH 1/2] Platforms/AMD: 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 --- Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c index 5fb63349864e..70821d1b120b 100644 --- a/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c +++ b/Platforms/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c @@ -143,7 +143,6 @@ MemoryPeim ( EFI_RESOURCE_SYSTEM_MEMORY, ( 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 | @@ -164,7 +163,6 @@ MemoryPeim ( EFI_RESOURCE_SYSTEM_MEMORY, ( 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 |