From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (NAM02-SN1-obe.outbound.protection.outlook.com [40.107.96.42]) by mx.groups.io with SMTP id smtpd.web10.15395.1682675157510699152 for ; Fri, 28 Apr 2023 02:45:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=Q4uUC4zs; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.96.42, mailfrom: abdullateef.attar@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NeK6llcI5/5PxyGxdXhPDXTFc8FrR1oKcAKbNQ4anzacBfb+5tvk9jW/gkLhjWlwGUHDMsxonNTcGzw4gfWrms/NlrbHMISaBxM+yQVxCXcxuamEfeS3ApcUZCYHg4YSAUVdw/zsE7WovG1MIGLkrh+kVmF+i/VpJ3L9pR2PdlobzdE48l+hRlYZKzQmGRRPgXPeaJCAZhKhCmpw4mSd3qSnbuMgtwkDXUWVFdk/9o/n1AIlr9FnCEfxVM0syMxagm5BdGCA71JtaCBe5cr03ICGzWiNQLQLQDNGQJ1I0OwO5NyFV+2esVoF8qT22EVGhrRuIrEKYdR1LRYRgMlD1g== 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=xoT0+/AkEyRR1Guy46jzZGvDqKXYeoPrjMf0MNpmOqg=; b=jFUN9P6ESlewNok4xBAm9Yt5JrKYfeWp1LglUWtkWlUFuMnOT7i1Sv0glOEDii1JeYB0MlpvFGbhuGmCYZ/z30NfBZw8bN9e7R3Z4kZxvPrkSA/1bfJ/epCp4DMkZTrGz83v8w7JXAxkFsv70q/tzMOC7JMSnnS7qaR1OAqmJsLpnWB5TvNWi93Tx7fDNNy9ot+cKrNQpHyoF9vN+mU6Wp1KFoSzi0XFGYuLxWOow9ENhPa6nCRzqdVEmG41DPt1CsD0HbF6PpTywZtB3HWQkZh4RhsGrKKL5GdDlk3DGr90huV4VjCdHpUGLYbCdzsagU1JB4BUeieoeh/KI7sMXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xoT0+/AkEyRR1Guy46jzZGvDqKXYeoPrjMf0MNpmOqg=; b=Q4uUC4zsYT8ZvmC7AousDD9ItRCohG1Bwsq95SgAfOiCgC8JMDhDkPj9k4DIlAmuuZ1a5yRKJ2wJuWC81JBLHW+OpWRpJoWeQhOO0qOomvb1yzAevQx6ej8f+qRS531jDn6CzkT4bMdXFiszso84M0UQ77PamURFoRbVOsqINzM= Received: from IA1PR12MB6458.namprd12.prod.outlook.com (2603:10b6:208:3aa::22) by IA1PR12MB7613.namprd12.prod.outlook.com (2603:10b6:208:42a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.22; Fri, 28 Apr 2023 09:45:54 +0000 Received: from IA1PR12MB6458.namprd12.prod.outlook.com ([fe80::fb82:b2bf:60f9:45a1]) by IA1PR12MB6458.namprd12.prod.outlook.com ([fe80::fb82:b2bf:60f9:45a1%6]) with mapi id 15.20.6340.022; Fri, 28 Apr 2023 09:45:54 +0000 From: "Attar, AbdulLateef (Abdul Lateef)" To: "Attar, AbdulLateef (Abdul Lateef)" , "devel@edk2.groups.io" CC: "Chang, Abner" , Sai Chaganty , Isaac Oram , Nate DeSimone , Liming Gao 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: AQHZa5bayW1MaorubkKo52S0dpixNK8+kG9A Date: Fri, 28 Apr 2023 09:45:54 +0000 Message-ID: References: <7e573a1e75f5f61a453f099edbf846e59b0b162e.1681122267.git.abdattar@amd.com> In-Reply-To: <7e573a1e75f5f61a453f099edbf846e59b0b162e.1681122267.git.abdattar@amd.com> 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=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: IA1PR12MB6458:EE_|IA1PR12MB7613:EE_ x-ms-office365-filtering-correlation-id: a4101d6c-5c64-43ce-cf18-08db47cd5c6f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QuYblkOF8vD/Ozb82Ls2QjxcqR1Yeo9/gklgpsFStGGmEeNhiiRHBs890IEBF5P0XjMan9Vw2hYiwycJ1Lj9dHb8eiTD7Hmiz358jP0Gdf+GZeZHGI2I3Ez+iBBMyVicedSMGXNwAqbD9Wf76T56jaEIpW3IXHbuzlvFFnPap+CZrVpKeVPAvGje1Wj0Dn79UGysnQaCD9KKj9pOvsnEUiqcxAqRCd5GvCSDqbO27TQV0DhcvEPPluHdDsEB0V09/G1BLkd3rGnM1U1Thm6EGNzSwUGB/8KXqvKfKcg7CLZjR9H3ojrCdO/mZaFVh48rBUmyTDPNNdlGFjV0TKTZL0F//dcp/yu8rxZCYFsmYGw+hm+PIO8drpNOolm4DG01icDjnoh4Nyu6tcxKxuLV8giMR3wGzcIeegOcvVSQPcFAYLDoVLFIPoznKGx0glUPAKTvLzSAE8HszQPjLlVjHfQ7Ha5ZRTFFSlUoPOHirlKKlx8CsXrTHmTPtoj+jycnW/SIvnuocVhaC9wb/vJqLkJObXFHjiZYbLlOUhXbtt/J0ZErfQfmTRxGq+1IZAH3MiYT+VuCAiGiltKoBVL0F9Vw8WhMQmcOawJMdmDyR6FpswBLpRGYnk1IH+Q1xJWq x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR12MB6458.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(396003)(366004)(376002)(136003)(39860400002)(451199021)(316002)(478600001)(41300700001)(15650500001)(122000001)(8676002)(110136005)(2906002)(38100700002)(54906003)(38070700005)(71200400001)(7696005)(86362001)(64756008)(66446008)(66476007)(66556008)(8936002)(83380400001)(33656002)(66946007)(5660300002)(52536014)(76116006)(4326008)(53546011)(9686003)(6506007)(55016003)(186003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mAYcsFBlVjZM2iY1gvrdzmNe4OooKJ6fdWC4hfFN9QNpQ5jznrQezJ3jLyEX?= =?us-ascii?Q?hcVEVgrXvjVuVNQMO+LTDjEUren4u8i9jW7zW6UGTYh52Xp5izzd6EOdojOy?= =?us-ascii?Q?iBFiIyyffQmFeG84qgulnFViqQ97km1y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o/Cm11GMGJfrQInk+qOt0aGHOkkkhFn+azIbpeOT30BA7L5oTx?= =?us-ascii?Q?mD/iLA+G0CR7hQnuA0Bm0ibi1E7NfoI1w87G8M6wT9r7LazCIrOUporkyf2o?= =?us-ascii?Q?mTcDwXczU8/hnJsdVook5vROJRH59425sjAYs9Xoh3hh01rcVlYcAHWKmAwn?= =?us-ascii?Q?XSY+yQIJarXykfYyR3eCqpOQmCREcvLNT8q2qrEamuSkksFeVRFbfUb3vlwB?= =?us-ascii?Q?xlE7XSLOMZqdnRWoAGOeHHcguG3ILy7lTOXHACK9UVnE+xx/u9eWxEuXXZpK?= =?us-ascii?Q?hVMiFcawCPguyR1CFqgkPEHnqaYZoVvocahkKxbg+ZRkqmKKCeBgatKwvJgw?= =?us-ascii?Q?bwHu9zqgNsn96bC9numCZOfcZGLRnUSh/EcwCYX1h0Ywq8ljYUdalzL6M3qV?= =?us-ascii?Q?CSWLNy5E9qPXcIl510rhLS0edQgv0hpTdC/sOMX3M8j0Kl3aWLB1RgUlPCyP?= =?us-ascii?Q?GZ9aTAHofryKRhg10k/r/mRhN5gEA5zTkKARGhivPQLHLFUTfQ6e2uYF+A?= =?us-ascii?Q?=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB6458.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4101d6c-5c64-43ce-cf18-08db47cd5c6f X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Apr 2023 09:45:54.7612 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: QE4vGYcgzYGkrBiXEqVnyzhYuZ19mjMuqIgndPMtvoKCuhvYHQkh0vZh2jzz5bB1FoQLgUaCk1tvVzYNWQcJEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7613 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [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 +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 + 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); + gSpcrInfo.BaseAddress.RegisterBitWidth =3D PcdGet8 + (PcdSerialRegisterAccessWidth); gSpcrInfo.BaseAddress.AccessSize =3D + (UINT8)PcdGet32 (PcdSerialRegisterStride); if (PcdGetBool (PcdSerialUseM= mio)) { + gSpcrInfo.BaseAddress.AddressSpaceId =3D EFI_ACPI_3_0_SYSTEM_MEMORY; + } + + // 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 + (PcdAcpiDefaultCreatorRevision); + // // Add table // -- 2.25.1