diff options
Diffstat (limited to 'MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h')
-rw-r--r-- | MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h | 335 |
1 files changed, 245 insertions, 90 deletions
diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h b/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h index 833feeb9dd87..c20091fedcf2 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h @@ -7,14 +7,8 @@ See IPMI specification, Appendix G, Command Assignments and Appendix H, Sub-function Assignments. - Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef _IPMI_NET_FN_CHASSIS_H_ @@ -38,6 +32,15 @@ // // Constants and Structure definitions for "Get Chassis Capabilities" command to follow here // +typedef struct { + UINT8 CompletionCode; + UINT8 CapabilitiesFlags; + UINT8 ChassisFruInfoDeviceAddress; + UINT8 ChassisSDRDeviceAddress; + UINT8 ChassisSELDeviceAddress; + UINT8 ChassisSystemManagementDeviceAddress; + UINT8 ChassisBridgeDeviceAddress; +} IPMI_GET_CHASSIS_CAPABILITIES_RESPONSE; // // Definitions for Get Chassis Status command @@ -47,6 +50,13 @@ // // Constants and Structure definitions for "Get Chassis Status" command to follow here // +typedef struct { + UINT8 CompletionCode; + UINT8 CurrentPowerState; + UINT8 LastPowerEvent; + UINT8 MiscChassisState; + UINT8 FrontPanelButtonCapabilities; +} IPMI_GET_CHASSIS_STATUS_RESPONSE; // // Definitions for Chassis Control command @@ -56,6 +66,17 @@ // // Constants and Structure definitions for "Chassis Control" command to follow here // +typedef union { + struct { + UINT8 ChassisControl:4; + UINT8 Reserved:4; + } Bits; + UINT8 Uint8; +} IPMI_CHASSIS_CONTROL_CHASSIS_CONTROL; + +typedef struct { + IPMI_CHASSIS_CONTROL_CHASSIS_CONTROL ChassisControl; +} IPMI_CHASSIS_CONTROL_REQUEST; // // Definitions for Chassis Reset command @@ -92,6 +113,22 @@ // // Constants and Structure definitions for "Set Power Restore Policy" command to follow here // +typedef union { + struct { + UINT8 PowerRestorePolicy : 3; + UINT8 Reserved : 5; + } Bits; + UINT8 Uint8; +} IPMI_POWER_RESTORE_POLICY; + +typedef struct { + IPMI_POWER_RESTORE_POLICY PowerRestorePolicy; +} IPMI_SET_POWER_RESTORE_POLICY_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT8 PowerRestorePolicySupport; +} IPMI_SET_POWER_RESTORE_POLICY_RESPONSE; // // Definitions for Get System Restart Cause command @@ -101,26 +138,31 @@ // // Constants and Structure definitions for "Get System Restart Cause" command to follow here // -typedef enum { - Unknown, - ChassisControlCommand, - ResetViaPushButton, - PowerupViaPowerButton, - WatchdogExpiration, - Oem, - AutoPowerOnAlwaysRestore, - AutoPowerOnRestorePrevious, - ResetViaPef, - PowerCycleViaPef, - SoftReset, - PowerUpViaRtc +#define IPMI_SYSTEM_RESTART_CAUSE_UNKNOWN 0x0 +#define IPMI_SYSTEM_RESTART_CAUSE_CHASSIS_CONTROL_COMMAND 0x1 +#define IPMI_SYSTEM_RESTART_CAUSE_PUSHBUTTON_RESET 0x2 +#define IPMI_SYSTEM_RESTART_CAUSE_PUSHBUTTON_POWERUP 0x3 +#define IPMI_SYSTEM_RESTART_CAUSE_WATCHDOG_EXPIRE 0x4 +#define IPMI_SYSTEM_RESTART_CAUSE_OEM 0x5 +#define IPMI_SYSTEM_RESTART_CAUSE_AUTO_POWER_ALWAYS_RESTORE 0x6 +#define IPMI_SYSTEM_RESTART_CAUSE_AUTO_POWER_RESTORE_PREV 0x7 +#define IPMI_SYSTEM_RESTART_CAUSE_PEF_RESET 0x8 +#define IPMI_SYSTEM_RESTART_CAUSE_PEF_POWERCYCLE 0x9 +#define IPMI_SYSTEM_RESTART_CAUSE_SOFT_RESET 0xA +#define IPMI_SYSTEM_RESTART_CAUSE_RTC_POWERUP 0xB + +typedef union { + struct { + UINT8 Cause:4; + UINT8 Reserved:4; + } Bits; + UINT8 Uint8; } IPMI_SYSTEM_RESTART_CAUSE; typedef struct { - UINT8 CompletionCode; - UINT8 Cause:4; - UINT8 Reserved:4; - UINT8 ChannelNumber; + UINT8 CompletionCode; + IPMI_SYSTEM_RESTART_CAUSE RestartCause; + UINT8 ChannelNumber; } IPMI_GET_SYSTEM_RESTART_CAUSE_RESPONSE; // @@ -131,25 +173,39 @@ typedef struct { // // Constants and Structure definitions for "Set System boot options" command to follow here // +typedef union { + struct { + UINT8 ParameterSelector:7; + UINT8 MarkParameterInvalid:1; + } Bits; + UINT8 Uint8; +} IPMI_SET_BOOT_OPTIONS_PARAMETER_VALID; + typedef struct { - UINT8 ParameterSelector:7; - UINT8 MarkParameterInvalid:1; - UINT8 ParameterData[1]; + IPMI_SET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid; + UINT8 ParameterData[0]; } IPMI_SET_BOOT_OPTIONS_REQUEST; // -// Definitions for Get System BOOT options command +// Definitions for Get System Boot options command // #define IPMI_CHASSIS_GET_SYSTEM_BOOT_OPTIONS 0x09 // // Constants and Structure definitions for "Get System boot options" command to follow here // +typedef union { + struct { + UINT8 ParameterSelector:7; + UINT8 Reserved:1; + } Bits; + UINT8 Uint8; +} IPMI_GET_BOOT_OPTIONS_PARAMETER_SELECTOR; + typedef struct { - UINT8 ParameterSelector:7; - UINT8 Reserved:1; - UINT8 SetSelector; - UINT8 BlockSelector; + IPMI_GET_BOOT_OPTIONS_PARAMETER_SELECTOR ParameterSelector; + UINT8 SetSelector; + UINT8 BlockSelector; } IPMI_GET_BOOT_OPTIONS_REQUEST; typedef struct { @@ -172,26 +228,49 @@ typedef struct { } IPMI_BOOT_INITIATOR; // +// Definitions for boot option parameter selector +// +#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SET_IN_PROGRESS 0x0 +#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SELECTOR 0x1 +#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SCAN 0x2 +#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_BMC_BOOT_FLAG 0x3 +#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INFO_ACK 0x4 +#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_FLAGS 0x5 +#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_INFO 0x6 +#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_MAILBOX 0x7 +#define IPMI_BOOT_OPTIONS_PARAMETER_OEM_BEGIN 0x60 +#define IPMI_BOOT_OPTIONS_PARAMETER_OEM_END 0x7F + +// // Response Parameters for IPMI Get Boot Options // -typedef struct { - UINT8 SetInProgress: 2; - UINT8 Reserved: 6; +typedef union { + struct { + UINT8 SetInProgress : 2; + UINT8 Reserved : 6; + } Bits; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_0; typedef struct { UINT8 ServicePartitionSelector; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1; -typedef struct { - UINT8 ServicePartitionDiscovered:1; - UINT8 ServicePartitionScanRequest:1; - UINT8 Reserved: 5; +typedef union { + struct { + UINT8 ServicePartitionDiscovered : 1; + UINT8 ServicePartitionScanRequest : 1; + UINT8 Reserved: 6; + } Bits; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2; -typedef struct { - UINT8 BmcBootFlagValid: 5; - UINT8 Reserved: 3; +typedef union { + struct { + UINT8 BmcBootFlagValid : 5; + UINT8 Reserved : 3; + } Bits; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_3; typedef struct { @@ -199,45 +278,101 @@ typedef struct { UINT8 BootInitiatorAcknowledgeData; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_4; +// +// Definitions for the 'Boot device selector' field of Boot Option Parameters #5 +// +#define IPMI_BOOT_DEVICE_SELECTOR_NO_OVERRIDE 0x0 +#define IPMI_BOOT_DEVICE_SELECTOR_PXE 0x1 +#define IPMI_BOOT_DEVICE_SELECTOR_HARDDRIVE 0x2 +#define IPMI_BOOT_DEVICE_SELECTOR_HARDDRIVE_SAFE_MODE 0x3 +#define IPMI_BOOT_DEVICE_SELECTOR_DIAGNOSTIC_PARTITION 0x4 +#define IPMI_BOOT_DEVICE_SELECTOR_CD_DVD 0x5 +#define IPMI_BOOT_DEVICE_SELECTOR_BIOS_SETUP 0x6 +#define IPMI_BOOT_DEVICE_SELECTOR_REMOTE_FLOPPY 0x7 +#define IPMI_BOOT_DEVICE_SELECTOR_REMOTE_CD_DVD 0x8 +#define IPMI_BOOT_DEVICE_SELECTOR_PRIMARY_REMOTE_MEDIA 0x9 +#define IPMI_BOOT_DEVICE_SELECTOR_REMOTE_HARDDRIVE 0xB +#define IPMI_BOOT_DEVICE_SELECTOR_FLOPPY 0xF + #define BOOT_OPTION_HANDLED_BY_BIOS 0x01 +// +// Constant definitions for the 'BIOS Mux Control Override' field of Boot Option Parameters #5 +// +#define BIOS_MUX_CONTROL_OVERRIDE_RECOMMEND_SETTING 0x00 +#define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_BMC 0x01 +#define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_SYSTEM 0x02 + +typedef union { + struct { + UINT8 Reserved:5; + UINT8 BiosBootType:1; + UINT8 PersistentOptions:1; + UINT8 BootFlagValid:1; + } Bits; + UINT8 Uint8; +} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_1; + +typedef union { + struct { + UINT8 LockReset:1; + UINT8 ScreenBlank:1; + UINT8 BootDeviceSelector:4; + UINT8 LockKeyboard:1; + UINT8 CmosClear:1; + } Bits; + UINT8 Uint8; +} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_2; + +typedef union { + struct { + UINT8 ConsoleRedirection:2; + UINT8 LockSleep:1; + UINT8 UserPasswordBypass:1; + UINT8 ForceProgressEventTrap:1; + UINT8 BiosVerbosity:2; + UINT8 LockPower:1; + } Bits; + UINT8 Uint8; +} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_3; + +typedef union { + struct { + UINT8 BiosMuxControlOverride:3; + UINT8 BiosSharedModeOverride:1; + UINT8 Reserved:4; + } Bits; + UINT8 Uint8; +} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_4; + +typedef union { + struct { + UINT8 DeviceInstanceSelector:5; + UINT8 Reserved:3; + } Bits; + UINT8 Uint8; +} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_5; + typedef struct { - // - // Data 1 - // - UINT8 Reserved0:6; - UINT8 PersistentOptions:1; - UINT8 BootFlagValid:1; - // - // Data 2 - // - UINT8 LockReset:1; - UINT8 ScreenBlank:1; - UINT8 BootDeviceSelector:4; - UINT8 LockKeyboard:1; - UINT8 CmosClear:1; - // - // - // Data 3 - UINT8 ConsoleRedirection:2; - UINT8 LockSleep:1; - UINT8 UserPasswordBypass:1; - UINT8 ForceProgressEventTrap:1; - UINT8 BiosVerbosity:2; - UINT8 LockPower:1; - // - // Data 4 - // - UINT8 BiosMuxControlOverride:2; - UINT8 BiosSharedModeOverride:1; - UINT8 Reserved1:4; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_1 Data1; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_2 Data2; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_3 Data3; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_4 Data4; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_5 Data5; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5; +typedef union { + struct { + UINT8 ChannelNumber:4; + UINT8 Reserved:4; + } Bits; + UINT8 Uint8; +} IPMI_BOOT_OPTIONS_CHANNEL_NUMBER; + typedef struct { - UINT8 ChannelNumber:4; - UINT8 Reserved:4; - UINT8 SessionId[4]; - UINT8 BootInfoTimeStamp[4]; + IPMI_BOOT_OPTIONS_CHANNEL_NUMBER ChannelNumber; + UINT8 SessionId[4]; + UINT8 BootInfoTimeStamp[4]; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_6; typedef struct { @@ -256,13 +391,27 @@ typedef union { IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7 Parm7; } IPMI_BOOT_OPTIONS_PARAMETERS; +typedef union { + struct { + UINT8 ParameterVersion:4; + UINT8 Reserved:4; + } Bits; + UINT8 Uint8; +} IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION; + +typedef union { + struct { + UINT8 ParameterSelector:7; + UINT8 ParameterValid:1; + } Bits; + UINT8 Uint8; +} IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID; + typedef struct { - UINT8 CompletionCode; - UINT8 ParameterVersion:4; - UINT8 Reserved:4; - UINT8 ParameterSelector:7; - UINT8 ParameterValid:1; - UINT8 ParameterData[1]; + UINT8 CompletionCode; + IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION ParameterVersion; + IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid; + UINT8 ParameterData[0]; } IPMI_GET_BOOT_OPTIONS_RESPONSE; // @@ -270,17 +419,23 @@ typedef struct { // #define IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES 0x0A -typedef struct { - UINT8 DisablePoweroffButton:1; - UINT8 DisableResetButton:1; - UINT8 DisableDiagnosticInterruptButton:1; - UINT8 DisableStandbyButton:1; - UINT8 Reserved:4; -} IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES_REQUEST; - // // Constants and Structure definitions for "Set front panel button enables" command to follow here // +typedef union { + struct { + UINT8 DisablePoweroffButton:1; + UINT8 DisableResetButton:1; + UINT8 DisableDiagnosticInterruptButton:1; + UINT8 DisableStandbyButton:1; + UINT8 Reserved:4; + } Bits; + UINT8 Uint8; +} IPMI_FRONT_PANEL_BUTTON_ENABLES; + +typedef struct { + IPMI_FRONT_PANEL_BUTTON_ENABLES FrontPanelButtonEnables; +} IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES_REQUEST; // // Definitions for Set Power Cycle Interval command |