From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2013A202E53F3 for ; Sun, 8 Jul 2018 20:09:32 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jul 2018 20:09:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,328,1526367600"; d="scan'208";a="69690801" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.19]) by fmsmga004.fm.intel.com with ESMTP; 08 Jul 2018 20:09:22 -0700 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Jiewen Yao Date: Mon, 9 Jul 2018 11:09:17 +0800 Message-Id: <20180709030919.8464-3-hao.a.wu@intel.com> X-Mailer: git-send-email 2.12.0.windows.1 In-Reply-To: <20180709030919.8464-1-hao.a.wu@intel.com> References: <20180709030919.8464-1-hao.a.wu@intel.com> Subject: [PATCH edk2-platforms\devel-MinPlatform 2/4] AdvancedFeaturePkg/Ipmi: Update codes for header changes in MdePkg X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2018 03:09:32 -0000 The commit will remove the dependency on file: Platform/Intel/AdvancedFeaturePkg/Ipmi/Include/IpmiEx.h The IPMI header files within: edk2/MdePkg/Include/IndustryStandard/ already have the structure definitions in this IpmiEx.h file. Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu --- Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c | 4 ++-- Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbDxe.c | 11 +++++------ Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbPei.c | 5 ++--- Platform/Intel/AdvancedFeaturePkg/Ipmi/Include/Library/IpmiCommandLib.h | 3 +-- Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiFru/IpmiFru.c | 5 ++--- Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiInit/DxeIpmiInit.c | 10 ++++++++-- Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiInit/PeiIpmiInit.c | 10 ++++++++-- Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnApp.c | 1 - Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnChassis.c | 1 - Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnStorage.c | 7 +++---- Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnTransport.c | 1 - Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.c | 1 - Platform/Intel/AdvancedFeaturePkg/Ipmi/OsWdt/OsWdt.c | 7 +++---- Platform/Intel/AdvancedFeaturePkg/Ipmi/SolStatus/SolStatus.c | 11 +++++------ 14 files changed, 39 insertions(+), 38 deletions(-) diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c index 988b179c01..6125e2bd94 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c @@ -130,7 +130,7 @@ Returns: } if (EnableElog == NULL) { - *ElogStatus = GetBmcGlobalEnables.SystemEventLogging; + *ElogStatus = GetBmcGlobalEnables.GetEnables.Bits.SystemEventLogging; } else { if (Status == EFI_SUCCESS) { if (*EnableElog) { @@ -138,7 +138,7 @@ Returns: } CopyMem (&SetBmcGlobalEnables, (UINT8 *)&GetBmcGlobalEnables + sizeof(UINT8), sizeof(UINT8)); - SetBmcGlobalEnables.EnableSystemEventLogging = ElogStat; + SetBmcGlobalEnables.SetEnables.Bits.SystemEventLogging = ElogStat; Status = IpmiSetBmcGlobalEnables (&SetBmcGlobalEnables, &CompletionCode); } diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbDxe.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbDxe.c index 42fc6fc2ec..719d968b5a 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbDxe.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbDxe.c @@ -21,7 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include EFI_STATUS EfiDisableFrb ( @@ -56,7 +55,7 @@ EfiDisableFrb ( // // Check if timer is still running, if not abort disable routine. // - if (GetWatchdogTimer.TimerUse.TimerRunning == 0) { + if (GetWatchdogTimer.TimerUse.Bits.TimerRunning == 0) { return EFI_ABORTED; } @@ -64,8 +63,8 @@ EfiDisableFrb ( // // Just flip the Timer Use bit. This should release the timer. // - SetWatchdogTimer.TimerUse.TimerRunning = 0; - SetWatchdogTimer.TimerUse.TimerUse = IPMI_WATCHDOG_TIMER_BIOS_FRB2; + SetWatchdogTimer.TimerUse.Bits.TimerRunning = 0; + SetWatchdogTimer.TimerUse.Bits.TimerUse = IPMI_WATCHDOG_TIMER_BIOS_FRB2; SetWatchdogTimer.TimerUseExpirationFlagsClear &= ~BIT2; SetWatchdogTimer.TimerUseExpirationFlagsClear |= BIT1 | BIT4; @@ -150,7 +149,7 @@ CheckForAndReportErrors( SetWatchdogTimer.PretimeoutInterval = GetWatchdogTimer.PretimeoutInterval; SetWatchdogTimer.TimerUseExpirationFlagsClear = GetWatchdogTimer.TimerUseExpirationFlagsClear; SetWatchdogTimer.InitialCountdownValue = GetWatchdogTimer.InitialCountdownValue; - SetWatchdogTimer.TimerUse.TimerRunning = 1; + SetWatchdogTimer.TimerUse.Bits.TimerRunning = 1; SetWatchdogTimer.TimerUseExpirationFlagsClear |= BIT1 | BIT2 | BIT3; Status = IpmiSetWatchdogTimer (&SetWatchdogTimer, &CompletionCode); @@ -192,7 +191,7 @@ ReportFrb2Status ( // // Check if timer is running, report status to DEBUG_MODE output. // - if (GetWatchdogTimer.TimerUse.TimerRunning == 1) { + if (GetWatchdogTimer.TimerUse.Bits.TimerRunning == 1) { DEBUG ((DEBUG_INFO, "FRB2 Timer is running.\n")); } else { DEBUG ((DEBUG_INFO, "FRB2 Timer is not running.\n")); diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbPei.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbPei.c index 73f401284c..2a077bc3b9 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbPei.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Frb/FrbPei.c @@ -20,7 +20,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#include VOID SetWatchDogTimer ( @@ -40,9 +39,9 @@ SetWatchDogTimer ( if (Frb2Enabled) { ZeroMem (&FrbTimer, sizeof(FrbTimer)); //Byte 1 - FrbTimer.TimerUse.TimerUse = IPMI_WATCHDOG_TIMER_BIOS_FRB2; + FrbTimer.TimerUse.Bits.TimerUse = IPMI_WATCHDOG_TIMER_BIOS_FRB2; //Byte 2 - FrbTimer.TimerActions = 0; //NormalBoot, NoTimeOutInterrupt. i.e no action when BMC watchdog timeout + FrbTimer.TimerActions.Uint8 = 0; //NormalBoot, NoTimeOutInterrupt. i.e no action when BMC watchdog timeout //Byte 3 FrbTimer.PretimeoutInterval = 0; //Byte 4 diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Include/Library/IpmiCommandLib.h b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Include/Library/IpmiCommandLib.h index 216f2adb55..592d9c6846 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Include/Library/IpmiCommandLib.h +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Include/Library/IpmiCommandLib.h @@ -17,7 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#include // // NetFnApp @@ -228,7 +227,7 @@ IpmiSetSelTime ( EFI_STATUS EFIAPI IpmiGetSdrRepositoryInfo ( - OUT IPMI_GET_SDR_REPOSITORY_INFO *GetSdrRepositoryInfo + OUT IPMI_GET_SDR_REPOSITORY_INFO_RESPONSE *GetSdrRepositoryInfoResp ); EFI_STATUS diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiFru/IpmiFru.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiFru/IpmiFru.c index acba9d8e23..1be62a882b 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiFru/IpmiFru.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiFru/IpmiFru.c @@ -19,7 +19,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include EFI_STATUS InitializeFru ( @@ -57,9 +56,9 @@ Returns: return Status; } - DEBUG((DEBUG_ERROR, "!!! IpmiFru FruInventorySupport %x\n", ControllerInfo.FruInventorySupport)); + DEBUG((DEBUG_ERROR, "!!! IpmiFru FruInventorySupport %x\n", ControllerInfo.DeviceSupport.Bits.FruInventorySupport)); - if (ControllerInfo.FruInventorySupport) { + if (ControllerInfo.DeviceSupport.Bits.FruInventorySupport) { GetFruInventoryAreaInfoRequest.DeviceId = 0; Status = IpmiGetFruInventoryAreaInfo (&GetFruInventoryAreaInfoRequest, &GetFruInventoryAreaInfoResponse); if (EFI_ERROR (Status)) { diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiInit/DxeIpmiInit.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiInit/DxeIpmiInit.c index 0a49b87859..5c5079d7fb 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiInit/DxeIpmiInit.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiInit/DxeIpmiInit.c @@ -104,8 +104,14 @@ Returns: } } while (TRUE); - DEBUG((DEBUG_INFO, "[IPMI] BMC Device ID: 0x%02X, firmware version: %d.%02X\n", BmcInfo.DeviceId, BmcInfo.MajorFirmwareRev, BmcInfo.MinorFirmwareRev)); - *UpdateMode = (BOOLEAN)BmcInfo.UpdateMode; + DEBUG(( + DEBUG_INFO, + "[IPMI] BMC Device ID: 0x%02X, firmware version: %d.%02X\n", + BmcInfo.DeviceId, + BmcInfo.FirmwareRev1.Bits.MajorFirmwareRev, + BmcInfo.MinorFirmwareRev + )); + *UpdateMode = (BOOLEAN)BmcInfo.FirmwareRev1.Bits.UpdateMode; return Status; } diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiInit/PeiIpmiInit.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiInit/PeiIpmiInit.c index 962aff6f4b..85dfcf77e0 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiInit/PeiIpmiInit.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/IpmiInit/PeiIpmiInit.c @@ -62,8 +62,14 @@ Returns: } } while (TRUE); - DEBUG((DEBUG_INFO, "[IPMI] BMC Device ID: 0x%02X, firmware version: %d.%02X\n", BmcInfo.DeviceId, BmcInfo.MajorFirmwareRev, BmcInfo.MinorFirmwareRev)); - *UpdateMode = (BOOLEAN)BmcInfo.UpdateMode; + DEBUG(( + DEBUG_INFO, + "[IPMI] BMC Device ID: 0x%02X, firmware version: %d.%02X\n", + BmcInfo.DeviceId, + BmcInfo.FirmwareRev1.Bits.MajorFirmwareRev, + BmcInfo.MinorFirmwareRev + )); + *UpdateMode = (BOOLEAN)BmcInfo.FirmwareRev1.Bits.UpdateMode; return Status; } diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnApp.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnApp.c index f11b23a439..4280f8805a 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnApp.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnApp.c @@ -18,7 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#include EFI_STATUS EFIAPI diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnChassis.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnChassis.c index eb699907a2..1f50ca1834 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnChassis.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnChassis.c @@ -18,7 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#include EFI_STATUS diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnStorage.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnStorage.c index ce2b7b9eb8..c7af988bd8 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnStorage.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnStorage.c @@ -18,7 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#include EFI_STATUS @@ -242,19 +241,19 @@ IpmiSetSelTime ( EFI_STATUS EFIAPI IpmiGetSdrRepositoryInfo ( - OUT IPMI_GET_SDR_REPOSITORY_INFO *GetSdrRepositoryInfo + OUT IPMI_GET_SDR_REPOSITORY_INFO_RESPONSE *GetSdrRepositoryInfoResp ) { EFI_STATUS Status; UINT32 DataSize; - DataSize = sizeof(*GetSdrRepositoryInfo); + DataSize = sizeof(*GetSdrRepositoryInfoResp); Status = IpmiSubmitCommand ( IPMI_NETFN_STORAGE, IPMI_STORAGE_GET_SDR_REPOSITORY_INFO, NULL, 0, - (VOID *)GetSdrRepositoryInfo, + (VOID *)GetSdrRepositoryInfoResp, &DataSize ); return Status; diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnTransport.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnTransport.c index 925436e61e..309cea819f 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnTransport.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiCommandLib/IpmiCommandLibNetFnTransport.c @@ -18,7 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#include EFI_STATUS diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.c index cdeac9d651..13b7e0b5a7 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/Library/IpmiLibNull/IpmiLibNull.c @@ -16,7 +16,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#include /** This service enables submitting commands via Ipmi. diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/OsWdt/OsWdt.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/OsWdt/OsWdt.c index c64c70f2a9..1001cb0192 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/OsWdt/OsWdt.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/OsWdt/OsWdt.c @@ -18,7 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include BOOLEAN mOsWdtFlag = FALSE; @@ -71,9 +70,9 @@ Returns: // // Just flip the Timer Use bit. This should release the timer. // - SetWatchdogTimer.TimerUse.TimerRunning = 1; - SetWatchdogTimer.TimerUse.TimerUse = IPMI_WATCHDOG_TIMER_OS_LOADER; - SetWatchdogTimer.TimerActions = IPMI_WATCHDOG_TIMER_ACTION_HARD_RESET; + SetWatchdogTimer.TimerUse.Bits.TimerRunning = 1; + SetWatchdogTimer.TimerUse.Bits.TimerUse = IPMI_WATCHDOG_TIMER_OS_LOADER; + SetWatchdogTimer.TimerActions.Uint8 = IPMI_WATCHDOG_TIMER_ACTION_HARD_RESET; SetWatchdogTimer.TimerUseExpirationFlagsClear &= ~BIT4; SetWatchdogTimer.TimerUseExpirationFlagsClear |= BIT1 | BIT2; SetWatchdogTimer.InitialCountdownValue = 600; // 100ms / count diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/SolStatus/SolStatus.c b/Platform/Intel/AdvancedFeaturePkg/Ipmi/SolStatus/SolStatus.c index 6d2dbd5bea..4163fa1229 100644 --- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/SolStatus/SolStatus.c +++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/SolStatus/SolStatus.c @@ -21,7 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include #define SOL_CMD_RETRY_COUNT 10 @@ -55,8 +54,8 @@ GetSOLStatus ( for (RetryCount = 0; RetryCount < SOL_CMD_RETRY_COUNT; RetryCount++) { ZeroMem (&GetConfigurationParametersRequest, sizeof(GetConfigurationParametersRequest)); - GetConfigurationParametersRequest.ChannelNumber = Channel; - GetConfigurationParametersRequest.ParameterSelector = ParamSel; + GetConfigurationParametersRequest.ChannelNumber.Bits.ChannelNumber = Channel; + GetConfigurationParametersRequest.ParameterSelector = ParamSel; ZeroMem (&GetConfigurationParametersResponse, sizeof(GetConfigurationParametersResponse)); @@ -110,9 +109,9 @@ SetSOLParams ( for (RetryCount = 0; RetryCount < SOL_CMD_RETRY_COUNT; RetryCount++) { ZeroMem (&SetConfigurationParametersRequest, sizeof(SetConfigurationParametersRequest)); - SetConfigurationParametersRequest.ChannelNumber = Channel; - SetConfigurationParametersRequest.ParameterSelector = ParamSel; - SetConfigurationParametersRequest.ParameterData[0] = Data; + SetConfigurationParametersRequest.ChannelNumber.Bits.ChannelNumber = Channel; + SetConfigurationParametersRequest.ParameterSelector = ParamSel; + SetConfigurationParametersRequest.ParameterData[0] = Data; CompletionCode = 0; -- 2.12.0.windows.1