From nobody Sun May 5 19:07:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+77811+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77811+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1626359881; cv=none; d=zohomail.com; s=zohoarc; b=LmBuQAYjlHhsuadeB/Owah6GLGc7unlvCiGb8MGbBEAYlwoTkmmXDTVOJljhgtbMGrhYrffX74UcYkPaJPz+WZvqrXVspDbNuTxeaBsQ91uXchDEfNowMuu38f97Uhg5fe6KOgXmRE4Rk3rg8YWlVzcqu49f8cNaEDgg6TEiL+c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626359881; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=e6fDTS/VXyqAwKkGhQdpsiSXbY55nF8GmCJdOGXLLrI=; b=aozYb1TgI1+jglWZX4cvWZ6Rqh+Xl3hM7PAMH0xh9R+Q8qZrMHLpbqjfUHclx0PfZRHHRW+tK/FYjW9rhgaB+ndlcHIN+sWjxji+4M+0+CwLrTaz6dTBen8AeBmX99FjV2Gg8xhE23sRgPDazpKuoYUFqAy/uIxKrxSba6QMRSg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77811+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1626359881721818.2371268117137; Thu, 15 Jul 2021 07:38:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id wc96YY1788612xVNXFwug8gh; Thu, 15 Jul 2021 07:38:01 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.8884.1626359879550897210 for ; Thu, 15 Jul 2021 07:37:59 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10045"; a="271672247" X-IronPort-AV: E=Sophos;i="5.84,242,1620716400"; d="scan'208";a="271672247" X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2021 07:37:52 -0700 X-IronPort-AV: E=Sophos;i="5.84,242,1620716400"; d="scan'208";a="505842757" X-Received: from cchiu4-mobl.gar.corp.intel.com ([10.252.186.253]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2021 07:37:51 -0700 From: "Chiu, Chasel" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Sai Chaganty , Liming Gao , Isaac Oram Subject: [edk2-devel] [edk2-platforms: PATCH] Features/Intel/IpmiFeaturePkg: Use MdePkg macros instead of redefining. Date: Thu, 15 Jul 2021 22:37:41 +0800 Message-Id: <20210715143741.1295-1-chasel.chiu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,chasel.chiu@intel.com X-Gm-Message-State: 2Bv9IFIs05HX0yrHDC06q3IFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1626359881; bh=iTnneZ5xUdYRaTmiVs6GfhX43eVGy4WyyOXT2cC2gTc=; h=Cc:Date:From:Reply-To:Subject:To; b=cYF21eSMcBAfJy1Gs6EOzqtWDsL7iARHo/Zk8FF1hv2Oosv1qVP+27QegZ2DGmsI3V0 CEc4ZnRsnoQUf0CthijCmO2uQ/vZl3GA1EnJxBR33R+9WELt7qL220oS6J9kpBF6rwPoT FuerJNYO302kVp4lOBJkNcLv6vAD89yz/wE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1626359883523100002 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3494 Renamed below macros and structure to use MdePkg ones. IPMI_MSG_GET_BMC_EXEC_RSP IPMI_GET_BMC_EXECUTION_CONTEXT IPMI_BMC_IN_FORCED_UPDATE_MODE Cc: Nate DeSimone Cc: Sai Chaganty Cc: Liming Gao Cc: Isaac Oram Signed-off-by: Chasel Chiu Reviewed-by: Sai Chaganty =20 --- Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/IpmiInit= .c | 8 ++++---- Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManagement= .h | 17 ----------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/= Dxe/IpmiInit.c b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericI= pmi/Dxe/IpmiInit.c index 1e0c132508..d788b48867 100644 --- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/Ipm= iInit.c +++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/Ipm= iInit.c @@ -242,7 +242,7 @@ Returns: EFI_STATUS Status; UINT32 DataSize; SM_CTRL_INFO *pBmcInfo; - EFI_IPMI_MSG_GET_BMC_EXEC_RSP *pBmcExecContext; + IPMI_MSG_GET_BMC_EXEC_RSP *pBmcExecContext; UINT32 Retries; #ifdef FAST_VIDEO_SUPPORT EFI_VIDEOPRINT_PROTOCOL *VideoPrintProtocol; @@ -301,14 +301,14 @@ Returns: Status =3D IpmiSendCommand ( &IpmiInstance->IpmiTransport, IPMI_NETFN_FIRMWARE, 0, - EFI_FIRMWARE_GET_BMC_EXECUTION_CONTEXT, + IPMI_GET_BMC_EXECUTION_CONTEXT, NULL, 0, IpmiInstance->TempData, &DataSize ); =20 - pBmcExecContext =3D (EFI_IPMI_MSG_GET_BMC_EXEC_RSP*)&IpmiInstance->Tem= pData[0]; + pBmcExecContext =3D (IPMI_MSG_GET_BMC_EXEC_RSP*)&IpmiInstance->TempDat= a[0]; DEBUG ((DEBUG_INFO, "[IPMI] Operational status of BMC: 0x%x\n", pBmcEx= ecContext->CurrentExecutionContext)); - if ((pBmcExecContext->CurrentExecutionContext =3D=3D EFI_FIRMWARE_BMC_= IN_FORCED_UPDATE_MODE) && + if ((pBmcExecContext->CurrentExecutionContext =3D=3D IPMI_BMC_IN_FORCE= D_UPDATE_MODE) && !EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "[IPMI] BMC in Forced Update mode, skip waiting= for BMC_READY.\n")); IpmiInstance->BmcStatus =3D BMC_UPDATE_IN_PROGRESS; diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/Serv= erManagement.h b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/= ServerManagement.h index 7591f33aba..244b86e91a 100644 --- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManag= ement.h +++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManag= ement.h @@ -149,15 +149,6 @@ typedef enum { #define UPPER_NON_RECOVER_GOING_LOW 0x400 #define UPPER_NON_RECOVER_GOING_HI 0x800 =20 -// -// Definitions for Get BMC Execution Context -// -#define EFI_FIRMWARE_GET_BMC_EXECUTION_CONTEXT 0x23 -// -// Current Execution Context responses -// -#define EFI_FIRMWARE_BMC_IN_FORCED_UPDATE_MODE 0x11 - // // Server Management COM Addressing types // @@ -327,14 +318,6 @@ typedef struct { UINT16 IoBasePort; } IPMI_HOB_DATA; =20 -// -// Constants and Structure definitions for "Get Device ID" command to fol= low here -// -typedef struct { - UINT8 CurrentExecutionContext; - UINT8 PartitionPointer; -} EFI_IPMI_MSG_GET_BMC_EXEC_RSP; - // // COM Layer Callback // --=20 2.28.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#77811): https://edk2.groups.io/g/devel/message/77811 Mute This Topic: https://groups.io/mt/84226659/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-