From patchwork Tue Dec 6 09:45:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 86727 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1927603qgi; Tue, 6 Dec 2016 01:47:08 -0800 (PST) X-Received: by 10.200.57.134 with SMTP id v6mr52894059qte.36.1481017628734; Tue, 06 Dec 2016 01:47:08 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v54si11276166qtc.177.2016.12.06.01.47.06; Tue, 06 Dec 2016 01:47:08 -0800 (PST) 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 C4E1560C07; Tue, 6 Dec 2016 09:47:06 +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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 D8EB960C1D; Tue, 6 Dec 2016 09:46:22 +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 7F5ED60AB8; Tue, 6 Dec 2016 09:46:11 +0000 (UTC) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by lists.linaro.org (Postfix) with ESMTPS id 4EA8F60C07 for ; Tue, 6 Dec 2016 09:46:07 +0000 (UTC) Received: by mail-wm0-f54.google.com with SMTP id a197so121858277wmd.0 for ; Tue, 06 Dec 2016 01:46:07 -0800 (PST) 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=0kI8x+p/3OP9W+3xDJyLyF92n8YmLVEWVY7dCJU2Kpg=; b=kqhKG+LS2G4hCwaUxVE0F0z6c25o9BQo/0BXmpQTgdS12Ow+xZkdvjSrsvitG5lXwM qBYzIsdZA132zn8VxxpYtfvNA+KG5f5Z9dsgN2JMZr9AMAsmjwn2O+Cptc6zR0+d7MrK 29S7iUqVG0zYj4Q2gcgS4tXNaQpI/xBPBlXpC7MZeQ7Q3SLdN3ugRIzFbPcc7potINPO pTpcE8sr3PrTER2yaeO6IIa1mmJH8t6MBvHhXW31HXPHQZ1XFo/fAdx7fyypF7wsZiLN Y0yBbkaNL2GRBuqrpG7l4pA0DINLc3nQmz3ma+PWXeHMVGIp7ZYi1SNK/OCMRFlOxI+6 N5AQ== X-Gm-Message-State: AKaTC02MU2ocgNE3UNVifVD+wMBGLcBjHHxqV0QeVRYLd107uxA+Yc+aSkl7aCo3pbEvSsYTU5I= X-Received: by 10.28.175.204 with SMTP id y195mr1929174wme.106.1481017566343; Tue, 06 Dec 2016 01:46:06 -0800 (PST) Received: from localhost.localdomain ([105.144.52.243]) by smtp.gmail.com with ESMTPSA id kq7sm24786708wjb.30.2016.12.06.01.46.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Dec 2016 01:46:05 -0800 (PST) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org Date: Tue, 6 Dec 2016 09:45:46 +0000 Message-Id: <1481017548-16050-7-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481017548-16050-1-git-send-email-ard.biesheuvel@linaro.org> References: <1481017548-16050-1-git-send-email-ard.biesheuvel@linaro.org> Cc: alan@softiron.co.uk Subject: [Linaro-uefi] [PATCH v2 6/8] Platforms/AMD/Styx/AcpiTables: enable second SATA controller 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" Enable the second AHCI ACPI node when any ports are enabled on the second SATA controller. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Platforms/AMD/Styx/AcpiTables/AcpiTables.inf | 1 + Platforms/AMD/Styx/AcpiTables/Dsdt.c | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Platforms/AMD/Styx/AcpiTables/AcpiTables.inf b/Platforms/AMD/Styx/AcpiTables/AcpiTables.inf index 72272aa0b85a..12e0444009ef 100644 --- a/Platforms/AMD/Styx/AcpiTables/AcpiTables.inf +++ b/Platforms/AMD/Styx/AcpiTables/AcpiTables.inf @@ -83,6 +83,7 @@ gAmdStyxTokenSpaceGuid.PcdPsciOsSupport gAmdStyxTokenSpaceGuid.PcdTrustedFWSupport gAmdStyxTokenSpaceGuid.PcdParkingProtocolVersion + gAmdStyxTokenSpaceGuid.PcdSata1PortCount [Depex] gAmdMpCoreInfoProtocolGuid diff --git a/Platforms/AMD/Styx/AcpiTables/Dsdt.c b/Platforms/AMD/Styx/AcpiTables/Dsdt.c index 922d7214adf4..360a446f7631 100644 --- a/Platforms/AMD/Styx/AcpiTables/Dsdt.c +++ b/Platforms/AMD/Styx/AcpiTables/Dsdt.c @@ -174,15 +174,10 @@ DsdtHeader ( else if (AsciiStrCmp(Table->Pathname, "_SB_.ETH1._DSD") == 0) { OverrideMacAddr ((UINT8 *)&AmlCode[Table->Offset], PcdGet64 (PcdEthMacB)); } -#if DO_SATA1 else if (AsciiStrCmp(Table->Pathname, "_SB_.AHC1._STA") == 0) { - OverrideStatus ((UINT8 *)&AmlCode[Table->Offset], EnableOnB1); - } -#else - else if (AsciiStrCmp(Table->Pathname, "_SB_.AHC1._STA") == 0) { - OverrideStatus ((UINT8 *)&AmlCode[Table->Offset], FALSE); + OverrideStatus ((UINT8 *)&AmlCode[Table->Offset], + EnableOnB1 && FixedPcdGet8(PcdSata1PortCount) > 0); } -#endif else if (AsciiStrCmp(Table->Pathname, "_SB_.GIO2._STA") == 0) { OverrideStatus ((UINT8 *)&AmlCode[Table->Offset], EnableOnB1); }