From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.85]) by mx.groups.io with SMTP id smtpd.web11.7042.1683684557070140397 for ; Tue, 09 May 2023 19:09:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=L0mZYRmR; 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.94.85, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IMU6L2Gk0Q5AUl7+gwD5EU4a5BBtWRr5vPj4s/K/LIhusMsBbUu0LTuiGbg6Ouh7zn33ZxpniFbF9jPsXPlHl+o6UfC71lpypMfuGvMRmJ5CjvfjU4EhwjSxZfSQMFnE1mbF8cMsX5nfDATlyBPnHcnzgmSDJ3D/sCMbAHgU0O3GfqTMWnUlq+nxRUmRTELFcrA3it6DOb9KDlCrtclqoFeiIUECjjZJjzUDYlcKPfXFgJ+VW8MCyjroPIJQsSUtMYghULouck/pXxirO0cWo52ajQpeqT/9ZQhcTl0ntUme30k1UeXhaHkDSo4b1u/psI9vVQP9zz0Q9639DGvPsA== 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=RiBLWvujobfjhUroqPCAw4KCRFuh4dBPI8MR8V3FhHU=; b=B8Oi65Shqva3ZKihYsOnNPZ3Q6iPxOXotgV34qTUp4hMSmRO1yXbRa23iZIbsXwS8skiOETp2QpNlA0ftj+whx/eXcmKq74+mhTK3f3XLSMafq82cuDzLs+oOPIrwzxr5kouILmgiPIjtuZToSmo6cbFUllaNWFFpK0/oIhQZYRjJQS6tz40ZrY8aIx/ELhanDKwdRBFGj1pLsrlsJNtQFM0l6mK3YLQAPdC1AjKo51gkvbpZ2xjIbIEjNPR36F9cwhRX2U2PPHAfND+61kSfX8PYPCzZYsi1np7v1IGpMPRr+oyUvsU527/7ioSEyw/fHUgbVvG8B6GKJ5AO3OkXw== 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=RiBLWvujobfjhUroqPCAw4KCRFuh4dBPI8MR8V3FhHU=; b=L0mZYRmRHZfR81GowjAPWbLJgGp4mpoMK+UcrsIsjPSvgGHeP9dK2OTve/zJRDq44xWZqJ9xRcgO7F574wl7nxYBw/x6wYpVlSu+x0z2C4DVoM72oOMhJB7v4m5kmUYn4NvHynf9fQho3x0xQejkmsAZa+bC3rIJm2D01xN7XQg= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by CH0PR12MB5058.namprd12.prod.outlook.com (2603:10b6:610:e1::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Wed, 10 May 2023 02:09:14 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::46f1:bdce:a4bc:29e3]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::46f1:bdce:a4bc:29e3%3]) with mapi id 15.20.6363.032; Wed, 10 May 2023 02:09:14 +0000 From: "Chang, Abner" To: "Oram, Isaac W" , "devel@edk2.groups.io" CC: "Attar, AbdulLateef (Abdul Lateef)" , Nickle Wang , Tinh Nguyen Subject: Re: [edk2-platforms][PATCH 1/2] ManageabilityPkg: Add Manageability IPMI helper Library Thread-Topic: [edk2-platforms][PATCH 1/2] ManageabilityPkg: Add Manageability IPMI helper Library Thread-Index: AQHZgtEJKlco/4VH1Uqmven357owBK9SwxPw Date: Wed, 10 May 2023 02:09:13 +0000 Message-ID: References: <20230509075602.342-1-abner.chang@amd.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-05-10T02:09:12Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=764a3062-d8b2-4b70-9494-e303d90214ad; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1 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: MN2PR12MB3966:EE_|CH0PR12MB5058:EE_ x-ms-office365-filtering-correlation-id: 92e8fe0e-011d-40ae-f2a3-08db50fb8d3f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: J4WhDH8RRkfvCwYGsUbwWyqlz15PLPLK4UrL1JTaSM44NXW7U/p6oxKHCtSRVnQdS4XXMvFEViPK80irWlruoJd5KkGu/4yKJ4trtSxf25gLjzoKEJTfVxM6wUndOqPch9bPNhnn77ncHhr0MEe19e9TczOOZcU5m4WYdAF1vjKPIlfYlv+WMUkzG0kbT1DBRpweoPohNo6nlSh0DiOheS88mWaXNcB5htGoTx+o4kEY3ZP+ouFQajbVuvj3Hgl1hsN84j9Y4kwrTGuOStHzl0KbvxPYbEXutH9+bnq2B2Bm74d8UsuZe8iWDnHjO8niV+rNAgXmrZLgLSMFHTBWr7+DVg+mCk40wPBvniUR1eJyKwG6qmTYFaf2bK9M16N50kIZZfBaf2VKaBT9sDPnyWRoY5qETvPtk+swv5QVaIWa1ezhIjXafVf1gm+7bCOzPp/2B5xHt96bkWwZgg8RK1+VdW8E/kb1qaoEu12+d08Oer4ALmqjwTZXpzQXIRu9qOJbejbD2ALgr21ZZPcXifgVYwhF3BXEzODjxWMnhZtjg3108O8muYW7psS8jCjm1xvAhCJEgDB61H5Pgdxz9Y2aNZ86POk2B/XRxCzZ3dOd33D6hxJXliM5UeHUg1eQ x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3966.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(136003)(396003)(346002)(376002)(366004)(451199021)(5660300002)(52536014)(8936002)(53546011)(8676002)(83380400001)(186003)(2906002)(33656002)(38070700005)(122000001)(38100700002)(86362001)(9686003)(6506007)(316002)(66446008)(4326008)(64756008)(76116006)(66556008)(66476007)(66946007)(71200400001)(55016003)(110136005)(54906003)(478600001)(26005)(7696005)(41300700001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?dFTdmJxVqSOxG+Lcs2atgLhTdvedyJTpz0e47NdUEw4PS1hEEhGI7rlHpeNf?= =?us-ascii?Q?wnswGsNGLkfYJxciGI3+9nGuBgUpxjZZ4Ar8+1SQUyWwsxjA9YcuamhUcwGl?= =?us-ascii?Q?kE5SkMwgEp+Dnh4zN4woU7SwqAtHXTYktvYmfL48BUodYzqPGBwapIA4Ktnv?= =?us-ascii?Q?FXLzEGTV3zkLULmeUGhbFB9ixJ6sY5cfr17BsiiUwGtfD4RTqnNkJlwNzMFK?= =?us-ascii?Q?aWbQ7sLDzo4HUHOJ1/+zqBzUJYnwhiKAna7AGS48eMIMiwcWXPGmL+ntM0n3?= =?us-ascii?Q?HJ2c3JCps5zhDMxYSOLa024dZQYC9xKIjvRDbOB+O+Hw6osWTRMK/unBNlHD?= =?us-ascii?Q?DwL1Wo5Kpl0ezl2x7i0f0NMtqM+ehqsfdzR+HGNp1G7jzb4IYwnxTF2IDzdH?= =?us-ascii?Q?hRRb0dxSgpYU6qjnO20L3hYCY04EmTNbdc9r3E0Sv6W3fBRlA3pwaaZfxXPJ?= =?us-ascii?Q?S02JElWpWHAi2xYhC1v3zsryF7SpR3IgnclM2VJVCeV1Pc/LRrZZJDFa03bn?= =?us-ascii?Q?T4CnSATpC9+YiPcmUtVLHpqo3Yqx4w1hRiKC+UGpf5U1BmdXc3Fr7ei8F4GR?= =?us-ascii?Q?5z50k4zOYdTA7WOjmw9W3JsJl5aBxHO+DfRHNE75mP8IpjeRuEjsOQmq6+fQ?= =?us-ascii?Q?7dKwe/9dlFYQWw1b8Yf8rZzLAsY13XO1SQQZbaAbKxECTj0iGNq+afYVcSFK?= =?us-ascii?Q?jEXqgLkyFFRtzDuCSmUwEK/HZDnnuU19HQB0H5CL7FH3bUhVka8DWOt/VtXj?= =?us-ascii?Q?hX+YfVTPZKPb+XLfzzOW7eAau1rO2FL/bEya1gvUip5OezjCRUNdKkK0PRsE?= =?us-ascii?Q?e6QvrasDB/IHBvDEWDN0d1L6hMrI0DB53d1je8xVs0WT8bcino5Hl9Kg6TMq?= =?us-ascii?Q?rEXJC+nR8INacNRP8SbOg41MT5/DOh4Q6r0Dg77zpW/xULiXBtcfY0YcMwMf?= =?us-ascii?Q?eW0p91YOk6Acy8wrf926XMgfR4WykPadqehivf3Hzd9hsGrEvab7FO9e6Z1I?= =?us-ascii?Q?4cla87W070H9STrTHfmJ/2EDZoAIpTNY6poWNVJZKADkyt8nYsuMbgrXEWYD?= =?us-ascii?Q?Xf7RCPnRwNyMZG9wDAF4S/OL8/iJ3Hm028r5v1MGhoetDvqzVEJrZHk5mqW/?= =?us-ascii?Q?7PEexWQ/0amI36PE9fAliIldOWeySvHL0Xpdbwgz0MDHOYudNL2/MlEU4FiA?= =?us-ascii?Q?ONdb0KnDDXl/4MP4xeuugOPc//L0VE6mp0nEnCdNaI/U/EHUrHFTfFnqb/Uo?= =?us-ascii?Q?x586KcWORLaIMgl1VlCV6zU6qDhrzXFMNgyRtTqhI5rfsOwfEPwBiBFYfWkf?= =?us-ascii?Q?WNe6/x9LF0Go2bb87KnnbTIHMScjaik4GPYB150Rvv1pu/cpcCPLUEwd+Bmo?= =?us-ascii?Q?Rc2wqes1BA76TBLglMJAfh5UXDSS+LCVKyI4+apPI0ndXlInEzdmZU0Hg/FR?= =?us-ascii?Q?KwbyKpMXv1O4pK6C5E5eSFGsHH/uYy96u2YU+3xHIzqKdKJbIuRZ43pMKcrF?= =?us-ascii?Q?/GSnLySenqb/3Q/wku6wHnfGoK6Zyz8GG200QkqrzzVhAYJoDcqdMwuX6avl?= =?us-ascii?Q?7oOA6BgmUxaCJfdKujriULJfzzCd5fyv0sqOdlN5?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92e8fe0e-011d-40ae-f2a3-08db50fb8d3f X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2023 02:09:13.9623 (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: M7K7LYu6hFikoTbRHZeEc2GPDCb62fM9LK560ebNHHQTwJZydPOMdvXfkBGnS8F8BxOOrShF0IwjffaKr7I11w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5058 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Sure, I will. Thanks for catching this. Abner > -----Original Message----- > From: Oram, Isaac W > Sent: Wednesday, May 10, 2023 7:51 AM > To: Chang, Abner ; devel@edk2.groups.io > Cc: Attar, AbdulLateef (Abdul Lateef) ; Nickle > Wang ; Tinh Nguyen > > Subject: RE: [edk2-platforms][PATCH 1/2] ManageabilityPkg: Add > Manageability IPMI helper Library >=20 > Caution: This message originated from an External Source. Use proper > caution when opening attachments, clicking links, or responding. >=20 >=20 > Reviewed-by: Isaac Oram >=20 > I noted that the BaseManageabilityTransportIpmiHelper.c file header > comment indicates that this is a NULL library implementation which seems > incorrect/misleading. I think that this can be fixed before pushing. >=20 > -----Original Message----- > From: abner.chang@amd.com > Sent: Tuesday, May 9, 2023 12:56 AM > To: devel@edk2.groups.io > Cc: Oram, Isaac W ; Abdul Lateef Attar > ; Nickle Wang ; Tinh Nguyen > > Subject: [edk2-platforms][PATCH 1/2] ManageabilityPkg: Add Manageability > IPMI helper Library >=20 > From: Abner Chang >=20 > Add IPMI helper library to print debug message of IPMI Completion Code in > human readable string and return the transport interface additional statu= s. >=20 > Signed-off-by: Abner Chang > Cc: Isaac Oram > Cc: Abdul Lateef Attar > Cc: Nickle Wang > Cc: Tinh Nguyen > --- > .../BaseManageabilityTransportHelper.inf | 1 + > .../Library/ManageabilityTransportHelperLib.h | 24 +++++++ > .../Library/ManageabilityTransportIpmiLib.h | 13 +++- > .../Library/ManageabilityTransportLib.h | 11 +-- > .../BaseManageabilityTransportIpmiHelper.c | 70 +++++++++++++++++++ > 5 files changed, 112 insertions(+), 7 deletions(-) create mode 100644 > Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/B > aseManageabilityTransportIpmiHelper.c >=20 > diff --git > a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib > /BaseManageabilityTransportHelper.inf > b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib > /BaseManageabilityTransportHelper.inf > index c9e5eaef60..0936449fda 100644 > --- > a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib > /BaseManageabilityTransportHelper.inf > +++ > b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelper > +++ Lib/BaseManageabilityTransportHelper.inf > @@ -21,6 +21,7 @@ >=20 > [Sources] > BaseManageabilityTransportHelper.c > + BaseManageabilityTransportIpmiHelper.c >=20 > [LibraryClasses] > BaseMemoryLib > diff --git > a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelpe > rLib.h > b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelpe > rLib.h > index c2c98d6c2d..11a1bd0521 100644 > --- > a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelpe > rLib.h > +++ > b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHe > +++ lperLib.h > @@ -187,4 +187,28 @@ HelperManageabilityDebugPrint ( > ... > ); >=20 > +/// > +/// IPMI Helper Functions. > +/// > + > +/** > + This function returns a human readable string of IPMI KCS Completion > +Code > + and returns the corresponding additional status of transport interface= . > + > + @param [in] CompletionCode The Completion Code returned from KCS. > + @param [out] CompletionCodeStr Human readable string of IPMI > Completion Code. > + @param [out] AdditionalStatus Return the addtional status. > + > + @retval EFI_SUCCESS The information of Completion Code is > returned. > + @retval EFI_NOT_FOUND No information of Completion Code is > returned. > + @retval EFI_INVALID_PARAMETER The given parameter is incorrect. > + > +**/ > +EFI_STATUS > +IpmiHelperCheckCompletionCode ( > + IN UINT8 CompletionCode, > + OUT CHAR16 **CompletionCodeStr, > + OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS > *AdditionalStatus > + ); > + > #endif > diff --git > a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportIpmiLi > b.h > b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportIpmiLi > b.h > index 1628255a6a..6d136e460f 100644 > --- > a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportIpmiLi > b.h > +++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportIp > +++ miLib.h > @@ -16,9 +16,18 @@ > /// the payload. > /// > typedef struct { > - UINT8 Lun:2; > - UINT8 NetFn:6; > + UINT8 Lun : 2; > + UINT8 NetFn : 6; > UINT8 Command; > } MANAGEABILITY_IPMI_TRANSPORT_HEADER; >=20 > +/// > +/// The IPMI Completion Code mapping. > +/// > +typedef struct { > + UINT8 CompletionCode; > + CHAR16 *CompletionCodeString; > + MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS AdditionalStatus; > +} MANAGEABILITY_IPMI_COMPLETTION_CODE_MAPPING; > + > #endif > diff --git > a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportLib.h > b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportLib.h > index 04072aee89..f423a1ed44 100644 > --- > a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportLib.h > +++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportLi > +++ b.h > @@ -61,11 +61,12 @@ typedef union { > /// Additional transport interface status. > /// > typedef UINT32 MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS; > -#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_NO_ERRORS > 0x00000000 > -#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_ERROR > 0x00000001 > -#define > MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_BUSY_IN_READ > 0x00000002 > -#define > MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_BUSY_IN_WRITE > 0x00000004 -#define > MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_NOT_AVAILABLE > 0xffffffff > +#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_NO_ERRORS > 0x00000000 > +#define MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_ERROR > 0x00000001 > +#define > MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_BUSY_IN_READ > 0x00000002 > +#define > MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_BUSY_IN_WRITE > 0x00000004 > +#define > MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_INVALID_COMMAND > 0x00000008 > +#define > MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_NOT_AVAILABLE > 0xffffffff >=20 > /// > /// Additional transport interface features. > diff --git > a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib > /BaseManageabilityTransportIpmiHelper.c > b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib > /BaseManageabilityTransportIpmiHelper.c > new file mode 100644 > index 0000000000..8710cafc99 > --- /dev/null > +++ > b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelper > +++ Lib/BaseManageabilityTransportIpmiHelper.c > @@ -0,0 +1,70 @@ > +/** @file > + Null instance of Manageability IPMI Helper Library > + > + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights > +reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ > + > +#include > +#include > +#include > + > +#include > + > +// > +// BaseManageabilityTransportHelper is used by PEI, DXE and SMM. > +// Make sure the global variables added here should be unchangeable. > +// > +MANAGEABILITY_IPMI_COMPLETTION_CODE_MAPPING > IpmiCompletionCodeMapping[] =3D { > + { IPMI_COMP_CODE_NORMAL, L"IPMI Completion Code - Normal", > MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_NO_ERRORS }, > + { IPMI_COMP_CODE_NODE_BUSY, L"IPMI Completion Code - Busy", > MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_BUSY_IN_READ }, > + { IPMI_COMP_CODE_INVALID_COMMAND, L"IPMI Completion Code - > Invalid > +command", > MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_INVALID_COMMAND } > +}; > + > +UINT8 IpmiCompletionCodeMappingEntries =3D sizeof > +(IpmiCompletionCodeMapping) / sizeof > +(MANAGEABILITY_IPMI_COMPLETTION_CODE_MAPPING); > + > +/// > +/// IPMI Helper Functions. > +/// > + > +/** > + This function returns a human readable string of IPMI KCS Completion > +Code > + and returns the corresponding additional status of transport interface= . > + > + @param [in] CompletionCode The Completion Code returned from KCS. > + @param [out] CompletionCodeStr Human readable string of IPMI > Completion Code. > + @param [out] AdditionalStatus Return the addtional status. > + > + @retval EFI_SUCCESS The information of Completion Code is > returned. > + @retval EFI_NOT_FOUND No information of Completion Code is > returned. > + @retval EFI_INVALID_PARAMETER The given parameter is incorrect. > + > +**/ > +EFI_STATUS > +IpmiHelperCheckCompletionCode ( > + IN UINT8 CompletionCode, > + OUT CHAR16 **CompletionCodeStr, > + OUT MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS > *AdditionalStatus > + ) > +{ > + UINT8 Index; > + MANAGEABILITY_IPMI_COMPLETTION_CODE_MAPPING *ThisCcMapping; > + > + if ((CompletionCodeStr =3D=3D NULL) || (AdditionalStatus =3D=3D NULL))= { > + return EFI_INVALID_PARAMETER; > + } > + > + *AdditionalStatus =3D 0; > + ThisCcMapping =3D IpmiCompletionCodeMapping; > + for (Index =3D 0; Index < IpmiCompletionCodeMappingEntries; Index++) { > + if (ThisCcMapping->CompletionCode =3D=3D CompletionCode) { > + *CompletionCodeStr =3D ThisCcMapping->CompletionCodeString; > + *AdditionalStatus =3D ThisCcMapping->AdditionalStatus; > + return EFI_SUCCESS; > + } > + > + ThisCcMapping++; > + } > + > + return EFI_NOT_FOUND; > +} > -- > 2.37.1.windows.1