public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chiu, Chasel" <chasel.chiu@intel.com>
To: devel@edk2.groups.io
Cc: Chasel Chiu <chasel.chiu@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Sai Chaganty <rangasai.v.chaganty@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Isaac Oram <isaac.w.oram@intel.com>
Subject: [edk2-platforms: PATCH] Features/Intel/IpmiFeaturePkg: Use MdePkg macros instead of redefining.
Date: Thu, 15 Jul 2021 22:37:41 +0800	[thread overview]
Message-ID: <20210715143741.1295-1-chasel.chiu@intel.com> (raw)

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3494

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 <nathaniel.l.desimone@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
---
 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/GenericIpmi/Dxe/IpmiInit.c
index 1e0c132508..d788b48867 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/IpmiInit.c
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/IpmiInit.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 = IpmiSendCommand (
                &IpmiInstance->IpmiTransport,
                IPMI_NETFN_FIRMWARE, 0,
-               EFI_FIRMWARE_GET_BMC_EXECUTION_CONTEXT,
+               IPMI_GET_BMC_EXECUTION_CONTEXT,
                NULL, 0,
                IpmiInstance->TempData, &DataSize
                );
 
-    pBmcExecContext = (EFI_IPMI_MSG_GET_BMC_EXEC_RSP*)&IpmiInstance->TempData[0];
+    pBmcExecContext = (IPMI_MSG_GET_BMC_EXEC_RSP*)&IpmiInstance->TempData[0];
     DEBUG ((DEBUG_INFO, "[IPMI] Operational status of BMC: 0x%x\n", pBmcExecContext->CurrentExecutionContext));
-    if ((pBmcExecContext->CurrentExecutionContext == EFI_FIRMWARE_BMC_IN_FORCED_UPDATE_MODE) &&
+    if ((pBmcExecContext->CurrentExecutionContext == IPMI_BMC_IN_FORCED_UPDATE_MODE) &&
         !EFI_ERROR (Status)) {
       DEBUG ((DEBUG_ERROR, "[IPMI] BMC in Forced Update mode, skip waiting for BMC_READY.\n"));
       IpmiInstance->BmcStatus = BMC_UPDATE_IN_PROGRESS;
diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManagement.h b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManagement.h
index 7591f33aba..244b86e91a 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManagement.h
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManagement.h
@@ -149,15 +149,6 @@ typedef enum {
 #define UPPER_NON_RECOVER_GOING_LOW   0x400
 #define UPPER_NON_RECOVER_GOING_HI    0x800
 
-//
-// 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;
 
-//
-//  Constants and Structure definitions for "Get Device ID" command to follow here
-//
-typedef struct {
-  UINT8   CurrentExecutionContext;
-  UINT8   PartitionPointer;
-} EFI_IPMI_MSG_GET_BMC_EXEC_RSP;
-
 //
 // COM Layer Callback
 //
-- 
2.28.0.windows.1


             reply	other threads:[~2021-07-15 14:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 14:37 Chiu, Chasel [this message]
2021-07-20  7:20 ` [edk2-platforms: PATCH] Features/Intel/IpmiFeaturePkg: Use MdePkg macros instead of redefining Chaganty, Rangasai V

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210715143741.1295-1-chasel.chiu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox