]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/IndustryStandard/Ipmi: Use union for bitmap fields
authorHao Wu <hao.a.wu@intel.com>
Sat, 28 Apr 2018 05:48:06 +0000 (13:48 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 19 Jun 2018 05:04:32 +0000 (13:04 +0800)
This commit enhances the bitmap fields defined in the IPMI header files,
union types will be used to provide the users with both the individual
bitmap access and the whole byte/word access.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h
MdePkg/Include/IndustryStandard/IpmiNetFnApp.h
MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h
MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h
MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h

index 2b58cbf0b409eb10a33fd1a8f4085d83aeefefdc..1aef4b14f2a92c8677382fe03fb9b225c50ef3fa 100644 (file)
 #pragma pack(1)\r
 \r
 //\r
-//  Structure definition for FRU Common Header\r
+//  Structure definitions for FRU Common Header\r
 //\r
+typedef union {\r
+  ///\r
+  /// Individual bit fields\r
+  ///\r
+  struct {\r
+    UINT8  FormatVersionNumber:4;\r
+    UINT8  Reserved:4;\r
+  } Bits;\r
+  ///\r
+  /// All bit fields as a 8-bit value\r
+  ///\r
+  UINT8  Uint8;\r
+} IPMI_FRU_COMMON_HEADER_FORMAT_VERSION;\r
+\r
 typedef struct {\r
-  UINT8    FormatVersionNumber:4;\r
-  UINT8    Reserved:4;\r
-  UINT8    InternalUseStartingOffset;\r
-  UINT8    ChassisInfoStartingOffset;\r
-  UINT8    BoardAreaStartingOffset;\r
-  UINT8    ProductInfoStartingOffset;\r
-  UINT8    MultiRecInfoStartingOffset;\r
-  UINT8    Pad;\r
-  UINT8    Checksum;\r
+  IPMI_FRU_COMMON_HEADER_FORMAT_VERSION  FormatVersion;\r
+  UINT8                                  InternalUseStartingOffset;\r
+  UINT8                                  ChassisInfoStartingOffset;\r
+  UINT8                                  BoardAreaStartingOffset;\r
+  UINT8                                  ProductInfoStartingOffset;\r
+  UINT8                                  MultiRecInfoStartingOffset;\r
+  UINT8                                  Pad;\r
+  UINT8                                  Checksum;\r
 } IPMI_FRU_COMMON_HEADER;\r
 \r
 //\r
 //  Structure definition for FRU MultiRecord Header\r
 //\r
+typedef union {\r
+  ///\r
+  /// Individual bit fields\r
+  ///\r
+  struct {\r
+    UINT8  RecordFormatVersion:4;\r
+    UINT8  Reserved:3;\r
+    UINT8  EndofList:1;\r
+  } Bits;\r
+  ///\r
+  /// All bit fields as a 8-bit value\r
+  ///\r
+  UINT8  Uint8;\r
+} IPMI_FRU_MULTI_RECORD_HEADER_FORMAT_VERSION;\r
+\r
 typedef struct {\r
-  UINT8    RecordTypeId;\r
-  UINT8    RecordFormatVersion:4;\r
-  UINT8    Reserved:3;\r
-  UINT8    EndofList:1;\r
-  UINT8    RecordLength;\r
-  UINT8    RecordChecksum;\r
-  UINT8    HeaderChecksum;\r
+  UINT8                                        RecordTypeId;\r
+  IPMI_FRU_MULTI_RECORD_HEADER_FORMAT_VERSION  FormatVersion;\r
+  UINT8                                        RecordLength;\r
+  UINT8                                        RecordChecksum;\r
+  UINT8                                        HeaderChecksum;\r
 } IPMI_FRU_MULTI_RECORD_HEADER;\r
 \r
 //\r
index cdd3f07c65cfec96e576dbf8911c5cf66fe1c27d..15eeefee150f7ad860e34697c1a72c42c153cfd7 100644 (file)
 //\r
 //  Constants and Structure definitions for "Get Device ID" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  DeviceRevision : 4;\r
+    UINT8  Reserved : 3;\r
+    UINT8  DeviceSdr : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_DEVICE_ID_DEVICE_REV;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  MajorFirmwareRev : 7;\r
+    UINT8  UpdateMode : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_DEVICE_ID_FIRMWARE_REV_1;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  SensorDeviceSupport : 1;\r
+    UINT8  SdrRepositorySupport : 1;\r
+    UINT8  SelDeviceSupport : 1;\r
+    UINT8  FruInventorySupport : 1;\r
+    UINT8  IpmbMessageReceiver : 1;\r
+    UINT8  IpmbMessageGenerator : 1;\r
+    UINT8  BridgeSupport : 1;\r
+    UINT8  ChassisSupport : 1;\r
+  } Bits;\r
+  UINT8    Uint8;\r
+} IPMI_GET_DEVICE_ID_DEVICE_SUPPORT;\r
+\r
 typedef struct {\r
-  UINT8   CompletionCode;\r
-  UINT8   DeviceId;\r
-  UINT8   DeviceRevision : 4;\r
-  UINT8   Reserved : 3;\r
-  UINT8   DeviceSdr : 1;\r
-  UINT8   MajorFirmwareRev : 7;\r
-  UINT8   UpdateMode : 1;\r
-  UINT8   MinorFirmwareRev;\r
-  UINT8   SpecificationVersion;\r
-  UINT8   SensorDeviceSupport : 1;\r
-  UINT8   SdrRepositorySupport : 1;\r
-  UINT8   SelDeviceSupport : 1;\r
-  UINT8   FruInventorySupport : 1;\r
-  UINT8   IpmbMessageReceiver : 1;\r
-  UINT8   IpmbMessageGenerator : 1;\r
-  UINT8   BridgeSupport : 1;\r
-  UINT8   ChassisSupport : 1;\r
-  UINT8   ManufacturerId[3];\r
-  UINT16  ProductId;\r
-  UINT32  AuxFirmwareRevInfo;\r
+  UINT8                              CompletionCode;\r
+  UINT8                              DeviceId;\r
+  IPMI_GET_DEVICE_ID_DEVICE_REV      DeviceRevision;\r
+  IPMI_GET_DEVICE_ID_FIRMWARE_REV_1  FirmwareRev1;\r
+  UINT8                              MinorFirmwareRev;\r
+  UINT8                              SpecificationVersion;\r
+  IPMI_GET_DEVICE_ID_DEVICE_SUPPORT  DeviceSupport;\r
+  UINT8                              ManufacturerId[3];\r
+  UINT16                             ProductId;\r
+  UINT32                             AuxFirmwareRevInfo;\r
 } IPMI_GET_DEVICE_ID_RESPONSE;\r
 \r
 \r
