From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.111734.1682986104558550613 for ; Mon, 01 May 2023 17:08:25 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=W4AK+fw6; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: isaac.w.oram@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682986104; x=1714522104; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+wlyAL5pUqB5Pd6+rR3IqAk93YWtpcSDRgntZH8nY1k=; b=W4AK+fw6JiFEPKllCaVWf9+f3r068Fs39h6LhOd9YXPzHVcf3HJTAwPO /zp1oO9EXn8o/0fYo4oui52wyPTRV71jSSFO9DeGnlXhxW/lRgmFLy+lk HmAqz5xSqLpco3u39GIjb8JaBCl0JswcbmWAtXHeMyT5y+NrqhcaSOJlG 0CSu17dp3Bn7rL6DukkcenF7GnwXyy0VIuzcqbUe34KQk6erBsBC0qkx7 UPqytYoxrQVaKy0rgAgXvybHpOU5xy6rEocVsNUPlAD+62b/o/41DxYWf WhGKE+/JkRP7ZQ1DFFt/pg8v4RzrPuV3oJQ0pnmqf8bMNStisiiioReDu g==; X-IronPort-AV: E=McAfee;i="6600,9927,10697"; a="350347032" X-IronPort-AV: E=Sophos;i="5.99,242,1677571200"; d="scan'208";a="350347032" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 May 2023 17:08:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10697"; a="690079600" X-IronPort-AV: E=Sophos;i="5.99,242,1677571200"; d="scan'208";a="690079600" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga007.jf.intel.com with ESMTP; 01 May 2023 17:08:23 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 1 May 2023 17:08:23 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 1 May 2023 17:08:23 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Mon, 1 May 2023 17:08:23 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Mon, 1 May 2023 17:08:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IWEFrkZoN4yJD/5tpSDxt/ecRGBGqa6OCFAOevhDIdpd+YH2LU2QcacZ84pxtM3na+km87kSy1SBirXE3lt/Ydq1LvkpQQ9NS/U4eSh61kaxZuEign1SMMjL2pA4JM64nvDE+ZCQxkjHgFE0DnoCaenM7TGffeP6pfFGty8M4illJGjJlCwfwinjf6WPFRGTZtRnE9OZWTkrK1/mng8Pb0+sQ5R6LS55Uj9giXKiAjXOlJ1uXx0QXhOCzanAGGOPQKBZsCGKYZN/kjtUUYrnJuY5AHK+cAOxIVlR0XZ0Zh9SS/es+5KCjdHk4kd1pvMAExtYwnKQNCc5inSRCTHfFg== 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=lqdinsER2HZJs94VsvCM2MlqbxW6DgUixTvBeTO4ki8=; b=X1ZvELnuy4eeAM14xjghqJrWqsIttlbwip3HdpvVnAZGieypxm4jj55ZBmmvQegDLtYkEsY9eKaCiOL9S91UljASW5s93m3fuKNlygSYbiOJGwNIETedDtqrIGJMhIYTcUrwg4DBneOSeTukz8+Ky7+4SBFJ8aQIX3m5dlknWFmanBHbc0R/i0hYn5LzmYYtODhoDOx3YJZM0wePJAmeECX7N0dEZPjHsS7kmgTu9ePjL2cbJx64OYGg0BNlOZ7g8wQ1clPueeN47P+HuWoNzSjjJVoIj6xNbYC74xj1CvUncaZBiTQE7GyrkQzwsWM+AvN4BslGMdvEQpf/bVYiIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SA1PR11MB5801.namprd11.prod.outlook.com (2603:10b6:806:23d::13) by SA2PR11MB5195.namprd11.prod.outlook.com (2603:10b6:806:11a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.30; Tue, 2 May 2023 00:08:20 +0000 Received: from SA1PR11MB5801.namprd11.prod.outlook.com ([fe80::6979:a90f:e224:41c5]) by SA1PR11MB5801.namprd11.prod.outlook.com ([fe80::6979:a90f:e224:41c5%4]) with mapi id 15.20.6340.029; Tue, 2 May 2023 00:08:20 +0000 From: "Isaac Oram" To: "Attar, AbdulLateef (Abdul Lateef)" , "devel@edk2.groups.io" CC: "Chang, Abner" , "Chaganty, Rangasai V" , "Desimone, Nathaniel L" , "Gao, Liming" Subject: Re: [PATCH v1 1/1] SpcrFeaturePkg: Updated SPCR table based on PCD values Thread-Topic: [PATCH v1 1/1] SpcrFeaturePkg: Updated SPCR table based on PCD values Thread-Index: AQHZa5bkZyavaPV+gEijMpk5GVhjLa9AlUUAgAWn7OA= Date: Tue, 2 May 2023 00:08:20 +0000 Message-ID: References: <7e573a1e75f5f61a453f099edbf846e59b0b162e.1681122267.git.abdattar@amd.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ActionId=8a4af0e0-4edb-4e45-8967-76fe5f1e7e4b;MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ContentBits=0;MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Enabled=true;MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Method=Privileged;MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Name=Public-AIP 2.0;MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SetDate=2023-04-27T02:56:15Z;MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SA1PR11MB5801:EE_|SA2PR11MB5195:EE_ x-ms-office365-filtering-correlation-id: a82ccd6e-2f7b-480b-6f21-08db4aa1568f x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VlSKz1DSmVJUFId+4oR5RSP4yV1G/Z9htxras6aqAcHaUwYMiRMj9NqoMXJb6wxKNppmTWWaWGgmEGPNw3D6NtMTE/Cp+nGJtbHeTQMRhxN/HktLQJ1qeX+0kALDUxx+yrtwRe1ZMNbRs3s6TyqBXhIbBlG5Y7g4ePKKT6o/tD97kxrm8e04a8l+It2CfPNFVEMkKgEs55rjpPoEmidThAofbtnDJj2SW+h7qv75xe5jNZ9NKW77VVJVUkmPZvKd1TvSnktib3qa4AgdVHYXLIOr5o5QfXG7Hllakm2Lf7hafuQynAIEyqRoAPxgk7BlvdXCzOlU/Q3iEdXfYBQzgzb6S1Q+UbqKS2JEOUMP+ldtvbdRLrO5UYuenJ5O+Bspkwu3VECtGB1ZHFh46tKeHPImo+gAnCN43AHZcbTEPBUR7OCvRE2YkHLn343GEOEUnNPAaRs5ABBzIQjOEAAk1H6poisc9/2vQ9ZHNDgez2vkYmqN/MFRwFlFiNLhNHlKTIlrEfjWnzOTaUfnNWT2owAH9i1BoD9Yi0BRJBjJ/VqvKATFjamS+hP9eRxorWhYDbBFtC5gTAqOZ+a9dbqHPnK1GVTBsPVivSDIABQ0eLU0/ZBBCSnqPFgFhqNauPJJ x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR11MB5801.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(136003)(376002)(39860400002)(346002)(366004)(396003)(451199021)(83380400001)(9686003)(26005)(6506007)(186003)(71200400001)(53546011)(7696005)(86362001)(54906003)(110136005)(33656002)(478600001)(66946007)(76116006)(82960400001)(316002)(122000001)(41300700001)(38100700002)(66446008)(64756008)(4326008)(66556008)(66476007)(8936002)(8676002)(5660300002)(52536014)(15650500001)(2906002)(55016003)(38070700005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3as0/f4q6CnbWF/IHdZ3LOtlgLoeXmB6ikRtCsUmWkB0T6CkvfLvBak2i/pS?= =?us-ascii?Q?gSA4/2eMA1SQO6pzMP3QP4wFdBB9l1ZjC1KwUwXpEfzDconS5FAPlhIx2tuB?= =?us-ascii?Q?vV7pDf8YxwhiTreRTXML6n74cxG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ascii?Q?ZeKwZQPQ3Qtj6q4wan/a/14id0cR3PhukQe3Mxqyj805XWwjrhoOs0CFJjEr?= =?us-ascii?Q?IcXd28oEI0m1ZVXXwDHfCmVGPJEdO8fbwQN04kMc9p7OpAPhwHejTKAsd8aA?= =?us-ascii?Q?ofUEoCDCPmkkRAookR4zIfrMMYdlzR2gZv/8gxErDxuZn7pNMnVXT4558bpg?= =?us-ascii?Q?SEBkwX25HgNL6VmcJzejF55Libxm1RrV/B3lu5uLBU0cEM/JSiF6Di4i1vsR?= =?us-ascii?Q?VkKaxm+xE9kxZkWQxE6361EVg3eha9OKLLTaYqPbIcaefaxe/D2q8iOaqsAJ?= =?us-ascii?Q?cGiTBp3+IcmhjbgrBHi3QEqfVvVyvZOeww6rmRcLDfVLodAq/QBO0uz6SGvc?= =?us-ascii?Q?XxFl2Wgw2SqUrMba+Tmq+BrnAuZ5E/yr1tFKaSM4jmilbmUhl0zKyfhLWW+o?= =?us-ascii?Q?2NCSZRFjTuwfC7KmU0wO7Erxk5UKxgYS2gmj6prZ7s9uz0l4AWHea50O2gJx?= =?us-ascii?Q?+OdsDr1XuOYWI3GxcvLqtmfbM7utx8xH2+ehWJBq27pGD6RPnC+vA28YwCJc?= =?us-ascii?Q?dIH94stnvZ1XIbEmfmxvc4bEg5X+yQiopVOa4F8f?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB5801.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a82ccd6e-2f7b-480b-6f21-08db4aa1568f X-MS-Exchange-CrossTenant-originalarrivaltime: 02 May 2023 00:08:20.4873 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: aOib3cqAJqL/UEj1QRcGl8hYWFsB9WF8ShkwTQSu+lNOvUdKVvu9VQtxuZ0w7j65HT8WwB0H9oB4K/B8E6lScg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5195 Return-Path: isaac.w.oram@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Isaac Oram -----Original Message----- From: Attar, AbdulLateef (Abdul Lateef) =20 Sent: Friday, April 28, 2023 2:46 AM To: Attar, AbdulLateef (Abdul Lateef) ; devel@ed= k2.groups.io Cc: Chang, Abner ; Chaganty, Rangasai V ; Oram, Isaac W ; Desimone, Nathan= iel L ; Gao, Liming Subject: RE: [PATCH v1 1/1] SpcrFeaturePkg: Updated SPCR table based on PCD= values [Public] Hi Maintainers, Please review the patch. Thanks AbduL -----Original Message----- From: Abdul Lateef Attar Sent: 10 April 2023 15:56 To: devel@edk2.groups.io Cc: Attar, AbdulLateef (Abdul Lateef) ; Chang, A= bner ; Sai Chaganty ; I= saac Oram ; Nate DeSimone ; Liming Gao Subject: [PATCH v1 1/1] SpcrFeaturePkg: Updated SPCR table based on PCD val= ues From: Abdul Lateef Attar Update the SPCR table based on PCD values, such as base address, register b= it width, access size and address space id etc, along with OEM data. Cc: Abner Chang Cc: Sai Chaganty Cc: Isaac Oram Cc: Nate DeSimone Cc: Liming Gao Signed-off-by: Abdul Lateef Attar --- .../SpcrAcpiDxe/SpcrAcpiDxe.inf | 13 ++++++++++ .../SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpi.c | 26 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/= SpcrAcpiDxe.inf b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcp= iDxe/SpcrAcpiDxe.inf index 3fc84959a015..9a4f95e86bbf 100644 --- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcp= iDxe.inf +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr +++ AcpiDxe.inf @@ -2,6 +2,7 @@ # SPCR is abbreviation of Serial Port Console Redirection Table (SPCR). # # Copyright (c) 2008 - 2020, Intel Corporation. All rights reserved.
+# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights=20 +reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -26,6 +27,7 @@ [L= ibraryClasses] [Packages] MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec SpcrFeaturePkg/SpcrFeaturePkg.dec [Sources] @@ -38,5 +40,16 @@ [Protocols] gEfiSerialIoProtocolGuid ## SOMETIMES_CONSUMES gEfiPciIoProtocolGuid ## SOMETIMES_CONSUMES +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterAccessWidth + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio + [Depex] TRUE diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/= SpcrAcpi.c b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/= SpcrAcpi.c index 7ad0c058c844..51449d0fad9e 100644 --- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcp= i.c +++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrAcpiDxe/Spcr +++ Acpi.c @@ -3,6 +3,7 @@ SPCR is abbreviation of Serial Port Console Redirection Table (SPCR). Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.
+ Copyright (C) 2023 Advanced Micro Devices, Inc. All rights=20 + reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -368,6 +369,7 @@ OutOfBandACPITableConstruction ( UINT32 FlowControl; VENDOR_DEVICE_PATH *Vendor; UINT8 Index; + UINT64 AcpiTableOemId; Handle =3D NULL; @@ -456,6 +458,30 @@ OutOfBandACPITableConstruction ( goto out; } + // Base register details + gSpcrInfo.BaseAddress.Address =3D PcdGet64 (PcdSerialRegisterBase);=20 + gSpcrInfo.BaseAddress.RegisterBitWidth =3D PcdGet8=20 + (PcdSerialRegisterAccessWidth); gSpcrInfo.BaseAddress.AccessSize =3D + (UINT8)PcdGet32 (PcdSerialRegisterStride); if (PcdGetBool (PcdSerialUseM= mio)) { + gSpcrInfo.BaseAddress.AddressSpaceId =3D EFI_ACPI_3_0_SYSTEM_MEMORY;=20 + } + + // OEM info + CopyMem ( + (VOID *) &gSpcrInfo.Header.OemId, + PcdGetPtr (PcdAcpiDefaultOemId), + sizeof (gSpcrInfo.Header.OemId) + ); + AcpiTableOemId =3D PcdGet64 (PcdAcpiDefaultOemTableId); CopyMem ( + (VOID *) &gSpcrInfo.Header.OemTableId, + (VOID *) &AcpiTableOemId, + sizeof (gSpcrInfo.Header.OemTableId) + ); + gSpcrInfo.Header.OemRevision =3D PcdGet32 (PcdAcpiDefaultOemRevision= ); + gSpcrInfo.Header.CreatorId =3D PcdGet32 (PcdAcpiDefaultCreatorId); + gSpcrInfo.Header.CreatorRevision =3D PcdGet32=20 + (PcdAcpiDefaultCreatorRevision); + // // Add table // -- 2.25.1