From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::343; helo=mail-wm1-x343.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 428B92119A44D for ; Tue, 11 Dec 2018 10:35:34 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id y139so3253120wmc.5 for ; Tue, 11 Dec 2018 10:35:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=77PB661ZdnANpg/fw4EvX3+JLzMM8lFxPalvD+nfUlc=; b=Ua5EUwUGR20kbZ7nKwIQNO4Kg7kD5a4d3fbqugYwUcqU7Tk+NAJG1ug/vwcQjkt3aG lcnIhGA/b70S4p5MlD4875ySKoD/rkS/UTMWY7OKsia4I3hfV5/STewVSbQpw15q+EGL Hl21r6KH/TqlabbtOrnf99xhNtA5iq6TW3USs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=77PB661ZdnANpg/fw4EvX3+JLzMM8lFxPalvD+nfUlc=; b=ttszXzCLvZOedaxuL4BXyy/3axvzUqt/qVf9H28/P654serQWaYglF05P/hecTC7HF TxdJZ3B4pfZ4RM1CDwt2q+gu9EySY5fyJEIwR00d4b+vi2J14VOk2AfB783aUyZ/OEkW l3DqB+Z8qO06sFg59BSL+Ow/I5qeQsUpC3aVNl/uqn8SbJv0CBM+wdznn2tGmZPgaFt1 FwVDMYeBuFa7CIfFJS9GPMlq5OTLiXaqSoJc/X+V5wO5+03pjUou2kxtosXZTty6rhHX +UV0h99T+vYMybgjcxMjgQm6R7Si8rmDm6PAq1NV8cHl0vsReAFok/iQO/ygB5Sx4Kyb mfQw== X-Gm-Message-State: AA+aEWYiI0dSNFlREO1v0Z0el0pF8uCOnY8tn5XPz2upZyufCif8mGIs gXgnGIFEk7JO7hdaqc7UCuxEkRjyChbgqQ== X-Google-Smtp-Source: AFSGD/X+Hjco5ZE1KQkK+oI4mz62UcNLNZDvT1mlRgDecmeF5RSXbuYK/+v2dnhEMShpa3fjO43xMg== X-Received: by 2002:a1c:cf82:: with SMTP id f124mr3499274wmg.95.1544553332422; Tue, 11 Dec 2018 10:35:32 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:8c3:6b9d:cbc9:58c6]) by smtp.gmail.com with ESMTPSA id h131sm1026688wmd.17.2018.12.11.10.35.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 10:35:31 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, alan@softiron.co.uk, Ard Biesheuvel Date: Tue, 11 Dec 2018 19:35:11 +0100 Message-Id: <20181211183514.20948-9-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181211183514.20948-1-ard.biesheuvel@linaro.org> References: <20181211183514.20948-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [PATCH edk2-platforms 08/11] Silicon/AMD/Styx/AcpiPlatformDxe: move IPMI/KCS device into separate SSDT X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 18:35:34 -0000 Content-Transfer-Encoding: 8bit Move the IPMI/KCS device node from the DSDT into its own SSDT, and only install it if we have support for KCS enabled in the platform. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf | 2 + Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c | 5 +++ Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl | 25 ----------- Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl | 47 ++++++++++++++++++++ 4 files changed, 54 insertions(+), 25 deletions(-) diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf index d27431343f4b..f231e0b2ee75 100644 --- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf +++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf @@ -39,6 +39,7 @@ Pptt.aslc Spcr.aslc SsdtB1.asl + SsdtKcs.asl SsdtXgbe.asl [Packages] @@ -74,6 +75,7 @@ gAmdStyxTokenSpaceGuid.PcdCntCTLBase gAmdStyxTokenSpaceGuid.PcdCntBase0 gAmdStyxTokenSpaceGuid.PcdCntEL0Base0 + gAmdStyxTokenSpaceGuid.PcdEnableKcs gAmdStyxTokenSpaceGuid.PcdGicVersion gAmdStyxTokenSpaceGuid.PcdGicHypervisorInterruptInterfaceBase gAmdStyxTokenSpaceGuid.PcdGicVirtualInterruptInterfaceBase diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c index 9c8c8b09d4a4..9b1428fc00eb 100644 --- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c +++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/AcpiPlatform.c @@ -171,6 +171,11 @@ InstallSystemDescriptionTables ( break; + case SIGNATURE_64 ('S', 't', 'y', 'x', 'K', 'c', 's', ' '): + if (!FixedPcdGetBool (PcdEnableKcs)) { + continue; + } + default: switch (Table->Signature) { case EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE: diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl index 60288114aeab..118382371d73 100644 --- a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl +++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/Dsdt.asl @@ -295,31 +295,6 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "AMDINC", "SEATTLE ", 3) }) } -#if DO_KCS - // - // IPMI/KCS - // - Device (KCS0) - { - Name (_HID, "AMDI0300") - Name (_CID, "IPI0001") - Name (_STR, Unicode("IPMI_KCS")) - Name (_UID, 0) - Name (_CRS, ResourceTemplate() { - Memory32Fixed(ReadWrite, 0xE0010000, 0x1) // KCS Data In/Out - Memory32Fixed(ReadWrite, 0xE0010004, 0x1) // KCS Control/Status - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive,,,) { 421 } // GSIV - }) - Method (_IFT) { // Interface Type - Return ( 0x01) // IPMI KCS - } - - Method (_SRV) { // Spec Revision - Return (0x200) // IPMI Spec v2.0 - } - } -#endif // DO_KCS - // // PCIe Root Bus // diff --git a/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl new file mode 100644 index 000000000000..3cac427df2d6 --- /dev/null +++ b/Silicon/AMD/Styx/Drivers/AcpiPlatformDxe/SsdtKcs.asl @@ -0,0 +1,47 @@ +/** @file + + SSDT for IPMI controller + + Copyright (c) 2014, ARM Ltd. All rights reserved.
+ Copyright (c) 2014 - 2016, AMD Inc. All rights reserved.
+ + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + + +DefinitionBlock ("SsdtKcs.aml", "SSDT", 2, "AMDINC", "StyxKcs ", 3) +{ + Scope (_SB) + { + // + // IPMI/KCS + // + Device (KCS0) + { + Name (_HID, "AMDI0300") + Name (_CID, "IPI0001") + Name (_STR, Unicode("IPMI_KCS")) + Name (_UID, 0) + Name (_CRS, ResourceTemplate() { + Memory32Fixed(ReadWrite, 0xE0010000, 0x1) // KCS Data In/Out + Memory32Fixed(ReadWrite, 0xE0010004, 0x1) // KCS Control/Status + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive,,,) { 421 } // GSIV + }) + Method (_IFT) { // Interface Type + Return ( 0x01) // IPMI KCS + } + + Method (_SRV) { // Spec Revision + Return (0x200) // IPMI Spec v2.0 + } + } + } +} + -- 2.19.2