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.web08.10672.1609746734143541365 for ; Sun, 03 Jan 2021 23:52:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=Wcy6AK6n; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: ray.ni@intel.com) IronPort-SDR: 5K+LB5bySeY3Gy/OJWt7HN38Ldu6wANT8V9/9GVmr+dXabC5BrWdajC5ebhL+ob0vXmi53VxHR N0D9dP8qa64Q== X-IronPort-AV: E=McAfee;i="6000,8403,9853"; a="177078066" X-IronPort-AV: E=Sophos;i="5.78,473,1599548400"; d="scan'208";a="177078066" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2021 23:52:13 -0800 IronPort-SDR: EmG9FgsWryPXdawOryWzcmdN2A7ZHWI87+vZHASY7wLXaHNT4dLoDLqpSWd9FvQQvJa1miXUZV 1EHkYPNKUvCQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,473,1599548400"; d="scan'208";a="360697445" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga002.jf.intel.com with ESMTP; 03 Jan 2021 23:52:13 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 3 Jan 2021 23:52:12 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 3 Jan 2021 23:52:12 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.55) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Sun, 3 Jan 2021 23:52:12 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KU3dGWHjcFLw2RbCfce7S+0EcPluIeHDqUlosFzXpHgj4GcM62NBdC3PdusfFfvO/8PqyAK5Kxx60YNMvVOCL/l3JGDAwKMAUgqmWQzxvmZKZjN8cSLSeq/b7onPUj5Md6uLOSWAbkJOrR7699gzE8Bhn6v++/0nTkesI2eGx19g42gA1lHyPfuO03bHhOr0KOGHZyPzRHfHRU2o4ls0UJHHwdGO6NrlOoBUUS8TMAXmWqgKUZ1cDUrkE4HYxtx+CwKXpoLbaVoqOmGGXPbqMzO1QybN1PQ0eKND/SX5FTXPg0hXBsoNWdNvZ/tgWvN/LLMsN8feiszyBPv1hQe4AA== 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-SenderADCheck; bh=Na5DDDRFf3446MdVg84Q3Qx6msXJqKxv8wUUkhLMdtI=; b=VJLKnNYeBc0ajMJqn2z8040KeV8we3yEy5MuONbIzd+vAMQKcy/JsvWqo7xK0n5dsPC16pw1d9NWoWqKU1468fZfIlNvnHKRyYkbRDrjPam3Hckep+myI7jfwEsM30sPwFlpoW1Neyhp5oTYa900veIP413/WN0UOUQ9Ob7QHrmaOHeD0kgH1z3LApdxOem8CxfzA7EKXzWJw8mXsU3JxFXCCcmrBPelo9xbqonihH9HxJOC+KQZMRrpbePjGgYHO/tx+9izmiSjMX9mgEfFgcffN4uSGEYrpgdVQiAfO6FWp7i5srfx5S7TFN9enYRCE4+WOqpkG7NNfGi7CGnUTw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Na5DDDRFf3446MdVg84Q3Qx6msXJqKxv8wUUkhLMdtI=; b=Wcy6AK6ne8pnFgIPFjtgDDQiRgw0TOkmr3MwVE++sNSedn1RY3IYzc3R3aUV0G7R7Ifa6Ci5O9/gJlvavZmf/ZsEkyhCms3helRx7skOEUdyKbYj9+iwvL+kERzVXlGhTi9V1dYaXZ8PQOjPVR478BoOEqwbprUXG0XaXpRVqGs= Received: from CO1PR11MB4930.namprd11.prod.outlook.com (2603:10b6:303:9b::11) by MW3PR11MB4697.namprd11.prod.outlook.com (2603:10b6:303:2c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20; Mon, 4 Jan 2021 07:52:11 +0000 Received: from CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::d18:1234:c1d6:5936]) by CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::d18:1234:c1d6:5936%7]) with mapi id 15.20.3721.024; Mon, 4 Jan 2021 07:52:11 +0000 From: "Ni, Ray" To: "Luo, Heng" , "devel@edk2.groups.io" CC: "Wu, Hao A" Subject: Re: [Patch V3 1/2] MdePkg: Define structures for Resizable BAR Capability Thread-Topic: [Patch V3 1/2] MdePkg: Define structures for Resizable BAR Capability Thread-Index: AQHW4mc8BXipPfdIPEWQ++W6AYC/nKoXF72w Date: Mon, 4 Jan 2021 07:52:11 +0000 Message-ID: References: <20210104065954.3901-1-heng.luo@intel.com> In-Reply-To: <20210104065954.3901-1-heng.luo@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.194] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ce78ddc0-12ac-47b2-6101-08d8b085a4b0 x-ms-traffictypediagnostic: MW3PR11MB4697: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1360; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KrubBxI1xAKGpjHBdc2ACWCmBdxVRva88QWICfgKDtxY21tujQXCPNMnrDOrx/HCqS10ujln3SaoYxjOlBJTRzDzTOw/9IGtaopt9vsd3BNZqV8xfNVUrK7kAhT0Glp0ABxW6T0azRdCdbJRjmbjNrekAy2/6aDltKhU4c3Zo0Z/2JbiXXy6GOTnEea1gXIYBQi50YDVzPyJnwj3vKtyxMwZmHO3N7OSO6FU9pLSPEZ2bguk7lUM93BtOjMVfdERypPj5TiPOGM1dZ+MzhGF9rNZ9F5nO73ype5/PJnw0LpiYHU/TWCx1/PJoHG+yEGZlNmJ4P2FLwtamj7q1K2AT4rqfoRNGBWUaEMV1CufZGd+WvSHE042BLQAE/iHi/b6dfMdM4kJiT8tntuYV7GmO36qOU8unjJAs7jQ5yV+Rmlg29DvgyQq8Kl9caQ+j93JBVPPIoR4ch5RK5rwTlFHmw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4930.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(366004)(396003)(136003)(346002)(39860400002)(64756008)(66446008)(52536014)(186003)(19627235002)(966005)(66946007)(76116006)(478600001)(7696005)(5660300002)(66556008)(66476007)(316002)(110136005)(83380400001)(53546011)(107886003)(6506007)(71200400001)(33656002)(4326008)(8676002)(86362001)(8936002)(2906002)(55016002)(26005)(9686003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-asc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LS+Sks6DL4hHihG8ityQJsO/5?= =?us-ascii?Q?5bjSif+3b94bNkMyYCQxjL7usrGvbNZZqqM2ewFX7Wh1Uz6FR8FB6ihLxMz9?= =?us-ascii?Q?hQFOTfHnaCnmi5DQnDA9mb3QLv3jKSVjtEge/YI0uWw=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4930.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce78ddc0-12ac-47b2-6101-08d8b085a4b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jan 2021 07:52:11.2120 (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: kqT6hdfR5sjWJ0ubcPn2JL0w5Q4jDivyfRry5pykRtoGUCv1QlZwzQCIT1bXtRGrecRGfZe5v+rdtZCwkcZ+ew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4697 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Luo, Heng > Sent: Monday, January 4, 2021 3:00 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Wu, Hao A > Subject: [Patch V3 1/2] MdePkg: Define structures for Resizable BAR Capab= ility >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3138 >=20 > Define structures for Resizable BAR Capability in > MdePkg/Include/IndustryStandard/PciExpress21.h, > Change ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c > to use new structures. >=20 > Cc: Ray Ni > Cc: Hao A Wu > Signed-off-by: Heng Luo > --- > MdePkg/Include/IndustryStandard/PciExpress21.h | 30 > +++++++++++++++++++++++++----- > ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 6 +++--- > 2 files changed, 28 insertions(+), 8 deletions(-) >=20 > diff --git a/MdePkg/Include/IndustryStandard/PciExpress21.h > b/MdePkg/Include/IndustryStandard/PciExpress21.h > index 2c07cb560e..4617dc1569 100644 > --- a/MdePkg/Include/IndustryStandard/PciExpress21.h > +++ b/MdePkg/Include/IndustryStandard/PciExpress21.h > @@ -1,7 +1,7 @@ > /** @file >=20 > Support for the latest PCI standard. >=20 >=20 >=20 > - Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
>=20 > + Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
>=20 > (C) Copyright 2016 Hewlett Packard Enterprise Development LP
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 >=20 >=20 > @@ -632,10 +632,30 @@ typedef struct { > #define PCI_EXPRESS_EXTENDED_CAPABILITY_RESIZABLE_BAR_ID 0x0015 >=20 > #define PCI_EXPRESS_EXTENDED_CAPABILITY_RESIZABLE_BAR_VER1 0x1 >=20 >=20 >=20 > +typedef union { >=20 > + struct { >=20 > + UINT32 Reserved:4; >=20 > + UINT32 BarSizeCapability:28; >=20 > + } Bits; >=20 > + UINT32 Uint32; >=20 > +} PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_CAPABILITY; >=20 > + >=20 > + >=20 > +typedef union { >=20 > + struct { >=20 > + UINT32 BarIndex:3; >=20 > + UINT32 Reserved:2; >=20 > + UINT32 ResizableBarNumber:3; >=20 > + UINT32 BarSize:6; >=20 > + UINT32 Reserved2:2; >=20 > + UINT32 BarSizeCapability:16; >=20 > + } Bits; >=20 > + UINT32 Uint32; >=20 > +} PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_CONTROL; >=20 > + >=20 > typedef struct { >=20 > - UINT32 ResizableBarCap= ability; >=20 > - UINT16 ResizableBarCon= trol; >=20 > - UINT16 Reserved; >=20 > + PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_CAPABILITY > ResizableBarCapability; >=20 > + PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_CONTROL > ResizableBarControl; >=20 > } PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_ENTRY; >=20 >=20 >=20 > typedef struct { >=20 > @@ -643,7 +663,7 @@ typedef struct { > PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_ENTRY > Capability[1]; >=20 > } PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR; >=20 >=20 >=20 > -#define GET_NUMBER_RESIZABLE_BARS(x) (((x- > >Capability[0].ResizableBarControl) & 0xE0) >> 5) >=20 > +#define GET_NUMBER_RESIZABLE_BARS(x) (x- > >Capability[0].ResizableBarControl.Bits.ResizableBarNumber) >=20 >=20 >=20 > #define PCI_EXPRESS_EXTENDED_CAPABILITY_ARI_CAPABILITY_ID 0x000E >=20 > #define PCI_EXPRESS_EXTENDED_CAPABILITY_ARI_CAPABILITY_VER1 0x1 >=20 > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c > index 3e138188ce..a2f04d8db5 100644 > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c > @@ -1,7 +1,7 @@ > /** @file >=20 > Main file for Pci shell Debug1 function. >=20 >=20 >=20 > - Copyright (c) 2005 - 2019, Intel Corporation. All rights reserved.
>=20 > + Copyright (c) 2005 - 2021, Intel Corporation. All rights reserved.
>=20 > (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
>=20 > (C) Copyright 2016 Hewlett Packard Enterprise Development LP
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -5534,8 +5534,8 @@ PrintInterpretedExtendedCompatibilityResizeableBar > ( > STRING_TOKEN (STR_PCI_EXT_CAP_RESIZE_BAR), >=20 > gShellDebug1HiiHandle, >=20 > ItemCount+1, >=20 > - Header->Capability[ItemCount].ResizableBarCapability, >=20 > - Header->Capability[ItemCount].ResizableBarControl >=20 > + Header->Capability[ItemCount].ResizableBarCapability.Uint32, >=20 > + Header->Capability[ItemCount].ResizableBarControl.Uint32 >=20 > ); >=20 > } >=20 >=20 >=20 > -- > 2.24.0.windows.2