From patchwork Tue Dec 11 18:35:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 153498 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp949398ljp; Tue, 11 Dec 2018 10:35:53 -0800 (PST) X-Google-Smtp-Source: AFSGD/Ud4lEhPPJES6S94ojtrNUDPhSLpjTm0S8AzPajkICe4hAfyi2Ebuo2v3fhR2CsOdv3s9eF X-Received: by 2002:a17:902:7443:: with SMTP id e3mr17093944plt.304.1544553353825; Tue, 11 Dec 2018 10:35:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544553353; cv=none; d=google.com; s=arc-20160816; b=NfynvR3v8hxr+8RliVgw7z8GjC736X7ZZgTdj8k7Cbs076SVoroqEzngP3MY2gzM1S IrBinQKhEsqHzFBYIFKYUaMtTQDDnnjjieErLpiNRf51K8aSs/g0JgenmxUVymBTDR39 JYuWgpYj8pGI9lAJD/Q/xWP15osNb/yZUq0IMqlRpnK9quRjo2ORKaNbUB4mZ12dtSLu 5mKe0PrWU4XMZiSt1XijXmtBg5ILI1Uuqj2HIjrGlBFa83raho2Jui4WGeaV8+siwoyk TQV7KY4d1vaw9IJ65AoLen/mQOTZc6SVencfWvgOVk8jQEqFQGaXeRQPFcN3WE3eiEH1 +hiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=/sq39RrSum+nDCtMYlg/jGHm6UcsePzxNp+gq3UAGkQ=; b=v0+kEvgh2hDVtBJGxZdt+QGmr2Qfh6rjQ6B9frKJ9v36O54BlV59n2vrwM/f6FxgLq kmIuTYoxj7PGEciE+/IGsWgLD9ZnGxGvk+gA0nEENjMCinrZGAWG6Ho1s0fTj7Ci1Ou6 vKKIJlEwGIn6LNE82OqkSv2DKBwAIBjCe8kWfFy4I+5UQCKduL2cz0rqRMJTp4OJ+DN5 3lCpcKBEdsPmiXtgD8MZq3G2JcpYMB8TV5zCaPfULjIqOg7FyU/xXPf7tn2cEeLdxeTv W6gS4cMlokNBjbykSbN3tu3YYcM+gnnWsX3pAqVABUcG6kiywlQIY6WRN3VMNsuSCsMN djNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ua5EUwUG; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id c7si12547264plz.118.2018.12.11.10.35.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 10:35:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ua5EUwUG; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7D75721BADAB2; Tue, 11 Dec 2018 10:35:35 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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-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 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: [edk2] [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: , Cc: alan@softiron.co.uk Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.19.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel 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 + } + } + } +} +