@@ -165,11 +186,17 @@ typedef struct {
 #define IPMI_DEVICE_POWER_STATE_UNKNOWN      0x2A\r
 #define IPMI_DEVICE_POWER_STATE_NO_CHANGE    0x7F\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  PowerState  : 7;\r
+    UINT8  StateChange : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_ACPI_POWER_STATE;\r
+\r
 typedef struct {\r
-  UINT8  AcpiSystemPowerState  : 7;\r
-  UINT8  AcpiSystemStateChange : 1;\r
-  UINT8  AcpiDevicePowerState  : 7;\r
-  UINT8  AcpiDeviceStateChange : 1;\r
+  IPMI_ACPI_POWER_STATE  SystemPowerState;\r
+  IPMI_ACPI_POWER_STATE  DevicePowerState;\r
 } IPMI_SET_ACPI_POWER_STATE_REQUEST;\r
 \r
 //\r
@@ -227,11 +254,14 @@ typedef struct {
 //\r
 //  Structure definition for timer Use\r
 //\r
-typedef struct {\r
-  UINT8 TimerUse : 3;\r
-  UINT8 Reserved : 3;\r
-  UINT8 TimerRunning : 1;\r
-  UINT8 TimerUseExpirationFlagLog : 1;\r
+typedef union {\r
+  struct {\r
+    UINT8  TimerUse : 3;\r
+    UINT8  Reserved : 3;\r
+    UINT8  TimerRunning : 1;\r
+    UINT8  TimerUseExpirationFlagLog : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_WATCHDOG_TIMER_USE;\r
 \r
 //\r
@@ -253,11 +283,14 @@ typedef struct {
 //\r
 //  Structure definitions for Timer Actions\r
 //\r
-typedef struct {\r
-  UINT8  TimeoutAction : 3;\r
-  UINT8  Reserved1 : 1;\r
-  UINT8  PreTimeoutInterrupt : 3;\r
-  UINT8  Reserved2 : 1;\r
+typedef union {\r
+  struct {\r
+    UINT8  TimeoutAction : 3;\r
+    UINT8  Reserved1 : 1;\r
+    UINT8  PreTimeoutInterrupt : 3;\r
+    UINT8  Reserved2 : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_WATCHDOG_TIMER_ACTIONS;\r
 \r
 //\r
@@ -307,15 +340,22 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Set BMC Global Enables " command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  ReceiveMessageQueueInterrupt : 1;\r
+    UINT8  EventMessageBufferFullInterrupt : 1;\r
+    UINT8  EventMessageBuffer : 1;\r
+    UINT8  SystemEventLogging : 1;\r
+    UINT8  Reserved : 1;\r
+    UINT8  Oem0Enable : 1;\r
+    UINT8  Oem1Enable : 1;\r
+    UINT8  Oem2Enable : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_BMC_GLOBAL_ENABLES;\r
+\r
 typedef struct {\r
-  UINT8  EnableReceiveMessageQueueInterrupt : 1;\r
-  UINT8  EnableEventMessageBufferFullInterrupt : 1;\r
-  UINT8  EnableEventMessageBuffer : 1;\r
-  UINT8  EnableSystemEventLogging : 1;\r
-  UINT8  Reserved : 1;\r
-  UINT8  Oem0Enable : 1;\r
-  UINT8  Oem1Enable : 1;\r
-  UINT8  Oem2Enable : 1;\r
+  IPMI_BMC_GLOBAL_ENABLES  SetEnables;\r
 } IPMI_SET_BMC_GLOBAL_ENABLES_REQUEST;\r
 \r
 //\r
@@ -327,15 +367,8 @@ typedef struct {
 //  Constants and Structure definitions for "Get BMC Global Enables " command to follow here\r
 //\r
 typedef struct {\r
-  UINT8  CompletionCode;\r
-  UINT8  ReceiveMessageQueueInterrupt : 1;\r
-  UINT8  EventMessageBufferFullInterrupt : 1;\r
-  UINT8  EventMessageBuffer : 1;\r
-  UINT8  SystemEventLogging : 1;\r
-  UINT8  Reserved : 1;\r
-  UINT8  Oem0Enable : 1;\r
-  UINT8  Oem1Enable : 1;\r
-  UINT8  Oem2Enable : 1;\r
+  UINT8                    CompletionCode;\r
+  IPMI_BMC_GLOBAL_ENABLES  GetEnables;\r
 } IPMI_GET_BMC_GLOBAL_ENABLES_RESPONSE;\r
 \r
 //\r
@@ -346,15 +379,22 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Clear Message Flags" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  ReceiveMessageQueue : 1;\r
+    UINT8  EventMessageBuffer : 1;\r
+    UINT8  Reserved1 : 1;\r
+    UINT8  WatchdogPerTimeoutInterrupt : 1;\r
+    UINT8  Reserved2 : 1;\r
+    UINT8  Oem0 : 1;\r
+    UINT8  Oem1 : 1;\r
+    UINT8  Oem2 : 1;\r
+  } Bits;\r
+  UINT8    Uint8;\r
+} IPMI_MESSAGE_FLAGS;\r
+\r
 typedef struct {\r
-  UINT8  ClearReceiveMessageQueue : 1;\r
-  UINT8  ClearEventMessageBuffer : 1;\r
-  UINT8  Reserved0 : 1;\r
-  UINT8  ClearWatchdogPerTimeoutInterruptFlag : 1;\r
-  UINT8  Reserved : 1;\r
-  UINT8  ClearOem0Enable : 1;\r
-  UINT8  ClearOem1Enable : 1;\r
-  UINT8  ClearOem2Enable : 1;\r
+  IPMI_MESSAGE_FLAGS  ClearFlags;\r
 } IPMI_CLEAR_MESSAGE_FLAGS_REQUEST;\r
 \r
 //\r
@@ -366,15 +406,8 @@ typedef struct {
 //  Constants and Structure definitions for "Get Message Flags" command to follow here\r
 //\r
 typedef struct {\r
-  UINT8  CompletionCode;\r
-  UINT8  ReceiveMessageAvailable : 1;\r
-  UINT8  EventMessageBufferFull : 1;\r
-  UINT8  Reserved0 : 1;\r
-  UINT8  WatchdogPerTimeoutInterruptOccurred : 1;\r
-  UINT8  Reserved : 1;\r
-  UINT8  Oem0DataAvailable : 1;\r
-  UINT8  Oem1DataAvailable : 1;\r
-  UINT8  Oem2DataAvailable : 1;\r
+  UINT8               CompletionCode;\r
+  IPMI_MESSAGE_FLAGS  GetFlags;\r
 } IPMI_GET_MESSAGE_FLAGS_RESPONSE;\r
 \r
 //\r
@@ -394,11 +427,18 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Get Message" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelNumber : 4;\r
+    UINT8  InferredPrivilegeLevel : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_MESSAGE_CHANNEL_NUMBER;\r
+\r
 typedef struct {\r
-  UINT8  CompletionCode;\r
-  UINT8  ChannelNumber : 4;\r
-  UINT8  InferredPrivilegeLevel : 4;\r
-  UINT8  MessageData[0];\r
+  UINT8                            CompletionCode;\r
+  IPMI_GET_MESSAGE_CHANNEL_NUMBER  ChannelNumber;\r
+  UINT8                            MessageData[0];\r
 } IPMI_GET_MESSAGE_RESPONSE;\r
 \r
 //\r
@@ -409,13 +449,20 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Send Message" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelNumber : 4;\r
+    UINT8  Authentication : 1;\r
+    UINT8  Encryption : 1;\r
+    UINT8  Tracking : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SEND_MESSAGE_CHANNEL_NUMBER;\r
+\r
 typedef struct {\r
-  UINT8  CompletionCode;\r
-  UINT8  ChannelNumber : 4;\r
-  UINT8  Authentication : 1;\r
-  UINT8  Encryption : 1;\r
-  UINT8  Tracking : 2;\r
-  UINT8  MessageData[0];\r
+  UINT8                             CompletionCode;\r
+  IPMI_SEND_MESSAGE_CHANNEL_NUMBER  ChannelNumber;\r
+  UINT8                             MessageData[0];\r
 } IPMI_SEND_MESSAGE_REQUEST;\r
 \r
 typedef struct {\r
@@ -545,22 +592,50 @@ typedef struct {
 #define IPMI_CHANNEL_ACCESS_MODES_ALWAYS_AVAILABLE  0x2\r
 #define IPMI_CHANNEL_ACCESS_MODES_SHARED            0x3\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelNo : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_CHANNEL_ACCESS_CHANNEL_NUMBER;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  Reserved : 6;\r
+    UINT8  MemoryType : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_CHANNEL_ACCESS_TYPE;\r
+\r
 typedef struct {\r
-  UINT8  ChannelNo : 4;\r
-  UINT8  Reserve1 : 4;\r
-  UINT8  Reserve2 : 6;\r
-  UINT8  MemoryType : 2;\r
+  IPMI_GET_CHANNEL_ACCESS_CHANNEL_NUMBER  ChannelNumber;\r
+  IPMI_GET_CHANNEL_ACCESS_TYPE            AccessType;\r
 } IPMI_GET_CHANNEL_ACCESS_REQUEST;\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  AccessMode : 3;\r
+    UINT8  UserLevelAuthEnabled : 1;\r
+    UINT8  MessageAuthEnable : 1;\r
+    UINT8  Alert : 1;\r
+    UINT8  Reserved : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_CHANNEL_ACCESS_CHANNEL_ACCESS;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelPriviledgeLimit : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_CHANNEL_ACCESS_PRIVILEGE_LIMIT;\r
+\r
 typedef struct {\r
-  UINT8  CompletionCode;\r
-  UINT8  AccessMode : 3;\r
-  UINT8  UserLevelAuthEnabled : 1;\r
-  UINT8  MessageAuthEnable : 1;\r
-  UINT8  Alert : 1;\r
-  UINT8  Reserve1 : 2;\r
-  UINT8  ChannelPriviledgeLimit : 4;\r
-  UINT8  Reserve2 : 4;\r
+  UINT8                                    CompletionCode;\r
+  IPMI_GET_CHANNEL_ACCESS_CHANNEL_ACCESS   ChannelAccess;\r
+  IPMI_GET_CHANNEL_ACCESS_PRIVILEGE_LIMIT  PrivilegeLimit;\r
 } IPMI_GET_CHANNEL_ACCESS_RESPONSE;\r
 \r
 //\r
@@ -603,18 +678,46 @@ typedef struct {
 #define IPMI_CHANNEL_MEDIA_TYPE_OEM_START         0x60\r
 #define IPMI_CHANNEL_MEDIA_TYPE_OEM_END           0x7F\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelNo : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_CHANNEL_INFO_CHANNEL_NUMBER;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelMediumType : 7;\r
+    UINT8  Reserved : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_CHANNEL_INFO_MEDIUM_TYPE;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelProtocolType : 5;\r
+    UINT8  Reserved : 3;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_CHANNEL_INFO_PROTOCOL_TYPE;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  ActiveSessionCount : 6;\r
+    UINT8  SessionSupport : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_CHANNEL_INFO_SESSION_SUPPORT;\r
+\r
 typedef struct {\r
   UINT8   CompletionCode;\r
-  UINT8   ChannelNo : 4;\r
-  UINT8   Reserve1 : 4;\r
-  UINT8   ChannelMediumType : 7;\r
-  UINT8   Reserve2 : 1;\r
-  UINT8   ChannelProtocolType : 5;\r
-  UINT8   Reserve3 : 3;\r
-  UINT8   ActiveSessionCount : 6;\r
-  UINT8   SessionSupport : 2;\r
-  UINT8   VendorId[3];\r
-  UINT16  AuxChannelInfo;\r
+  IPMI_CHANNEL_INFO_CHANNEL_NUMBER   ChannelNumber;\r
+  IPMI_CHANNEL_INFO_MEDIUM_TYPE      MediumType;\r
+  IPMI_CHANNEL_INFO_PROTOCOL_TYPE    ProtocolType;\r
+  IPMI_CHANNEL_INFO_SESSION_SUPPORT  SessionSupport;\r
+  UINT8                              VendorId[3];\r
+  UINT16                             AuxChannelInfo;\r
 } IPMI_GET_CHANNEL_INFO_RESPONSE;\r
 \r
 //\r
@@ -643,26 +746,68 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Get User Access" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelNo : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_USER_ACCESS_CHANNEL_NUMBER;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  UserId : 6;\r
+    UINT8  Reserved : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_USER_ID;\r
+\r
 typedef struct {\r
-  UINT8   ChannelNo : 4;\r
-  UINT8   Reserved1 : 4;\r
-  UINT8   UserId : 6;\r
-  UINT8   Reserved2 : 2;\r
+  IPMI_GET_USER_ACCESS_CHANNEL_NUMBER  ChannelNumber;\r
+  IPMI_USER_ID                         UserId;\r
 } IPMI_GET_USER_ACCESS_REQUEST;\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  MaxUserId : 6;\r
+    UINT8  Reserved : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_USER_ACCESS_MAX_USER_ID;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  CurrentUserId : 6;\r
+    UINT8  UserIdEnableStatus : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_USER_ACCESS_CURRENT_USER;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  FixedUserId : 6;\r
+    UINT8  Reserved : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_USER_ACCESS_FIXED_NAME_USER;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  UserPrivilegeLimit : 4;\r
+    UINT8  EnableIpmiMessaging : 1;\r
+    UINT8  EnableUserLinkAuthetication : 1;\r
+    UINT8  UserAccessAvailable : 1;\r
+    UINT8  Reserved : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_USER_ACCESS_CHANNEL_ACCESS;\r
+\r
 typedef struct {\r
-  UINT8   CompletionCode;\r
-  UINT8   MaxUserId : 6;\r
-  UINT8   Reserved1 : 2;\r
-  UINT8   CurrentUserId : 6;\r
-  UINT8   UserIdEnableStatus : 2;\r
-  UINT8   FixedUserId : 6;\r
-  UINT8   Reserved2 : 2;\r
-  UINT8   UserPrivilegeLimit : 4;\r
-  UINT8   EnableIpmiMessaging : 1;\r
-  UINT8   EnableUserLinkAuthetication : 1;\r
-  UINT8   UserAccessAvailable : 1;\r
-  UINT8   Reserved3 : 1;\r
+  UINT8                                 CompletionCode;\r
+  IPMI_GET_USER_ACCESS_MAX_USER_ID      MaxUserId;\r
+  IPMI_GET_USER_ACCESS_CURRENT_USER     CurrentUser;\r
+  IPMI_GET_USER_ACCESS_FIXED_NAME_USER  FixedNameUser;\r
+  IPMI_GET_USER_ACCESS_CHANNEL_ACCESS   ChannelAccess;\r
 } IPMI_GET_USER_ACCESS_RESPONSE;\r
 \r
 //\r
@@ -674,9 +819,8 @@ typedef struct {
 //  Constants and Structure definitions for "Set User Name" command to follow here\r
 //\r
 typedef struct {\r
-  UINT8  UserId : 6;\r
-  UINT8  Reserved : 2;\r
-  UINT8  UserName[16];\r
+  IPMI_USER_ID  UserId;\r
+  UINT8         UserName[16];\r
 } IPMI_SET_USER_NAME_REQUEST;\r
 \r
 //\r
@@ -688,8 +832,7 @@ typedef struct {
 //  Constants and Structure definitions for "Get User Name" command to follow here\r
 //\r
 typedef struct {\r
-  UINT8  UserId : 6;\r
-  UINT8  Reserved : 2;\r
+  IPMI_USER_ID  UserId;\r
 } IPMI_GET_USER_NAME_REQUEST;\r
 \r
 typedef struct {\r
@@ -720,13 +863,27 @@ typedef struct {
 #define IPMI_SET_USER_PASSWORD_PASSWORD_SIZE_16  0x0\r
 #define IPMI_SET_USER_PASSWORD_PASSWORD_SIZE_20  0x1\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  UserId : 6;\r
+    UINT8  Reserved : 1;\r
+    UINT8  PasswordSize : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SET_USER_PASSWORD_USER_ID;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  Operation : 2;\r
+    UINT8  Reserved : 6;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SET_USER_PASSWORD_OPERATION;\r
+\r
 typedef struct {\r
-  UINT8   UserId : 6;\r
-  UINT8   Reserved1 : 1;\r
-  UINT8   PasswordSize : 1;\r
-  UINT8   Operation : 2;\r
-  UINT8   Reserved2 : 6;\r
-  UINT8   PasswordData[0];  // 16 or 20 bytes, depending on the 'PasswordSize' field\r
+  IPMI_SET_USER_PASSWORD_USER_ID    UserId;\r
+  IPMI_SET_USER_PASSWORD_OPERATION  Operation;\r
+  UINT8                             PasswordData[0];  // 16 or 20 bytes, depending on the 'PasswordSize' field\r
 } IPMI_SET_USER_PASSWORD_REQUEST;\r
 \r
 //\r
index b77413f4ceb19dff2c22bdd4b09832bf7e85c208..6e65abe55feb0069fc949ffa90d4cfde4a9c1957 100644 (file)
@@ -72,9 +72,16 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Chassis Control" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  ChassisControl:4;\r
+    UINT8  Reserved:4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_CHASSIS_CONTROL_CHASSIS_CONTROL;\r
+\r
 typedef struct {\r
-  UINT8   ChassisControl:4;\r
-  UINT8   Reserved:4;\r
+  IPMI_CHASSIS_CONTROL_CHASSIS_CONTROL  ChassisControl;\r
 } IPMI_CHASSIS_CONTROL_REQUEST;\r
 \r
 //\r
@@ -112,9 +119,16 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Set Power Restore Policy" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  PowerRestorePolicy : 3;\r
+    UINT8  Reserved : 5;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_POWER_RESTORE_POLICY;\r
+\r
 typedef struct {\r
-  UINT8   PowerRestorePolicy:3;\r
-  UINT8   Reserved:5;\r
+  IPMI_POWER_RESTORE_POLICY  PowerRestorePolicy;\r
 } IPMI_SET_POWER_RESTORE_POLICY_REQUEST;\r
 \r
 typedef struct {\r
@@ -130,26 +144,31 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Get System Restart Cause" command to follow here\r
 //\r
-typedef enum {\r
-  Unknown,\r
-  ChassisControlCommand,\r
-  ResetViaPushButton,\r
-  PowerupViaPowerButton,\r
-  WatchdogExpiration,\r
-  Oem,\r
-  AutoPowerOnAlwaysRestore,\r
-  AutoPowerOnRestorePrevious,\r
-  ResetViaPef,\r
-  PowerCycleViaPef,\r
-  SoftReset,\r
-  PowerUpViaRtc\r
+#define IPMI_SYSTEM_RESTART_CAUSE_UNKNOWN                    0x0\r
+#define IPMI_SYSTEM_RESTART_CAUSE_CHASSIS_CONTROL_COMMAND    0x1\r
+#define IPMI_SYSTEM_RESTART_CAUSE_PUSHBUTTON_RESET           0x2\r
+#define IPMI_SYSTEM_RESTART_CAUSE_PUSHBUTTON_POWERUP         0x3\r
+#define IPMI_SYSTEM_RESTART_CAUSE_WATCHDOG_EXPIRE            0x4\r
+#define IPMI_SYSTEM_RESTART_CAUSE_OEM                        0x5\r
+#define IPMI_SYSTEM_RESTART_CAUSE_AUTO_POWER_ALWAYS_RESTORE  0x6\r
+#define IPMI_SYSTEM_RESTART_CAUSE_AUTO_POWER_RESTORE_PREV    0x7\r
+#define IPMI_SYSTEM_RESTART_CAUSE_PEF_RESET                  0x8\r
+#define IPMI_SYSTEM_RESTART_CAUSE_PEF_POWERCYCLE             0x9\r
+#define IPMI_SYSTEM_RESTART_CAUSE_SOFT_RESET                 0xA\r
+#define IPMI_SYSTEM_RESTART_CAUSE_RTC_POWERUP                0xB\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  Cause:4;\r
+    UINT8  Reserved:4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_SYSTEM_RESTART_CAUSE;\r
 \r
 typedef struct {\r
-  UINT8  CompletionCode;\r
-  UINT8  Cause:4;\r
-  UINT8  Reserved:4;\r
-  UINT8  ChannelNumber;\r
+  UINT8                      CompletionCode;\r
+  IPMI_SYSTEM_RESTART_CAUSE  RestartCause;\r
+  UINT8                      ChannelNumber;\r
 } IPMI_GET_SYSTEM_RESTART_CAUSE_RESPONSE;\r
 \r
 //\r
@@ -160,10 +179,17 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Set System boot options" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  ParameterSelector:7;\r
+    UINT8  MarkParameterInvalid:1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SET_BOOT_OPTIONS_PARAMETER_VALID;\r
+\r
 typedef struct {\r
-  UINT8    ParameterSelector:7;\r
-  UINT8    MarkParameterInvalid:1;\r
-  UINT8    ParameterData[1];\r
+  IPMI_SET_BOOT_OPTIONS_PARAMETER_VALID  ParameterValid;\r
+  UINT8                                  ParameterData[0];\r
 } IPMI_SET_BOOT_OPTIONS_REQUEST;\r
 \r
 //\r
@@ -174,11 +200,18 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Get System boot options" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  ParameterSelector:7;\r
+    UINT8  Reserved:1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_BOOT_OPTIONS_PARAMETER_SELECTOR;\r
+\r
 typedef struct {\r
-  UINT8    ParameterSelector:7;\r
-  UINT8    Reserved:1;\r
-  UINT8    SetSelector;\r
-  UINT8    BlockSelector;\r
+  IPMI_GET_BOOT_OPTIONS_PARAMETER_SELECTOR  ParameterSelector;\r
+  UINT8                                     SetSelector;\r
+  UINT8                                     BlockSelector;\r
 } IPMI_GET_BOOT_OPTIONS_REQUEST;\r
 \r
 typedef struct {\r
@@ -217,24 +250,33 @@ typedef struct {
 //\r
 // Response Parameters for IPMI Get Boot Options\r
 //\r
-typedef struct {\r
-  UINT8   SetInProgress: 2;\r
-  UINT8   Reserved: 6;\r
+typedef union {\r
+  struct {\r
+    UINT8  SetInProgress : 2;\r
+    UINT8  Reserved : 6;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_0;\r
 \r
 typedef struct {\r
   UINT8   ServicePartitionSelector;\r
 } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1;\r
 \r
-typedef struct {\r
-  UINT8   ServicePartitionDiscovered:1;\r
-  UINT8   ServicePartitionScanRequest:1;\r
-  UINT8   Reserved: 6;\r
+typedef union {\r
+  struct {\r
+    UINT8  ServicePartitionDiscovered : 1;\r
+    UINT8  ServicePartitionScanRequest : 1;\r
+    UINT8  Reserved: 6;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2;\r
 \r
-typedef struct {\r
-  UINT8   BmcBootFlagValid: 5;\r
-  UINT8   Reserved: 3;\r
+typedef union {\r
+  struct {\r
+    UINT8  BmcBootFlagValid : 5;\r
+    UINT8  Reserved : 3;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_3;\r
 \r
 typedef struct {\r
@@ -267,49 +309,76 @@ typedef struct {
 #define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_BMC         0x01\r
 #define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_SYSTEM      0x02\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  Reserved:5;\r
+    UINT8  BiosBootType:1;\r
+    UINT8  PersistentOptions:1;\r
+    UINT8  BootFlagValid:1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_1;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  LockReset:1;\r
+    UINT8  ScreenBlank:1;\r
+    UINT8  BootDeviceSelector:4;\r
+    UINT8  LockKeyboard:1;\r
+    UINT8  CmosClear:1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_2;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  ConsoleRedirection:2;\r
+    UINT8  LockSleep:1;\r
+    UINT8  UserPasswordBypass:1;\r
+    UINT8  ForceProgressEventTrap:1;\r
+    UINT8  BiosVerbosity:2;\r
+    UINT8  LockPower:1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_3;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  BiosMuxControlOverride:3;\r
+    UINT8  BiosSharedModeOverride:1;\r
+    UINT8  Reserved:4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_4;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  DeviceInstanceSelector:5;\r
+    UINT8  Reserved:3;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_5;\r
+\r
 typedef struct {\r
-  //\r
-  // Data 1\r
-  //\r
-  UINT8   Reserved0:5;\r
-  UINT8   BiosBootType:1;\r
-  UINT8   PersistentOptions:1;\r
-  UINT8   BootFlagValid:1;\r
-  //\r
-  // Data 2\r
-  //\r
-  UINT8   LockReset:1;\r
-  UINT8   ScreenBlank:1;\r
-  UINT8   BootDeviceSelector:4;\r
-  UINT8   LockKeyboard:1;\r
-  UINT8   CmosClear:1;\r
-  //\r
-  // Data 3\r
-  //\r
-  UINT8   ConsoleRedirection:2;\r
-  UINT8   LockSleep:1;\r
-  UINT8   UserPasswordBypass:1;\r
-  UINT8   ForceProgressEventTrap:1;\r
-  UINT8   BiosVerbosity:2;\r
-  UINT8   LockPower:1;\r
-  //\r
-  // Data 4\r
-  //\r
-  UINT8   BiosMuxControlOverride:3;\r
-  UINT8   BiosSharedModeOverride:1;\r
-  UINT8   Reserved1:4;\r
-  //\r
-  // Data 5\r
-  //\r
-  UINT8   DeviceInstanceSelector:5;\r
-  UINT8   Reserved2:3;\r
+  IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_1  Data1;\r
+  IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_2  Data2;\r
+  IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_3  Data3;\r
+  IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_4  Data4;\r
+  IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_5  Data5;\r
 } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5;\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelNumber:4;\r
+    UINT8  Reserved:4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_BOOT_OPTIONS_CHANNEL_NUMBER;\r
+\r
 typedef struct {\r
-  UINT8   ChannelNumber:4;\r
-  UINT8   Reserved:4;\r
-  UINT8   SessionId[4];\r
-  UINT8   BootInfoTimeStamp[4];\r
+  IPMI_BOOT_OPTIONS_CHANNEL_NUMBER  ChannelNumber;\r
+  UINT8                             SessionId[4];\r
+  UINT8                             BootInfoTimeStamp[4];\r
 } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_6;\r
 \r
 typedef struct {\r
@@ -328,13 +397,27 @@ typedef union {
   IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7   Parm7;\r
 } IPMI_BOOT_OPTIONS_PARAMETERS;\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  ParameterVersion:4;\r
+    UINT8  Reserved:4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  ParameterSelector:7;\r
+    UINT8  ParameterValid:1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID;\r
+\r
 typedef struct {\r
-  UINT8    CompletionCode;\r
-  UINT8    ParameterVersion:4;\r
-  UINT8    Reserved:4;\r
-  UINT8    ParameterSelector:7;\r
-  UINT8    ParameterValid:1;\r
-  UINT8    ParameterData[1];\r
+  UINT8                                    CompletionCode;\r
+  IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION  ParameterVersion;\r
+  IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID    ParameterValid;\r
+  UINT8                                    ParameterData[0];\r
 } IPMI_GET_BOOT_OPTIONS_RESPONSE;\r
 \r
 //\r
@@ -342,17 +425,23 @@ typedef struct {
 //\r
 #define IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES 0x0A\r
 \r
-typedef struct {\r
-  UINT8    DisablePoweroffButton:1;\r
-  UINT8    DisableResetButton:1;\r
-  UINT8    DisableDiagnosticInterruptButton:1;\r
-  UINT8    DisableStandbyButton:1;\r
-  UINT8    Reserved:4;\r
-} IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES_REQUEST;\r
-\r
 //\r
 //  Constants and Structure definitions for "Set front panel button enables" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  DisablePoweroffButton:1;\r
+    UINT8  DisableResetButton:1;\r
+    UINT8  DisableDiagnosticInterruptButton:1;\r
+    UINT8  DisableStandbyButton:1;\r
+    UINT8  Reserved:4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_FRONT_PANEL_BUTTON_ENABLES;\r
+\r
+typedef struct {\r
+  IPMI_FRONT_PANEL_BUTTON_ENABLES  FrontPanelButtonEnables;\r
+} IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES_REQUEST;\r
 \r
 //\r
 //  Definitions for Set Power Cycle Interval command\r
index fe5ed38179a9fa59e7d75e4c497d4b02591ee8e0..548339286f187b3732878719adbbab6261fd56c5 100644 (file)
@@ -121,20 +121,27 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Get SDR Repository Info" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  SdrRepAllocInfoCmd : 1;\r
+    UINT8  SdrRepReserveCmd : 1;\r
+    UINT8  PartialAddSdrCmd : 1;\r
+    UINT8  DeleteSdrRepCmd : 1;\r
+    UINT8  Reserved : 1;\r
+    UINT8  SdrRepUpdateOp : 2;\r
+    UINT8  Overflow : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SDR_OPERATION_SUPPORT;\r
+\r
 typedef struct {\r
-  UINT8   CompletionCode;\r
-  UINT8   Version;\r
-  UINT16  RecordCount;\r
-  UINT16  FreeSpace;\r
-  UINT32  RecentAdditionTimeStamp;\r
-  UINT32  RecentEraseTimeStamp;\r
-  UINT8   SdrRepAllocInfoCmd : 1;\r
-  UINT8   SdrRepReserveCmd : 1;\r
-  UINT8   PartialAddSdrCmd : 1;\r
-  UINT8   DeleteSdrRepCmd : 1;\r
-  UINT8   Reserved : 1;\r
-  UINT8   SdrRepUpdateOp : 2;\r
-  UINT8   Overflow : 1;\r
+  UINT8                       CompletionCode;\r
+  UINT8                       Version;\r
+  UINT16                      RecordCount;\r
+  UINT16                      FreeSpace;\r
+  UINT32                      RecentAdditionTimeStamp;\r
+  UINT32                      RecentEraseTimeStamp;\r
+  IPMI_SDR_OPERATION_SUPPORT  OperationSupport;\r
 } IPMI_GET_SDR_REPOSITORY_INFO_RESPONSE;\r
 \r
 //\r
@@ -167,125 +174,179 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Get SDR" command to follow here\r
 //\r
+typedef union {\r
+  struct {\r
+    UINT8  EventScanningEnabled : 1;\r
+    UINT8  EventScanningDisabled : 1;\r
+    UINT8  InitSensorType : 1;\r
+    UINT8  InitHysteresis : 1;\r
+    UINT8  InitThresholds : 1;\r
+    UINT8  InitEvent : 1;\r
+    UINT8  InitScanning : 1;\r
+    UINT8  SettableSensor : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SDR_RECORD_SENSOR_INIT;\r
 \r
-typedef struct {\r
-  UINT16  RecordId;                     // 1\r
-  UINT8   Version;                      // 3\r
-  UINT8   RecordType;                   // 4\r
-  UINT8   RecordLength;                 // 5\r
-  UINT8   OwnerId;                      // 6\r
-  UINT8   OwnerLun;                     // 7\r
-  UINT8   SensorNumber;                 // 8\r
-  UINT8   EntityId;                     // 9\r
-  UINT8   EntityInstance;               // 10\r
-  UINT8   EventScanningEnabled : 1;     // 11\r
-  UINT8   EventScanningDisabled : 1;    // 11\r
-  UINT8   InitSensorType : 1;           // 11\r
-  UINT8   InitHysteresis : 1;           // 11\r
-  UINT8   InitThresholds : 1;           // 11\r
-  UINT8   InitEvent : 1;                // 11\r
-  UINT8   InitScanning : 1;             // 11\r
-  UINT8   Reserved : 1;                 // 11\r
-  UINT8   EventMessageControl : 2;      // 12\r
-  UINT8   ThresholdAccessSupport : 2;   // 12\r
-  UINT8   HysteresisSupport : 2;        // 12\r
-  UINT8   ReArmSupport : 1;             // 12\r
-  UINT8   IgnoreSensor : 1;             // 12\r
-  UINT8   SensorType;                   // 13\r
-  UINT8   EventType;                    // 14\r
-  UINT8   Reserved1[7];                 // 15\r
-  UINT8   UnitType;                     // 22\r
-  UINT8   Reserved2;                    // 23\r
-  UINT8   Linearization : 7;            // 24\r
-  UINT8   Reserved3 : 1;                // 24\r
-  UINT8   MLo;                          // 25\r
-  UINT8   Toleremce : 6;                // 26\r
-  UINT8   MHi : 2;                      // 26\r
-  UINT8   BLo;                          // 27\r
-  UINT8   AccuracyLow : 6;              // 28\r
-  UINT8   BHi : 2;                      // 28\r
-  UINT8   Reserved4 : 2;                // 29\r
-  UINT8   AccuracyExp : 2;              // 29\r
-  UINT8   AccuracyHi : 4;               // 29\r
-  UINT8   BExp : 4;                     // 30\r
-  UINT8   RExp : 4;                     // 30\r
-  UINT8   NominalReadingSpscified : 1;  // 31\r
-  UINT8   NominalMaxSpscified : 1;      // 31\r
-  UINT8   NominalMinSpscified : 1;      // 31\r
-  UINT8   Reserved5 : 5;                // 31\r
-  UINT8   NominalReading;               // 32\r
-  UINT8   Reserved6[4];                 // 33\r
-  UINT8   UpperNonRecoverThreshold;     // 37\r
-  UINT8   UpperCriticalThreshold;       // 38\r
-  UINT8   UpperNonCriticalThreshold;    // 39\r
-  UINT8   LowerNonRecoverThreshold;     // 40\r
-  UINT8   LowerCriticalThreshold;       // 41\r
-  UINT8   LowerNonCriticalThreshold;    // 42\r
-  UINT8   Reserved7[5];                 // 43\r
-  UINT8   IdStringLength;               // 48\r
-  UINT8   AsciiIdString[16];            // 49 - 64\r
+typedef union {\r
+  struct {\r
+    UINT8  EventMessageControl : 2;\r
+    UINT8  ThresholdAccessSupport : 2;\r
+    UINT8  HysteresisSupport : 2;\r
+    UINT8  ReArmSupport : 1;\r
+    UINT8  IgnoreSensor : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SDR_RECORD_SENSOR_CAP;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  Linearization : 7;\r
+    UINT8  Reserved : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SDR_RECORD_LINEARIZATION;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  Toleremce : 6;\r
+    UINT8  MHi : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SDR_RECORD_M_TOLERANCE;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  AccuracyLow : 6;\r
+    UINT8  BHi : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SDR_RECORD_B_ACCURACY;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  Reserved : 2;\r
+    UINT8  AccuracyExp : 2;\r
+    UINT8  AccuracyHi : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SDR_RECORD_ACCURACY_SENSOR_DIR;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  BExp : 4;\r
+    UINT8  RExp : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SDR_RECORD_R_EXP_B_EXP;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  NominalReadingSpscified : 1;\r
+    UINT8  NominalMaxSpscified : 1;\r
+    UINT8  NominalMinSpscified : 1;\r
+    UINT8  Reserved : 5;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SDR_RECORD_ANALOG_FLAGS;\r
+\r
+typedef struct {\r
+  UINT16                         RecordId;                   // 1\r
+  UINT8                          Version;                    // 3\r
+  UINT8                          RecordType;                 // 4\r
+  UINT8                          RecordLength;               // 5\r
+  UINT8                          OwnerId;                    // 6\r
+  UINT8                          OwnerLun;                   // 7\r
+  UINT8                          SensorNumber;               // 8\r
+  UINT8                          EntityId;                   // 9\r
+  UINT8                          EntityInstance;             // 10\r
+  IPMI_SDR_RECORD_SENSOR_INIT    SensorInitialization;       // 11\r
+  IPMI_SDR_RECORD_SENSOR_CAP     SensorCapabilities;         // 12\r
+  UINT8                          SensorType;                 // 13\r
+  UINT8                          EventType;                  // 14\r
+  UINT8                          Reserved1[7];               // 15\r
+  UINT8                          UnitType;                   // 22\r
+  UINT8                          Reserved2;                  // 23\r
+  IPMI_SDR_RECORD_LINEARIZATION  Linearization;              // 24\r
+  UINT8                          MLo;                        // 25\r
+  IPMI_SDR_RECORD_M_TOLERANCE    MHiTolerance;               // 26\r
+  UINT8                          BLo;                        // 27\r
+  IPMI_SDR_RECORD_B_ACCURACY     BHiAccuracyLo;              // 28\r
+  IPMI_SDR_RECORD_ACCURACY_SENSOR_DIR  AccuracySensorDirection;  // 29\r
+  IPMI_SDR_RECORD_R_EXP_B_EXP    RExpBExp;                   // 30\r
+  IPMI_SDR_RECORD_ANALOG_FLAGS   AnalogFlags;                // 31\r
+  UINT8                          NominalReading;             // 32\r
+  UINT8                          Reserved3[4];               // 33\r
+  UINT8                          UpperNonRecoverThreshold;   // 37\r
+  UINT8                          UpperCriticalThreshold;     // 38\r
+  UINT8                          UpperNonCriticalThreshold;  // 39\r
+  UINT8                          LowerNonRecoverThreshold;   // 40\r
+  UINT8                          LowerCriticalThreshold;     // 41\r
+  UINT8                          LowerNonCriticalThreshold;  // 42\r
+  UINT8                          Reserved4[5];               // 43\r
+  UINT8                          IdStringLength;             // 48\r
+  UINT8                          AsciiIdString[16];          // 49 - 64\r
 } IPMI_SDR_RECORD_STRUCT_1;\r
 \r
 typedef struct {\r
-  UINT16  RecordId;                     // 1\r
-  UINT8   Version;                      // 3\r
-  UINT8   RecordType;                   // 4\r
-  UINT8   RecordLength;                 // 5\r
-  UINT8   OwnerId;                      // 6\r
-  UINT8   OwnerLun;                     // 7\r
-  UINT8   SensorNumber;                 // 8\r
-  UINT8   EntityId;                     // 9\r
-  UINT8   EntityInstance;               // 10\r
-  UINT8   SensorScanning : 1;           // 11\r
-  UINT8   EventScanning : 1;            // 11\r
-  UINT8   InitSensorType : 1;           // 11\r
-  UINT8   InitHysteresis : 1;           // 11\r
-  UINT8   InitThresholds : 1;           // 11\r
-  UINT8   InitEvent : 1;                // 11\r
-  UINT8   InitScanning : 1;             // 11\r
-  UINT8   Reserved : 1;                 // 11\r
-  UINT8   EventMessageControl : 2;      // 12\r
-  UINT8   ThresholdAccessSupport : 2;   // 12\r
-  UINT8   HysteresisSupport : 2;        // 12\r
-  UINT8   ReArmSupport : 1;             // 12\r
-  UINT8   IgnoreSensor : 1;             // 12\r
-  UINT8   SensorType;                   // 13\r
-  UINT8   EventType;                    // 14\r
-  UINT8   Reserved1[7];                 // 15\r
-  UINT8   UnitType;                     // 22\r
-  UINT8   Reserved2[9];                 // 23\r
-  UINT8   IdStringLength;               // 32\r
-  UINT8   AsciiIdString[16];            // 33 - 48\r
+  UINT16                       RecordId;              // 1\r
+  UINT8                        Version;               // 3\r
+  UINT8                        RecordType;            // 4\r
+  UINT8                        RecordLength;          // 5\r
+  UINT8                        OwnerId;               // 6\r
+  UINT8                        OwnerLun;              // 7\r
+  UINT8                        SensorNumber;          // 8\r
+  UINT8                        EntityId;              // 9\r
+  UINT8                        EntityInstance;        // 10\r
+  IPMI_SDR_RECORD_SENSOR_INIT  SensorInitialization;  // 11\r
+  IPMI_SDR_RECORD_SENSOR_CAP   SensorCapabilities;    // 12\r
+  UINT8                        SensorType;            // 13\r
+  UINT8                        EventType;             // 14\r
+  UINT8                        Reserved1[7];          // 15\r
+  UINT8                        UnitType;              // 22\r
+  UINT8                        Reserved2[9];          // 23\r
+  UINT8                        IdStringLength;        // 32\r
+  UINT8                        AsciiIdString[16];     // 33 - 48\r
 } IPMI_SDR_RECORD_STRUCT_2;\r
 \r
-typedef struct {\r
-  UINT8 Reserved1 : 1;\r
-  UINT8 ControllerSlaveAddress : 7;\r
-  UINT8 FruDeviceId;\r
-  UINT8 BusId : 3;\r
-  UINT8 Lun : 2;\r
-  UINT8 Reserved : 2;\r
-  UINT8 LogicalFruDevice : 1;\r
-  UINT8 Reserved3 : 4;\r
-  UINT8 ChannelNumber : 4;\r
+typedef union {\r
+  struct {\r
+    UINT8  Reserved1 : 1;\r
+    UINT8  ControllerSlaveAddress : 7;\r
+    UINT8  FruDeviceId;\r
+    UINT8  BusId : 3;\r
+    UINT8  Lun : 2;\r
+    UINT8  Reserved2 : 2;\r
+    UINT8  LogicalFruDevice : 1;\r
+    UINT8  Reserved3 : 4;\r
+    UINT8  ChannelNumber : 4;\r
+  } Bits;\r
+  UINT32  Uint32;\r
 } IPMI_FRU_DATA_INFO;\r
 \r
-typedef struct {\r
-  UINT16            RecordId;           // 1\r
-  UINT8             Version;            // 3\r
-  UINT8             RecordType;         // 4\r
-  UINT8             RecordLength;       // 5\r
-  IPMI_FRU_DATA_INFO FruDeviceData;      // 6\r
-  UINT8             Reserved1;          // 10\r
-  UINT8             DeviceType;         // 11\r
-  UINT8             DeviceTypeModifier; // 12\r
-  UINT8             FruEntityId;        // 13\r
-  UINT8             FruEntityInstance;  // 14\r
-  UINT8             OemReserved;        // 15\r
-  UINT8             Length : 4;         // 16\r
-  UINT8             Reserved2 : 1;      // 16\r
-  UINT8             StringType : 3;     // 16\r
-  UINT8             String[16];         // 17\r
+typedef union {\r
+  struct {\r
+    UINT8  Length : 4;\r
+    UINT8  Reserved : 1;\r
+    UINT8  StringType : 3;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SDR_RECORD_DEV_ID_STR_TYPE_LENGTH;\r
+\r
+typedef struct {\r
+  UINT16                                  RecordId;            // 1\r
+  UINT8                                   Version;             // 3\r
+  UINT8                                   RecordType;          // 4\r
+  UINT8                                   RecordLength;        // 5\r
+  IPMI_FRU_DATA_INFO                      FruDeviceData;       // 6\r
+  UINT8                                   Reserved;            // 10\r
+  UINT8                                   DeviceType;          // 11\r
+  UINT8                                   DeviceTypeModifier;  // 12\r
+  UINT8                                   FruEntityId;         // 13\r
+  UINT8                                   FruEntityInstance;   // 14\r
+  UINT8                                   OemReserved;         // 15\r
+  IPMI_SDR_RECORD_DEV_ID_STR_TYPE_LENGTH  StringTypeLength;    // 16\r
+  UINT8                                   String[16];          // 17\r
 } IPMI_SDR_RECORD_STRUCT_11;\r
 \r
 typedef struct {\r
index 28ede2f63a5a93e27486b3e788d18fbf72be76c3..4b381f07e13b47aed824bd4d2f1472db13fb94fb 100644 (file)
@@ -109,23 +109,29 @@ typedef enum {
   IpmiOem2\r
 } IPMI_LAN_DEST_TYPE_DEST_TYPE;\r
 \r
-typedef struct {\r
-  UINT8 NoAuth : 1;\r
-  UINT8 MD2Auth : 1;\r
-  UINT8 MD5Auth : 1;\r
-  UINT8 Reserved1 : 1;\r
-  UINT8 StraightPswd : 1;\r
-  UINT8 OemType : 1;\r
-  UINT8 Reserved2 : 2;\r
+typedef union {\r
+  struct {\r
+    UINT8  NoAuth : 1;\r
+    UINT8  MD2Auth : 1;\r
+    UINT8  MD5Auth : 1;\r
+    UINT8  Reserved1 : 1;\r
+    UINT8  StraightPswd : 1;\r
+    UINT8  OemType : 1;\r
+    UINT8  Reserved2 : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_LAN_AUTH_TYPE;\r
 \r
 typedef struct {\r
   UINT8 IpAddress[4];\r
 } IPMI_LAN_IP_ADDRESS;\r
 \r
-typedef struct {\r
-  UINT8 AddressSrc : 4;\r
-  UINT8 Reserved : 4;\r
+typedef union {\r
+  struct {\r
+    UINT8  AddressSrc : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_LAN_IP_ADDRESS_SRC;\r
 \r
 typedef struct {\r
@@ -136,13 +142,27 @@ typedef struct {
   UINT8 IpAddress[4];\r
 } IPMI_LAN_SUBNET_MASK;\r
 \r
-typedef struct {\r
-  UINT8 TimeToLive;\r
-  UINT8 IpFlag : 3;\r
-  UINT8 Reserved1 : 5;\r
-  UINT8 Precedence : 3;\r
-  UINT8 Reserved2 : 1;\r
-  UINT8 ServiceType : 4;\r
+typedef union {\r
+  struct {\r
+    UINT8  IpFlag : 3;\r
+    UINT8  Reserved : 5;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_LAN_IPV4_HDR_PARAM_DATA_2;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  Precedence : 3;\r
+    UINT8  Reserved : 1;\r
+    UINT8  ServiceType : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_LAN_IPV4_HDR_PARAM_DATA_3;\r
+\r
+typedef struct {\r
+  UINT8                           TimeToLive;\r
+  IPMI_LAN_IPV4_HDR_PARAM_DATA_2  Data2;\r
+  IPMI_LAN_IPV4_HDR_PARAM_DATA_3  Data3;\r
 } IPMI_LAN_IPV4_HDR_PARAM;\r
 \r
 typedef struct {\r
@@ -150,10 +170,13 @@ typedef struct {
   UINT8 RcmpPortLsb;\r
 } IPMI_LAN_RCMP_PORT;\r
 \r
-typedef struct {\r
-  UINT8 EnableBmcArpResponse : 1;\r
-  UINT8 EnableBmcGratuitousArp : 1;\r
-  UINT8 Reserved : 6;\r
+typedef union {\r
+  struct {\r
+    UINT8  EnableBmcArpResponse : 1;\r
+    UINT8  EnableBmcGratuitousArp : 1;\r
+    UINT8  Reserved : 6;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_LAN_BMC_GENERATED_ARP_CONTROL;\r
 \r
 typedef struct {\r
@@ -164,23 +187,50 @@ typedef struct {
   UINT8 Data[18];\r
 } IPMI_LAN_COMMUNITY_STRING;\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  DestinationSelector : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_LAN_SET_SELECTOR;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  DestinationType : 3;\r
+    UINT8  Reserved : 4;\r
+    UINT8  AlertAcknowledged : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_LAN_DEST_TYPE_DESTINATION_TYPE;\r
+\r
 typedef struct {\r
-  UINT8 DestinationSelector : 4;\r
-  UINT8 Reserved2 : 4;\r
-  UINT8 DestinationType : 3;\r
-  UINT8 Reserved1 : 4;\r
-  UINT8 AlertAcknowledged : 1;\r
+  IPMI_LAN_SET_SELECTOR                SetSelector;\r
+  IPMI_LAN_DEST_TYPE_DESTINATION_TYPE  DestinationType;\r
 } IPMI_LAN_DEST_TYPE;\r
 \r
-typedef struct {\r
-  UINT8               DestinationSelector : 4;\r
-  UINT8               Reserved1 : 4;\r
-  UINT8               AlertingIpAddressSelector : 4;\r
-  UINT8               AddressFormat : 4;\r
-  UINT8               UseDefaultGateway : 1;\r
-  UINT8               Reserved2 : 7;\r
-  IPMI_LAN_IP_ADDRESS  AlertingIpAddress;\r
-  IPMI_LAN_MAC_ADDRESS AlertingMacAddress;\r
+typedef union {\r
+  struct {\r
+    UINT8  AlertingIpAddressSelector : 4;\r
+    UINT8  AddressFormat : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_LAN_ADDRESS_FORMAT;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  UseDefaultGateway : 1;\r
+    UINT8  Reserved2 : 7;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_LAN_GATEWAY_SELECTOR;\r
+\r
+typedef struct {\r
+  IPMI_LAN_SET_SELECTOR      SetSelector;\r
+  IPMI_LAN_ADDRESS_FORMAT    AddressFormat;\r
+  IPMI_LAN_GATEWAY_SELECTOR  GatewaySelector;\r
+  IPMI_LAN_IP_ADDRESS        AlertingIpAddress;\r
+  IPMI_LAN_MAC_ADDRESS       AlertingMacAddress;\r
 } IPMI_LAN_DEST_ADDRESS;\r
 \r
 typedef union {\r
@@ -198,30 +248,46 @@ typedef union {
   IPMI_LAN_DEST_ADDRESS              IpmiLanDestAddress;\r
 } IPMI_LAN_OPTIONS;\r
 \r
-typedef struct {\r
-  UINT8  SetSelector;\r
-  UINT8  AddressSourceType : 4;\r
-  UINT8  Reserved : 3;\r
-  UINT8  EnableStatus : 1;\r
-  UINT8  Ipv6Address[16];\r
-  UINT8  AddressPrefixLen;\r
-  UINT8  AddressStatus;\r
+typedef union {\r
+  struct {\r
+    UINT8  AddressSourceType : 4;\r
+    UINT8  Reserved : 3;\r
+    UINT8  EnableStatus : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_LAN_IPV6_ADDRESS_SOURCE_TYPE;\r
+\r
+typedef struct {\r
+  UINT8                              SetSelector;\r
+  IPMI_LAN_IPV6_ADDRESS_SOURCE_TYPE  AddressSourceType;\r
+  UINT8                              Ipv6Address[16];\r
+  UINT8                              AddressPrefixLen;\r
+  UINT8                              AddressStatus;\r
 } IPMI_LAN_IPV6_STATIC_ADDRESS;\r
 \r
 //\r
 //  Set in progress parameter\r
 //\r
-typedef struct {\r
-  UINT8  SetInProgress:2;\r
-  UINT8  Reserved:6;\r
+typedef union {\r
+  struct {\r
+    UINT8  SetInProgress:2;\r
+    UINT8  Reserved:6;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_LAN_SET_IN_PROGRESS;\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelNo : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SET_LAN_CONFIG_CHANNEL_NUM;\r
 \r
 typedef struct {\r
-  UINT8  ChannelNo : 4;\r
-  UINT8  Reserved : 4;\r
-  UINT8  ParameterSelector;\r
-  UINT8  ParameterData[0];\r
+  IPMI_SET_LAN_CONFIG_CHANNEL_NUM  ChannelNumber;\r
+  UINT8                            ParameterSelector;\r
+  UINT8                            ParameterData[0];\r
 } IPMI_SET_LAN_CONFIGURATION_PARAMETERS_COMMAND_REQUEST;\r
 \r
 //\r
@@ -232,13 +298,20 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Get Lan Configuration Parameters" command to follow here\r
 //\r
-typedef struct {\r
-  UINT8  ChannelNo : 4;\r
-  UINT8  Reserved : 3;\r
-  UINT8  GetParameter : 1;\r
-  UINT8  ParameterSelector;\r
-  UINT8  SetSelector;\r
-  UINT8  BlockSelector;\r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelNo : 4;\r
+    UINT8  Reserved : 3;\r
+    UINT8  GetParameter : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_LAN_CONFIG_CHANNEL_NUM;\r
+\r
+typedef struct {\r
+  IPMI_GET_LAN_CONFIG_CHANNEL_NUM  ChannelNumber;\r
+  UINT8                            ParameterSelector;\r
+  UINT8                            SetSelector;\r
+  UINT8                            BlockSelector;\r
 } IPMI_GET_LAN_CONFIGURATION_PARAMETERS_REQUEST;\r
 \r
 typedef struct {\r
@@ -281,67 +354,100 @@ typedef struct {
 //\r
 // EMP OPTION DATA\r
 //\r
-typedef struct {\r
-  UINT8 NoAuthentication : 1;\r
-  UINT8 MD2Authentication : 1;\r
-  UINT8 MD5Authentication : 1;\r
-  UINT8 Reserved1 : 1;\r
-  UINT8 StraightPassword : 1;\r
-  UINT8 OemProprietary : 1;\r
-  UINT8 Reservd2 : 2;\r
+typedef union {\r
+  struct {\r
+    UINT8  NoAuthentication : 1;\r
+    UINT8  MD2Authentication : 1;\r
+    UINT8  MD5Authentication : 1;\r
+    UINT8  Reserved1 : 1;\r
+    UINT8  StraightPassword : 1;\r
+    UINT8  OemProprietary : 1;\r
+    UINT8  Reservd2 : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_EMP_AUTH_TYPE;\r
 \r
-typedef struct {\r
-  UINT8 EnableBasicMode : 1;\r
-  UINT8 EnablePPPMode : 1;\r
-  UINT8 EnableTerminalMode : 1;\r
-  UINT8 Reserved1 : 2;\r
-  UINT8 SnoopOsPPPNegotiation : 1;\r
-  UINT8 Reserved2 : 1;\r
-  UINT8 DirectConnect : 1;\r
+typedef union {\r
+  struct {\r
+    UINT8  EnableBasicMode : 1;\r
+    UINT8  EnablePPPMode : 1;\r
+    UINT8  EnableTerminalMode : 1;\r
+    UINT8  Reserved1 : 2;\r
+    UINT8  SnoopOsPPPNegotiation : 1;\r
+    UINT8  Reserved2 : 1;\r
+    UINT8  DirectConnect : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_EMP_CONNECTION_TYPE;\r
 \r
-typedef struct {\r
-  UINT8 InactivityTimeout : 4;\r
-  UINT8 Reserved : 4;\r
+typedef union {\r
+  struct {\r
+    UINT8  InactivityTimeout : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_EMP_INACTIVITY_TIMEOUT;\r
 \r
-typedef struct {\r
-  UINT8 IpmiCallback : 1;\r
-  UINT8 CBCPCallback : 1;\r
-  UINT8 Reserved1 : 6;\r
-  UINT8 CbcpEnableNoCallback : 1;\r
-  UINT8 CbcpEnablePreSpecifiedNumber : 1;\r
-  UINT8 CbcpEnableUserSpecifiedNumber : 1;\r
-  UINT8 CbcpEnableCallbackFromList : 1;\r
-  UINT8 Reserved : 4;\r
-  UINT8 CallbackDestination1;\r
-  UINT8 CallbackDestination2;\r
-  UINT8 CallbackDestination3;\r
+typedef union {\r
+  struct {\r
+    UINT8  IpmiCallback : 1;\r
+    UINT8  CBCPCallback : 1;\r
+    UINT8  Reserved : 6;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_CHANNEL_CALLBACK_CONTROL_ENABLE;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  CbcpEnableNoCallback : 1;\r
+    UINT8  CbcpEnablePreSpecifiedNumber : 1;\r
+    UINT8  CbcpEnableUserSpecifiedNumber : 1;\r
+    UINT8  CbcpEnableCallbackFromList : 1;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_CHANNEL_CALLBACK_CONTROL_CBCP;\r
+\r
+typedef struct {\r
+  IPMI_CHANNEL_CALLBACK_CONTROL_ENABLE  CallbackEnable;\r
+  IPMI_CHANNEL_CALLBACK_CONTROL_CBCP    CBCPNegotiation;\r
+  UINT8                                 CallbackDestination1;\r
+  UINT8                                 CallbackDestination2;\r
+  UINT8                                 CallbackDestination3;\r
 } IPMI_EMP_CHANNEL_CALLBACK_CONTROL;\r
 \r
-typedef struct {\r
-  UINT8 CloseSessionOnDCDLoss : 1;\r
-  UINT8 EnableSessionInactivityTimeout : 1;\r
-  UINT8 Reserved : 6;\r
+typedef union {\r
+  struct {\r
+    UINT8  CloseSessionOnDCDLoss : 1;\r
+    UINT8  EnableSessionInactivityTimeout : 1;\r
+    UINT8  Reserved : 6;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_EMP_SESSION_TERMINATION;\r
 \r
-typedef struct {\r
-  UINT8 Reserved1 : 5;\r
-  UINT8 EnableDtrHangup : 1;\r
-  UINT8 FlowControl : 2;\r
-  UINT8 BitRate : 4;\r
-  UINT8 Reserved2 : 4;\r
-  UINT8 SaveSetting : 1;\r
-  UINT8 SetComPort : 1;\r
-  UINT8 Reserved3 : 6;\r
+typedef union {\r
+  struct {\r
+    UINT8  Reserved1 : 5;\r
+    UINT8  EnableDtrHangup : 1;\r
+    UINT8  FlowControl : 2;\r
+    UINT8  BitRate : 4;\r
+    UINT8  Reserved2 : 4;\r
+    UINT8  SaveSetting : 1;\r
+    UINT8  SetComPort : 1;\r
+    UINT8  Reserved3 : 6;\r
+  } Bits;\r
+  UINT8   Uint8;\r
+  UINT16  Uint16;\r
 } IPMI_EMP_MESSAGING_COM_SETTING;\r
 \r
-typedef struct {\r
-  UINT8 RingDurationInterval : 6;\r
-  UINT8 Reserved1 : 2;\r
-  UINT8 RingDeadTime : 4;\r
-  UINT8 Reserved : 4;\r
+typedef union {\r
+  struct {\r
+    UINT8  RingDurationInterval : 6;\r
+    UINT8  Reserved1 : 2;\r
+    UINT8  RingDeadTime : 4;\r
+    UINT8  Reserved2 : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_EMP_MODEM_RING_TIME;\r
 \r
 typedef struct {\r
@@ -369,14 +475,20 @@ typedef struct {
   UINT8 CommunityString[18];\r
 } IPMI_EMP_COMMUNITY_STRING;\r
 \r
-typedef struct {\r
-  UINT8 Reserved5 : 4;\r
-  UINT8 DialStringSelector : 4;\r
+typedef union {\r
+  struct {\r
+    UINT8  Reserved : 4;\r
+    UINT8  DialStringSelector : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_DIAL_PAGE_DESTINATION;\r
 \r
-typedef struct {\r
-  UINT8 TapAccountSelector : 4;\r
-  UINT8 Reserved : 4;\r
+typedef union {\r
+  struct {\r
+    UINT8  TapAccountSelector : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
 } IPMI_TAP_PAGE_DESTINATION;\r
 \r
 typedef struct {\r
@@ -390,40 +502,78 @@ typedef union {
   IPMI_PPP_ALERT_DESTINATION    PppAlertDestination;\r
 } IPMI_DEST_TYPE_SPECIFIC;\r
 \r
-typedef struct {\r
-  UINT8 DestinationSelector : 4;\r
-  UINT8 Reserved1 : 4;\r
-  UINT8 DestinationType : 4;\r
-  UINT8 Reserved2 : 3;\r
-  UINT8 AlertAckRequired : 1;\r
-  UINT8 AlertAckTimeoutSeconds;\r
-  UINT8 NumRetriesCall : 3;\r
-  UINT8 Reserved3 : 1;\r
-  UINT8 NumRetryAlert : 3;\r
-  UINT8 Reserved4 : 1;\r
-  IPMI_DEST_TYPE_SPECIFIC DestinationTypeSpecific;\r
+typedef union {\r
+  struct {\r
+    UINT8 DestinationSelector : 4;\r
+    UINT8 Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_EMP_DESTINATION_SELECTOR;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  DestinationType : 4;\r
+    UINT8  Reserved : 3;\r
+    UINT8  AlertAckRequired : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_EMP_DESTINATION_TYPE;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  NumRetriesCall : 3;\r
+    UINT8  Reserved1 : 1;\r
+    UINT8  NumRetryAlert : 3;\r
+    UINT8  Reserved2 : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_EMP_RETRIES;\r
+\r
+typedef struct {\r
+  IPMI_EMP_DESTINATION_SELECTOR  DestinationSelector;\r
+  IPMI_EMP_DESTINATION_TYPE      DestinationType;\r
+  UINT8                          AlertAckTimeoutSeconds;\r
+  IPMI_EMP_RETRIES               Retries;\r
+  IPMI_DEST_TYPE_SPECIFIC        DestinationTypeSpecific;\r
 } IPMI_EMP_DESTINATION_INFO;\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  Parity : 3;\r
+    UINT8  CharacterSize : 1;\r
+    UINT8  StopBit : 1;\r
+    UINT8  DtrHangup : 1;\r
+    UINT8  FlowControl : 2;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_EMP_DESTINATION_COM_SETTING_DATA_2;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  BitRate : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_EMP_BIT_RATE;\r
+\r
 typedef struct {\r
-  UINT8 DestinationSelector : 4;\r
-  UINT8 Reserved1 : 4;\r
-  UINT8 Parity : 3;\r
-  UINT8 CharacterSize : 1;\r
-  UINT8 StopBit : 1;\r
-  UINT8 DtrHangup : 1;\r
-  UINT8 FlowControl : 2;\r
-  UINT8 BitRate : 4;\r
-  UINT8 Reserved2 : 4;\r
-  UINT8 SaveSetting : 1;\r
-  UINT8 SetComPort : 1;\r
-  UINT8 Reserved3 : 6;\r
+  IPMI_EMP_DESTINATION_SELECTOR            DestinationSelector;\r
+  IPMI_EMP_DESTINATION_COM_SETTING_DATA_2  Data2;\r
+  IPMI_EMP_BIT_RATE                        BitRate;\r
 } IPMI_EMP_DESTINATION_COM_SETTING;\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  DialStringSelector : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_DIAL_STRING_SELECTOR;\r
+\r
 typedef struct {\r
-  UINT8 DialStringSelector : 4;\r
-  UINT8 Reserved1 : 4;\r
-  UINT8 Reserved2;\r
-  UINT8 DialString[48];\r
+  IPMI_DIAL_STRING_SELECTOR  DestinationSelector;\r
+  UINT8                      Reserved;\r
+  UINT8                      DialString[48];\r
 } IPMI_DESTINATION_DIAL_STRING;\r
 \r
 typedef union {\r
@@ -431,16 +581,31 @@ typedef union {
   UINT8   IpAddress[4];\r
 } IPMI_PPP_IP_ADDRESS;\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  IpAddressSelector : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_DESTINATION_IP_ADDRESS_SELECTOR;\r
+\r
 typedef struct {\r
-  UINT8 IpAddressSelector : 4;\r
-  UINT8 Reserved1 : 4;\r
-  IPMI_PPP_IP_ADDRESS PppIpAddress;\r
+  IPMI_DESTINATION_IP_ADDRESS_SELECTOR  DestinationSelector;\r
+  IPMI_PPP_IP_ADDRESS                   PppIpAddress;\r
 } IPMI_DESTINATION_IP_ADDRESS;\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  TapServiceSelector : 4;\r
+    UINT8  TapDialStringSelector : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_TAP_DIAL_STRING_SERVICE_SELECTOR;\r
+\r
+\r
 typedef struct {\r
-  UINT8 TapSelector;\r
-  UINT8 TapServiceSelector : 4;\r
-  UINT8 TapDialStringSelector : 4;\r
+  UINT8                                  TapSelector;\r
+  IPMI_TAP_DIAL_STRING_SERVICE_SELECTOR  TapDialStringServiceSelector;\r
 } IPMI_DESTINATION_TAP_ACCOUNT;\r
 \r
 typedef struct {\r
@@ -509,22 +674,43 @@ typedef union {
 #define IPMI_MUX_SETTING_BLOCK_REQUEST_MUX_TO_BMC     0x7\r
 #define IPMI_MUX_SETTING_ALLOW_REQUEST_MUX_TO_BMC     0x8\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelNo : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_MUX_CHANNEL_NUM;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT8  MuxSetting : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_MUX_SETTING_REQUEST;\r
+\r
 typedef struct {\r
-  UINT8 ChannelNo : 4;\r
-  UINT8 Reserved1 : 4;\r
-  UINT8 MuxSetting : 4;\r
-  UINT8 Reserved2 : 4;\r
+  IPMI_MUX_CHANNEL_NUM      ChannelNumber;\r
+  IPMI_MUX_SETTING_REQUEST  MuxSetting;\r
 } IPMI_SET_SERIAL_MODEM_MUX_COMMAND_REQUEST;\r
 \r
-typedef struct {\r
-  UINT8 CompletionCode;\r
-  UINT8 MuxSetToBmc : 1;\r
-  UINT8 CommandStatus : 1;\r
-  UINT8 MessagingSessionActive : 1;\r
-  UINT8 AlertInProgress : 1;\r
-  UINT8 Reserved2 : 2;\r
-  UINT8 MuxToBmcAllowed : 1;\r
-  UINT8 MuxToSystemBlocked : 1;\r
+typedef union {\r
+  struct {\r
+    UINT8  MuxSetToBmc : 1;\r
+    UINT8  CommandStatus : 1;\r
+    UINT8  MessagingSessionActive : 1;\r
+    UINT8  AlertInProgress : 1;\r
+    UINT8  Reserved : 2;\r
+    UINT8  MuxToBmcAllowed : 1;\r
+    UINT8  MuxToSystemBlocked : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_MUX_SETTING_PRESENT_STATE;\r
+\r
+typedef struct {\r
+  UINT8                           CompletionCode;\r
+  IPMI_MUX_SETTING_PRESENT_STATE  MuxSetting;\r
 } IPMI_SET_SERIAL_MODEM_MUX_COMMAND_RESPONSE;\r
 \r
 //\r
@@ -620,12 +806,19 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "SOL activating" command to follow here\r
 //\r
-typedef struct {\r
-  UINT8  SessionState : 4;\r
-  UINT8  Reserved : 4;\r
-  UINT8  PayloadInstance;\r
-  UINT8  FormatVersionMajor; // 1\r
-  UINT8  FormatVersionMinor; // 0\r
+typedef union {\r
+  struct {\r
+    UINT8  SessionState : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SOL_SESSION_STATE;\r
+\r
+typedef struct {\r
+  IPMI_SOL_SESSION_STATE  SessionState;\r
+  UINT8                   PayloadInstance;\r
+  UINT8                   FormatVersionMajor; // 1\r
+  UINT8                   FormatVersionMinor; // 0\r
 } IPMI_SOL_ACTIVATING_REQUEST;\r
 \r
 //\r
@@ -650,11 +843,18 @@ typedef struct {
 #define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_CHANNEL   7\r
 #define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_PORT      8\r
 \r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelNumber : 4;\r
+    UINT8  Reserved : 4;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_SET_SOL_CONFIG_PARAM_CHANNEL_NUM;\r
+\r
 typedef struct {\r
-  UINT8  ChannelNumber : 4;\r
-  UINT8  Reserved : 4;\r
-  UINT8  ParameterSelector;\r
-  UINT8  ParameterData[0];\r
+  IPMI_SET_SOL_CONFIG_PARAM_CHANNEL_NUM  ChannelNumber;\r
+  UINT8                                  ParameterSelector;\r
+  UINT8                                  ParameterData[0];\r
 } IPMI_SET_SOL_CONFIGURATION_PARAMETERS_REQUEST;\r
 \r
 //\r
@@ -665,13 +865,20 @@ typedef struct {
 //\r
 //  Constants and Structure definitions for "Get SOL Configuration Parameters" command to follow here\r
 //\r
-typedef struct {\r
-  UINT8  ChannelNumber : 4;\r
-  UINT8  Reserved : 3;\r
-  UINT8  GetParameter : 1;\r
-  UINT8  ParameterSelector;\r
-  UINT8  SetSelector;\r
-  UINT8  BlockSelector;\r
+typedef union {\r
+  struct {\r
+    UINT8  ChannelNumber : 4;\r
+    UINT8  Reserved : 3;\r
+    UINT8  GetParameter : 1;\r
+  } Bits;\r
+  UINT8  Uint8;\r
+} IPMI_GET_SOL_CONFIG_PARAM_CHANNEL_NUM;\r
+\r
+typedef struct {\r
+  IPMI_GET_SOL_CONFIG_PARAM_CHANNEL_NUM  ChannelNumber;\r
+  UINT8                                  ParameterSelector;\r
+  UINT8                                  SetSelector;\r
+  UINT8                                  BlockSelector;\r
 } IPMI_GET_SOL_CONFIGURATION_PARAMETERS_REQUEST;\r
 \r
 typedef struct {\r