From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C38A1AC0A6D for ; Thu, 3 Aug 2023 06:35:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=RRetAeIFZzQzJr64rWN4C3zlS/8yYya7HSrXNJ/8DcM=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1691044526; v=1; b=S/RTEFhBFB/oZygRW0IMIM5BL9qHBJxKTc/8ZdZpV5Gji9+TIC28BimIlM44xsNyD5kaXLj+ sPTyuu/wltCoDfpawotCgaboogVYwoqp+tzNJfaM18tnkIwDrdqokpeqIcvmzBGSimk/gr3P8c/ cqeNhur+7i+NtoK1czHaqUaM= X-Received: by 127.0.0.2 with SMTP id 3b8EYY7687511xA4ODlGkHn3; Wed, 02 Aug 2023 23:35:26 -0700 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.70]) by mx.groups.io with SMTP id smtpd.web10.8408.1691044525447451409 for ; Wed, 02 Aug 2023 23:35:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=deIEbg6SnRzCiBB7t0QrchJlcwIjC+nzJ/xLf4rxjdVJx7sv21xZRRR0XWHhnojgP5P84BUzqSajcoQF5zi/CmwdoJF/CFiKQUDt8pKKny/JL5xF1XajmxnMjUDxbjGuArfhG2pxOvvb37mo8FFlOKNuM/+wJIYVUVDYTiAHADHDQPallcxxA0T3elQVELCYWPPjvtyTqBPFWfgckIsw9FI6uwXBzq6TPCbGT9J5g9hYdXbACRdTTksrdKsM9kop4v6JgU1yGTHd7cZ+dtZlehfZ00nfM4BSRykpOjTG9FCs5BKsR6PmoZQR7WIGUMKK7ybnEC3PhXiDopKJ2De31w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aYT4YNj9adZGamtSGXErIrYdiQr+PxInjLwqDgJxfSg=; b=T1o9ZHSvQFALhw07nfMegkaHSjM/x5FNK69vYCRifODaGNg6EyOCvcen5PcIYipfK1nLLtRSHn3o3oDuSGn27peJdtxN7qqwt9b/qhHbSQdgiqmDb2etiMlxfHmAJMK+IX4YRq9+hGn6HJgZQ8iARhPKQyltMBD2A43ejhnbaECpbOHcmH4XUshbRIXg3yjorDdDMP83QsgB7eAIc/LvP7vMfYcTZFvFT5VVP/GWM/FtfaXbhfSBvod0cXxYT6vQ+1ylnwyi7W6n5eYsUet10+tWbepYsf+c4e/chhetkWoXbCdOT4RZfMhsL9tb5Tx97ocrt8Dc3axrdZF0Iqo9dQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from DM6PR11CA0067.namprd11.prod.outlook.com (2603:10b6:5:14c::44) by CH0PR12MB5108.namprd12.prod.outlook.com (2603:10b6:610:bf::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.20; Thu, 3 Aug 2023 06:35:18 +0000 X-Received: from SA2PEPF00001507.namprd04.prod.outlook.com (2603:10b6:5:14c:cafe::98) by DM6PR11CA0067.outlook.office365.com (2603:10b6:5:14c::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Thu, 3 Aug 2023 06:35:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C X-Received: from SATLEXMB03.amd.com (165.204.84.17) by SA2PEPF00001507.mail.protection.outlook.com (10.167.242.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6652.19 via Frontend Transport; Thu, 3 Aug 2023 06:35:18 +0000 X-Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 3 Aug 2023 01:35:17 -0500 X-Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 2 Aug 2023 23:35:17 -0700 X-Received: from BLR-LAB-SFW01.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Thu, 3 Aug 2023 01:35:15 -0500 From: "Abdul Lateef Attar via groups.io" To: CC: Abdul Lateef Attar , Sai Chaganty , Isaac Oram , "Nate DeSimone" , Liming Gao , Abner Chang Subject: [edk2-devel] [PATCH 1/1] OutOfBandManagement/SpcrFeaturePkg: PCD based IRQ/GSI Date: Thu, 3 Aug 2023 12:05:12 +0530 Message-ID: <91291c25394aa9b63d1c5865e3137328903dfb87.1691044467.git.abdattar@amd.com> In-Reply-To: References: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001507:EE_|CH0PR12MB5108:EE_ X-MS-Office365-Filtering-Correlation-Id: 010142a2-fe7e-4eea-57a6-08db93ebcddf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: G+TmzWUfDQrrG/T7Tie/de5NmOXymeqMVUyFR5Vk8b1Jt7DX3Z/X4/+xypB4SjewpUDMv/3WxzdYFYr5rQijSIUhwvPc/pCTY+avHcMDSj+QlWiiZx6wdFmSzF3bjADLJabmpw29NGQpZTr+iYiphATWHrcqQ8HLaTWeL8WYMXPZTDCoRON4fL7s6+IJ5xJBiei2QpQu+jqYrJy582u3YYXivxnHIT2zBKw22ExxYjeLYc1VRqVe6Xz1HNjqoRpbLE7DEMVpREQfArXQ51q8L4WWQBUAtI/k75bt04DXMtRIOBsVHbe086qkf93iGZb1kCk55n8H57Xnj1bwGXi+VikahfQRPg34BMtahIuJqYO/8FqhULlV06SA2N1KXUMYa70EB/1+aKMBbD+rqPbQBgcm7WU30zn2JyS5CxHQpzQyZaOao5mvQTxIYqpDOLiaQosABPigBKYhtDbbre3MNf954j7TDBF1MELHyB70+siM637J4tibgZVUxYCZCA5wMJqRm7GMCZ+4/BMetJvf3edzvkv/UpIs7lYdQlyf/GG12ZgphTAOj8/8MGFEW9s7aVEkbqD7MUraxBjyIhylbh089aIxvgT0k8f0Xb92F4ignB2LpV5MN7YHM1CutPuQvtFkV0sgaKJXDRuxOXW2zr1LhIcB1KJvF5Eff49w9c9iWupLPOXYEDFbIhYTTnfzy2bl1snwdsg7wj/C0sSE0nZ8V5d/lTKQIRVMc2AvkgGHYWDKJV8fNoKkb2x9zSZEUDbjT56bgKNy5WoxDkXN3g== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2023 06:35:18.2996 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 010142a2-fe7e-4eea-57a6-08db93ebcddf X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001507.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5108 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abdattar@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: XUACTT2oXceh8tDdegGTvwN1x7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="S/RTEFhB"; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io From: Abdul Lateef Attar Create a new PCD to hold the IRQ or GSI number for SPCR, with default values of 4. Update the ACPI SPCR table's IRQ value based on PCD. Cc: Sai Chaganty Cc: Isaac Oram Cc: Nate DeSimone Cc: Liming Gao Cc: Abner Chang Signed-off-by: Abdul Lateef Attar Change-Id: I7218903fa5572f8139ad45db598ab085f079713b --- .../OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec | 5 +++++ .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf | 4 ++++ .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.h | 3 +++ .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c | 7 ++++--- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeatureP= kg.dec b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d= ec index b084fad89220..d69d650f3f20 100644 --- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec @@ -7,6 +7,7 @@ # for the build infrastructure. # # Copyright (c) 2020, Intel Corporation. All rights reserved.
+# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -24,6 +25,10 @@ [Includes] [Guids] gSpcrFeaturePkgTokenSpaceGuid =3D { 0xe978c988, 0xeeba, 0x4671, { 0xb8, = 0x0d, 0xcc, 0x8b, 0x89, 0xb5, 0xd1, 0xef }} =20 +[PcdsFixedAtBuild] + # SPCR default IRQ set to 4 + gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt|4|UINT8|0x00000010 + [PcdsFeatureFlag] gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable|FALSE|BOOLEAN|0x00000= 001 =20 diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/= SpcrAcpiDxe.inf b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcp= iDxe/SpcrAcpiDxe.inf index 9a4f95e86bbf..cd43afea5242 100644 --- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcp= iDxe.inf +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcp= iDxe.inf @@ -24,6 +24,7 @@ [LibraryClasses] UefiDriverEntryPoint UefiLib SpcrDeviceLib + PcdLib =20 [Packages] MdePkg/MdePkg.dec @@ -51,5 +52,8 @@ [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio =20 +[FixedPcd] + gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrInterrupt + [Depex] TRUE diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/= SpcrAcpi.h b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/= SpcrAcpi.h index c11da439fcb8..245a847762c5 100644 --- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcp= i.h +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcp= i.h @@ -3,6 +3,8 @@ SPCR is abbreviation of Serial Port Console Redirection Table (SPCR). =20 Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.
+ Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -23,6 +25,7 @@ #include #include #include +#include =20 #include #include diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/= SpcrAcpi.c b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/= SpcrAcpi.c index 51449d0fad9e..e92db96caaa9 100644 --- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcp= i.c +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcp= i.c @@ -3,7 +3,7 @@ SPCR is abbreviation of Serial Port Console Redirection Table (SPCR). =20 Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.
- Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -83,8 +83,8 @@ EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE gSpcrInfo = =3D { }, =20 0x03, //INTERRUPT_TYPE, - 0x04, //IRQ, - 0x04, //GLOBAL_SYSTEM_INTERRUPT, + FixedPcdGet8 (PcdSpcrInterrupt), // IRQ, + FixedPcdGet8 (PcdSpcrInterrupt), // GLOBAL_SYSTEM_INTERRUPT, 0x07, //BAUD_RATE, 0x00, //PARITY, 0x01, //STOP_BITS, @@ -441,6 +441,7 @@ OutOfBandACPITableConstruction ( gSpcrInfo.FlowControl =3D UART_FLOW_CONTROL_HARDWARE; } =20 + if (HasIsaSerialNode(SavedDevicePath)) { GetIsaTypeInfo (SavedDevicePath); } else { --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107519): https://edk2.groups.io/g/devel/message/107519 Mute This Topic: https://groups.io/mt/100521521/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-