From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.50]) by mx.groups.io with SMTP id smtpd.web11.16122.1683863688576999610 for ; Thu, 11 May 2023 20:54:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=LjHlzgGT; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.244.50, mailfrom: nicklew@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YZv7arkzG4JBuFoPgxxgPjDPr3Pcc/5o6UYKngdrUpOd7Jc6/HkTo6xV+dag/U7W+Gn5pDtKBtz0EUwGwRn5XpKZNCSAV66PHyvBA/48tAo30Fs488aG2Zavb+5XoE13tdrsKoeE0YOj8AYr6Fid3VnKZDIN5mrJiSNdD0byeToOTVXr4A1UJFMD8sKXDboY2fT9xJNlopzuTdvKAmB/wFtMLHLUBUOUl9VjBlP8xFGOiyoOUXCD+4S2I4ogoVZWBydhg2l21k8xEhtR1GRG80D3DCxS8SylL9C/zxPmwTBuPiKTjM8N4yhaAObefIw9XLgo5mlD6v49JnMP8GIQjw== 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=3quyVHyjdx8d7k/PsR4/ui1z0pY2ldfuUJTb68pllkc=; b=LeXJC1M3etYN4WP0ko5z2GJeH57FIgS6I6+gB4Oa4w+Xsw55b91WfQ5nC0hB/vPRJSCfRtKaNylF+0XaB/alZrKmBkWBkCbgYG9l04XDdYRj3wPZr3nAVdf4WmvOq6lUhHnqpJdnF06Zi0kjkSzU4KRP1dm0t1dYvkZ4zSV2uXazFz/86ZoqXMMaP7waOmiidhW+m7Hi8boLEmjEWqbvZuVsxKY0AsNzH6Tn3ovzUNnQlx6ofQM7JKLaFFYaRDL5F0bucjoWp9OFBKtMgjoL/Rqab3QoHzMYZrWkNqDOVSexDnGSSixoDSs85NULl0+vrjZcVdzi0xtBVy58sRYvQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3quyVHyjdx8d7k/PsR4/ui1z0pY2ldfuUJTb68pllkc=; b=LjHlzgGTFFC5XoxNJnmFesfLKlYIYvBpcT1E/GpdBy3wxywe6NesE1YfepMF++BQGsboz7Ms0hPZVXxRI45sE3FTb/tOEdlAw8pofxDy0F7GiUd8cH6fWN5iqsiw6R9TZiS2jlJw0Dg+ew3RrW+CeGq3Xu79b32otWexcAZO42lJCR6ozPvRajcPSkZmrnfByDFe/DRD/N5aTMVp00aUJwA7TZn3n8fMDrl6IQ4V4XD/uDJPnF6tCUpxPi+mNp6Itu6vrAR+EIXP5yc5pP9pqDIdC4CgvdoCMHnn2wGQCJdxvXdBp0w8BtpF5QUEACzEaCpUxN48qmFmrfOR695zyg== Received: from CY5PR12MB6621.namprd12.prod.outlook.com (2603:10b6:930:43::15) by CH3PR12MB8403.namprd12.prod.outlook.com (2603:10b6:610:133::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.22; Fri, 12 May 2023 03:54:46 +0000 Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by CY5PR12MB6621.namprd12.prod.outlook.com (2603:10b6:930:43::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.18; Fri, 12 May 2023 03:54:45 +0000 Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::d9df:b45b:2cc1:f017]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::d9df:b45b:2cc1:f017%5]) with mapi id 15.20.6387.023; Fri, 12 May 2023 03:54:45 +0000 From: "Nickle Wang" To: "abner.chang@amd.com" , "devel@edk2.groups.io" CC: Isaac Oram , Abdul Lateef Attar , Tinh Nguyen Subject: Re: [edk2-platforms][PATCH 1/2] ManageabilityPkg/IpmiFru: IPMI FRU Driver Thread-Topic: [edk2-platforms][PATCH 1/2] ManageabilityPkg/IpmiFru: IPMI FRU Driver Thread-Index: AQHZhIGZ2nRQrHD5+UG9YtRbM08AK69WAebw Date: Fri, 12 May 2023 03:54:45 +0000 Message-ID: References: <20230512032633.1740-1-abner.chang@amd.com> In-Reply-To: <20230512032633.1740-1-abner.chang@amd.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|CY5PR12MB6621:EE_|CH3PR12MB8403:EE_ x-ms-office365-filtering-correlation-id: e8f41862-1ae4-4bc7-bc0c-08db529c9fd4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: l3zM78urOZvx4DBqjjl24P2/jyblD8hLzPV5aepbQA4lH9y1OcA4yXYjMOh3xMdZpoRYdviIaARmQqQwPc6+T/xcRGGFETTUH04+de16LKIwxxL2IfRRgTwcViqkSvlwZO6qR1YnlR9j48NKkPpr4E3w2ffuO58+Yyrhw5oe0Pzz+bZhab960xAz/TZBALPnfGNXFQlcVOitLLSn+VIojhTu6ABUpXvNWIUE+Y+4mBMTkNKQeW7SX3Cyy9Q1HLNr7MmUpCKCqRZ1W6NI+ATLW83aufgKatqZNzyft/NuELN3SLLpkDpnjGrR87X9MgSIEuYTbKPSnuJYjB3Fgbpxkzzhl4RX0rp4SzAh/983Lk2PqjNwOh+jWtJUrXRAoRrq8sC7EGOguIB4cy6gR4c9wuMB3amLoi2KjvpszVqiDbBeKJy6TiANeF/IUyaJfT88wN5Z3Wx2Itnf0arkOtNALVH2YZElBF8sH2M9UBUglPm4E2hlmEbE3LWNS6eogmT6Deuv1smly6mejiifMqye+bGmJyeN83A76zd1hcPQf/qKWkFuSuj+CgXrSIiZqhrskOeLlcVZXtDDHEUbzP1lC9o6+qAXKdN5FmklYeUmu+7aTKoy7fUxSFa8uwRWbRIj x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY5PR12MB6621.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(39860400002)(136003)(346002)(396003)(366004)(451199021)(86362001)(38070700005)(478600001)(33656002)(54906003)(316002)(110136005)(66556008)(76116006)(64756008)(19627235002)(4326008)(66946007)(66476007)(66446008)(7696005)(71200400001)(8936002)(55016003)(52536014)(5660300002)(8676002)(41300700001)(2906002)(122000001)(38100700002)(6506007)(186003)(26005)(9686003)(53546011)(83380400001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vQWLyiMMf//MRnWHu2UgkspXUG22X52+Am8nx1KGWYm6FT05h3mM/Kk+MOY5?= =?us-ascii?Q?Uiq1jso7ayxt6IF8g+Gohdpp11Kj2kTPDWpn3YD0zbm8Kmjpkks6+DwIt6FG?= =?us-ascii?Q?DzBRUfT2JNxK/3rm/0Wr+Cq/iQbzVDPeZXtT1tgVDBITiApfMGOGFU3Wy/SK?= =?us-ascii?Q?Q0TsCM9HoHrjF3DI7MgBgNr76h8UJfhxvDh6LxItgaYDqiIWkp5V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3Z1NWKxrZudnftvKErTOfnhqAeJ9xFiNPpZSUnAiKpIE?= =?us-ascii?Q?65LHxUKaPU26RNCUDa08fvkp2UYw/ROfIN8sxYxIj4uy4ZKbyRAzeSIZa+M7?= =?us-ascii?Q?N/ofPBm6k8RkXnlLVXoP936rbox38LiGSQmzyNiu5sy60355MkwcZNk1Nxni?= =?us-ascii?Q?csKJq32A0KrOxkUlr21I4IeLEnmOMxf3F1JN0Soct09E0zgJSwzVGXBUyVgw?= =?us-ascii?Q?0Go5ee+WWnmHe9yXAyeVdkT9rJvsKTunOfYf+AP0EE7ewZyHtMUPrcey1a08?= =?us-ascii?Q?JiE+gRJjni6FL2rW732f+E5nHot3lrOqYaTkj3Jo+WNkYSjl6kihu1NQnICh?= =?us-ascii?Q?YNzDXWUtI7EOT9XcNAl0O7IsblwvFAqLdd/ZBZ71TwM5L5NCzdaA0BtQGUp0?= =?us-ascii?Q?e27FjRZ+ClF7WRRx2hzU2iwXDPEt53G/s4sTa3MZ6bLprAmijHPzLJJrqWvf?= =?us-ascii?Q?2e2JIEqLJ/neV9qnLEMGskUSCjFwSEaM5j3su2Ay?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8f41862-1ae4-4bc7-bc0c-08db529c9fd4 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2023 03:54:45.2750 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: d6W4PYsMqxeiwmVBpnGi9tloeRG9BrAvvuw59CJhqb49mlrxcKEcfVaXoAA3JEGvDGCB4CO7GEGyoeS+xXlFcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8403 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nickle Wang Regards, Nickle > -----Original Message----- > From: abner.chang@amd.com > Sent: Friday, May 12, 2023 11:27 AM > To: devel@edk2.groups.io > Cc: Isaac Oram ; Abdul Lateef Attar > ; Nickle Wang ; Tinh Nguyen > > Subject: [edk2-platforms][PATCH 1/2] ManageabilityPkg/IpmiFru: IPMI FRU > Driver >=20 > External email: Use caution opening links or attachments >=20 >=20 > From: Abner Chang >=20 > IpmiFru is cloned from > edk2-platforms/Features/Intel/OutOfBandManagement/ > IpmiFeaturePkg/IpmiFru in order to consolidate > edk2 system manageability support in one place. > Uncustify is applied to C files and no functionalities are changed in thi= s patch. >=20 > We will still keep the one under IpmiFeaturePkg/IpmiFru until the referen= ce to > this instance are removed from platforms. >=20 > Signed-off-by: Abner Chang > Cc: Isaac Oram > Cc: Abdul Lateef Attar > Cc: Nickle Wang > Cc: Tinh Nguyen > --- > .../Universal/IpmiFru/IpmiFru.inf | 34 ++++++++++ > .../Universal/IpmiFru/IpmiFru.c | 67 +++++++++++++++++++ > 2 files changed, 101 insertions(+) > create mode 100644 Features/ManageabilityPkg/Universal/IpmiFru/IpmiFru.i= nf > create mode 100644 Features/ManageabilityPkg/Universal/IpmiFru/IpmiFru.c >=20 > diff --git a/Features/ManageabilityPkg/Universal/IpmiFru/IpmiFru.inf > b/Features/ManageabilityPkg/Universal/IpmiFru/IpmiFru.inf > new file mode 100644 > index 0000000000..ddef310309 > --- /dev/null > +++ b/Features/ManageabilityPkg/Universal/IpmiFru/IpmiFru.inf > @@ -0,0 +1,34 @@ > +### @file > +# Component description file for IPMI FRU. > +# > +# Copyright (c) 2018 - 2019, Intel Corporation. All rights > +reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # ### > + > +[Defines] > + INF_VERSION =3D 0x00010005 > + BASE_NAME =3D IpmiFru > + FILE_GUID =3D CD9B99D9-E86F-48CF-A8EB-20120AC22666 > + MODULE_TYPE =3D DXE_DRIVER > + PI_SPECIFICATION_VERSION =3D 0x0001000A > + VERSION_STRING =3D 1.0 > + ENTRY_POINT =3D InitializeFru > + > +[Sources] > + IpmiFru.c > + > +[Packages] > + ManageabilityPkg/ManageabilityPkg.dec > + MdePkg/MdePkg.dec > + > +[LibraryClasses] > + DebugLib > + IpmiCommandLib > + UefiBootServicesTableLib > + UefiDriverEntryPoint > + UefiLib > + > +[Depex] > + TRUE > diff --git a/Features/ManageabilityPkg/Universal/IpmiFru/IpmiFru.c > b/Features/ManageabilityPkg/Universal/IpmiFru/IpmiFru.c > new file mode 100644 > index 0000000000..2b489410db > --- /dev/null > +++ b/Features/ManageabilityPkg/Universal/IpmiFru/IpmiFru.c > @@ -0,0 +1,67 @@ > +/** @file > + IPMI FRU Driver. > + > +Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > +#include > +#include #include > +#include #include > + > +/*++ > + > +Routine Description: > + > + Initialize SM Redirection Fru Layer > + > +Arguments: > + > + ImageHandle - ImageHandle of the loaded driver SystemTable - Pointer > + to the System Table > + > +Returns: > + > + EFI_STATUS > + > +--*/ > +EFI_STATUS > +EFIAPI > +InitializeFru ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_SYSTEM_TABLE *SystemTable > + ) > +{ > + EFI_STATUS Status; > + IPMI_GET_DEVICE_ID_RESPONSE ControllerInfo; > + IPMI_GET_FRU_INVENTORY_AREA_INFO_REQUEST > GetFruInventoryAreaInfoRequest; > + IPMI_GET_FRU_INVENTORY_AREA_INFO_RESPONSE > +GetFruInventoryAreaInfoResponse; > + > + // > + // Get all the SDR Records from BMC and retrieve the Record ID from t= he > structure for future use. > + // > + Status =3D IpmiGetDeviceId (&ControllerInfo); if (EFI_ERROR (Status)) > + { > + DEBUG ((DEBUG_ERROR, "!!! IpmiFru IpmiGetDeviceId Status=3D%x\n", > Status)); > + return Status; > + } > + > + DEBUG ((DEBUG_ERROR, "!!! IpmiFru FruInventorySupport %x\n", > + ControllerInfo.DeviceSupport.Bits.FruInventorySupport)); > + > + if (ControllerInfo.DeviceSupport.Bits.FruInventorySupport) { > + GetFruInventoryAreaInfoRequest.DeviceId =3D 0; > + Status =3D IpmiGetFruInventoryAreaI= nfo > (&GetFruInventoryAreaInfoRequest, &GetFruInventoryAreaInfoResponse); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "!!! IpmiFru IpmiGetFruInventoryAreaInfo > Status=3D%x\n", Status)); > + return Status; > + } > + > + DEBUG ((DEBUG_ERROR, "!!! IpmiFru InventoryAreaSize=3D%x\n", > + GetFruInventoryAreaInfoResponse.InventoryAreaSize)); > + } > + > + return EFI_SUCCESS; > +} > -- > 2.37.1.windows.1