It is required to reinitialize DataSize variable before subsequent
IpmiSendCommand calls. It is especially required after processing
IpmiSendCommand with IPMI_GET_BMC_EXECUTION_CONTEXT because it returns
only 2 bytes as a response. So to the next call of IpmiSendCommand with
IPMI_APP_GET_DEVICE_ID DataSize=2 will be passed. Probably this call will
fail because the expected size of returned data either 12 or 16 bytes
depending on IPMI version supported.
Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
.../IpmiFeaturePkg/GenericIpmi/Dxe/IpmiInit.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/IpmiInit.c b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/IpmiInit.c
index 5bdbe47b6acb..c333ca2e067a 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/IpmiInit.c
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/IpmiInit.c
@@ -305,6 +305,7 @@ Returns:
mIpmiInstance->BmcStatus = BMC_OK;
return EFI_SUCCESS;
} else {
+ DataSize = sizeof (TempData);
Status = IpmiSendCommand (
&IpmiInstance->IpmiTransport,
IPMI_NETFN_FIRMWARE, 0,
@@ -326,6 +327,7 @@ Returns:
while (Retries-- != 0) {
MicroSecondDelay(1*1000*1000); //delay 1 seconds
DEBUG ((EFI_D_ERROR, "[IPMI] UpdateMode Retries: %d \n",Retries));
+ DataSize = sizeof (TempData);
Status = IpmiSendCommand (
&IpmiInstance->IpmiTransport,
IPMI_NETFN_APP, 0,
--
2.32.0 (Apple Git-132)
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101045): https://edk2.groups.io/g/devel/message/101045
Mute This Topic: https://groups.io/mt/97539000/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-