From patchwork Tue Nov 1 17:25:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 80393 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp739001qge; Tue, 1 Nov 2016 10:27:51 -0700 (PDT) X-Received: by 10.159.36.244 with SMTP id 107mr25254779uar.51.1478021271448; Tue, 01 Nov 2016 10:27:51 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r93si14108918uar.145.2016.11.01.10.27.51; Tue, 01 Nov 2016 10:27:51 -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 17E2960C15; Tue, 1 Nov 2016 17:27:51 +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 34E7160E10; Tue, 1 Nov 2016 17:26:29 +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 B0A6F60DBA; Tue, 1 Nov 2016 17:26:14 +0000 (UTC) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by lists.linaro.org (Postfix) with ESMTPS id BF6EB60C15 for ; Tue, 1 Nov 2016 17:25:45 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id n67so299138207wme.1 for ; Tue, 01 Nov 2016 10:25:45 -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=0kI8x+p/3OP9W+3xDJyLyF92n8YmLVEWVY7dCJU2Kpg=; b=UfhvbA+mej2JcP03fdBVMH5x95o2eFSvSaJknNu1rOuB0heCLCixG5xJDuVi/+8f3P QHQyMdUSbVwuwY2Lq/+f442BOtfuMWj5wRiZsF3Dfyq3Iv7/vkKPv5Bz42j+miC3vuEX iRvm+LG2sANw6Ed8Tse5DNGIDNdkmzPORDhHc7Bws46GqreISaNVn/LPdgNgVK/2YwPr FCgdCMJ+D2y7btAgoL6P0p2z9b//idsYLJGxGBVmCKmxJZtNWB7ELWgck9ZLGET1NFRp 7xaYNR3OEMsiGdbiyU5cfkZvJe9TWjpwCo/ZNQI6YFgSZLis+nMvL3ADtKUfkw7aXqlC 1OAA== X-Gm-Message-State: ABUngveG3CeiWTINI1Eut9rz06BzRrQjPaXeIO5loqQegZMarWNzPCN4/0GJUmC4ekXZkRjlqjc= X-Received: by 10.28.91.141 with SMTP id p135mr2399431wmb.128.1478021144809; Tue, 01 Nov 2016 10:25:44 -0700 (PDT) Received: from localhost.localdomain ([105.151.153.127]) by smtp.gmail.com with ESMTPSA id za1sm36816240wjb.8.2016.11.01.10.25.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Nov 2016 10:25:44 -0700 (PDT) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org, leo.duran@amd.com, leif.lindholm@linaro.org, alan@softiron.co.uk Date: Tue, 1 Nov 2016 17:25:13 +0000 Message-Id: <1478021115-22781-7-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478021115-22781-1-git-send-email-ard.biesheuvel@linaro.org> References: <1478021115-22781-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [Linaro-uefi] [PATCH 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); }