From patchwork Mon May 9 16:07:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 67352 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1671913qge; Mon, 9 May 2016 09:07:15 -0700 (PDT) X-Received: by 10.55.103.68 with SMTP id b65mr38030476qkc.22.1462810035815; Mon, 09 May 2016 09:07:15 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h140si19072229qhc.40.2016.05.09.09.07.15; Mon, 09 May 2016 09:07:15 -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 5FF6361603; Mon, 9 May 2016 16:07:15 +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=-1.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, TVD_SUBJ_WIPE_DEBT, URIBL_BLOCKED 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 A0845610F6; Mon, 9 May 2016 16:07:12 +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 12FC86158E; Mon, 9 May 2016 16:07:11 +0000 (UTC) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by lists.linaro.org (Postfix) with ESMTPS id 39900610F6 for ; Mon, 9 May 2016 16:07:10 +0000 (UTC) Received: by mail-wm0-f50.google.com with SMTP id a17so195699431wme.0 for ; Mon, 09 May 2016 09:07:10 -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=75tj2SBmc3o9WzpiDh4237f26SN/JPWgxVkEXydpZ7A=; b=lLLMXmqsY/Giz6QLg28p7lK2UKf85KDSZHgMOGQjlp0UQz/vwxhM9PVxqbYgPae3Eb sWkEB4iMWsFkUSjkO3d59mlCcRy799OTdUX7ugVm/OILcl6cykj/OOhVjNAqff/VBurk CjZiPYmQWCa9Ke37cfVky8QKDL7bOHPJPGqfK6x0310asb2jkks3eQdWw+Wij5ck8s4K vlps0cq3xy5pvaiAuAENfB6c7vFdzXKUg6vbm6Ytj4bxz19MytkDNqXwB8B0ElXogTV8 DkMykBsDZJ6ihTKNbRuxJRVW3OfpzTjEquFKMEq3QaLiBkgkM4EMdt8JAjlPjrhGGZi1 rweg== X-Gm-Message-State: AOPr4FUMSBvSSnozQklWiD8NyFD7pfY/7E05VELC+emgs+CwjSkxlYHLG1in5ohj3JRaeBQ05cs= X-Received: by 10.28.26.200 with SMTP id a191mr12761010wma.55.1462810029374; Mon, 09 May 2016 09:07:09 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id kz1sm31880185wjc.46.2016.05.09.09.07.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 May 2016 09:07:08 -0700 (PDT) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org Date: Mon, 9 May 2016 18:07:04 +0200 Message-Id: <1462810024-24619-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Cc: leo.duran@amd.com Subject: [Linaro-uefi] [PATCH] Platforms/AMD/AmdStyxLib: remove lowest gigabyte from 1:1 mapping 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" The physical region [0x0, 0x4000_0000) is not used on Seattle for non-secure devices or memory, and inadvertent accesses in this region (e.g., NULL pointer dereferences) seem to be causing SErrors. So leave the region unmapped: this does not fix the issues causing the SErrors, but the aborts will at least be synchronous. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Platforms/AMD/Styx/Library/AmdStyxLib/StyxMem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Platforms/AMD/Styx/Library/AmdStyxLib/StyxMem.c b/Platforms/AMD/Styx/Library/AmdStyxLib/StyxMem.c index 9202e38864d4..dc45b68c3ce8 100644 --- a/Platforms/AMD/Styx/Library/AmdStyxLib/StyxMem.c +++ b/Platforms/AMD/Styx/Library/AmdStyxLib/StyxMem.c @@ -93,10 +93,10 @@ ArmPlatformGetVirtualMemoryMap ( DEBUG ((EFI_D_ERROR, " Memory Map\n------------------------------------------------------------------------\n")); DEBUG ((EFI_D_ERROR, "Description : START - END [ SIZE ] { ATTR }\n")); - // 0x00_0000_0000 - 0x7F_FFFF_FFFF: Mapped I/O space - VirtualMemoryTable[Index].PhysicalBase = 0x0000000000ULL; - VirtualMemoryTable[Index].VirtualBase = 0x0000000000ULL; - VirtualMemoryTable[Index].Length = 0x8000000000ULL; + // 0x00_4000_0000 - 0x7F_FFFF_FFFF: Mapped I/O space + VirtualMemoryTable[Index].PhysicalBase = 0x0040000000ULL; + VirtualMemoryTable[Index].VirtualBase = 0x0040000000ULL; + VirtualMemoryTable[Index].Length = 0x7FC0000000ULL; VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; LOG_MEM ("I/O Space : 0x%016lx - 0x%016lx [ 0x%016lx ] { %a }\n");