From patchwork Tue Nov 1 19:27:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 80402 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp789461qge; Tue, 1 Nov 2016 12:28:37 -0700 (PDT) X-Received: by 10.31.191.194 with SMTP id p185mr14292037vkf.98.1478028517215; Tue, 01 Nov 2016 12:28:37 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u29si9692599uaa.84.2016.11.01.12.28.36; Tue, 01 Nov 2016 12:28:37 -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 3728F60866; Tue, 1 Nov 2016 19:28:13 +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 CF229606B5; Tue, 1 Nov 2016 19:28:09 +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 90CC76082A; Tue, 1 Nov 2016 19:28:08 +0000 (UTC) Received: from mail-it0-f49.google.com (mail-it0-f49.google.com [209.85.214.49]) by lists.linaro.org (Postfix) with ESMTPS id C33A36068E for ; Tue, 1 Nov 2016 19:28:07 +0000 (UTC) Received: by mail-it0-f49.google.com with SMTP id e187so48615268itc.0 for ; Tue, 01 Nov 2016 12:28:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=r6wqdag8FsRD2tvUqNHobHe0fSN2xx+qD3DO9/nIzDI=; b=OQ5ed2HzMieqqWIfENhDf9AAcW9nOxv8VpQKRVJj6iCNf2zGwsuGogR+l3IW7VirvC 5DwkmqZBKHlyqzKl6j7l6uYwvHXwIJmhroBHrHErR2GPCK9AnQnArl75Ux12Ldcp6ydE 90pBj5J+94Ud5Unx7WDasZmmakl/ef2UjsJfNlDj+gUzkfaP7QAubBaxZglQIDFGNASL a+UvKPUDkdDQVs+0FNHAEJRx1+PH430WKmmoCQf4ipnutb98NUqHw/NUQRiutARU79Dr JxSlfxdxWTWRzKwD11pXHncf8YZGAtIdAbX9Gup0TjuKX+VvCOF/YJHhxOqVC0Vp7LPZ 6yWw== X-Gm-Message-State: ABUngvfQ1awr2VTLy52xsvUsbDBz1REccqPL22ONXmfwbLffKc3J6LFinbbLOPQIUftNgVoeQQCCpnJivsLJ2Wm/WQc= X-Received: by 10.107.28.148 with SMTP id c142mr196975ioc.45.1478028434948; Tue, 01 Nov 2016 12:27:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.5.139 with HTTP; Tue, 1 Nov 2016 12:27:14 -0700 (PDT) In-Reply-To: <1478021115-22781-7-git-send-email-ard.biesheuvel@linaro.org> References: <1478021115-22781-1-git-send-email-ard.biesheuvel@linaro.org> <1478021115-22781-7-git-send-email-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Tue, 1 Nov 2016 19:27:14 +0000 Message-ID: To: linaro-uefi , "Duran, Leo" , Leif Lindholm , Alan Ott Subject: Re: [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: , Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" On 1 November 2016 at 17:25, Ard Biesheuvel wrote: > 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 With the following hunk folded in, both SATA controllers are detected correctly under Linux using ACPI as well as DT. }) } > --- > 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); > } > -- > 2.7.4 > diff --git a/Platforms/AMD/Styx/AcpiTables/Dsdt.asl b/Platforms/AMD/Styx/AcpiTables/Dsdt.asl index 4e80e4e59547..7edec3d1ec28 100644 --- a/Platforms/AMD/Styx/AcpiTables/Dsdt.asl +++ b/Platforms/AMD/Styx/AcpiTables/Dsdt.asl @@ -130,7 +130,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "AMDINC", "SEATTLE ", 3) 0xE000007C, // Address Base (SGPIO) 0x00000001, // Address Length ) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) {0x00000189, } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) {0x00000182, }