* [edk2-platforms: PATCH] Features/Intel/IpmiFeaturePkg: Use MdePkg macros instead of redefining.
@ 2021-07-15 14:37 Chiu, Chasel
2021-07-20 7:20 ` Chaganty, Rangasai V
0 siblings, 1 reply; 2+ messages in thread
From: Chiu, Chasel @ 2021-07-15 14:37 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Nate DeSimone, Sai Chaganty, Liming Gao, Isaac Oram
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [edk2-platforms: PATCH] Features/Intel/IpmiFeaturePkg: Use MdePkg macros instead of redefining.
2021-07-15 14:37 [edk2-platforms: PATCH] Features/Intel/IpmiFeaturePkg: Use MdePkg macros instead of redefining Chiu, Chasel
@ 2021-07-20 7:20 ` Chaganty, Rangasai V
0 siblings, 0 replies; 2+ messages in thread
From: Chaganty, Rangasai V @ 2021-07-20 7:20 UTC (permalink / raw)
To: Chiu, Chasel, devel@edk2.groups.io
Cc: Desimone, Nathaniel L, Liming Gao, Oram, Isaac W
Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>
-----Original Message-----
From: Chiu, Chasel <chasel.chiu@intel.com>
Sent: Thursday, July 15, 2021 7:38 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Oram, Isaac W <isaac.w.oram@intel.com>
Subject: [edk2-platforms: PATCH] Features/Intel/IpmiFeaturePkg: Use MdePkg macros instead of redefining.
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/ServerMa
+++ nagement.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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-20 7:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-15 14:37 [edk2-platforms: PATCH] Features/Intel/IpmiFeaturePkg: Use MdePkg macros instead of redefining Chiu, Chasel
2021-07-20 7:20 ` Chaganty, Rangasai V
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox