From nobody Wed Apr 24 21:58:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1528168818048824.3799739857437; Mon, 4 Jun 2018 20:20:18 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EECE42111B77E; Mon, 4 Jun 2018 20:20:16 -0700 (PDT) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 CF7EF2111B770 for ; Mon, 4 Jun 2018 20:20:15 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2018 20:20:15 -0700 Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.10]) by FMSMGA003.fm.intel.com with ESMTP; 04 Jun 2018 20:20:13 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,477,1520924400"; d="scan'208";a="54774784" From: Hao Wu To: edk2-devel@lists.01.org Date: Tue, 5 Jun 2018 11:20:09 +0800 Message-Id: <20180605032010.25104-2-hao.a.wu@intel.com> X-Mailer: git-send-email 2.12.0.windows.1 In-Reply-To: <20180605032010.25104-1-hao.a.wu@intel.com> References: <20180605032010.25104-1-hao.a.wu@intel.com> Subject: [edk2] [RFC PATCH v1 1/2] MdePkg/IndustryStandard/Ipmi: Update IPMI header files X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hao Wu , Michael Kinney , Younas Khan , Jiewen Yao , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D814 This commit updates the IPMI related header files according to the spec: Intelligent Platform Management Interface Specification Second Generation v2.0 Document Revision 1.1 (October 1, 2013). Cc: Younas Khan Cc: Michael Kinney Cc: Liming Gao Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu Reviewed-by: Liming Gao --- MdePkg/Include/IndustryStandard/Ipmi.h | 34 ++- MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h | 66 +++++ MdePkg/Include/IndustryStandard/IpmiNetFnApp.h | 269 ++++++++= ++++++++++- MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h | 82 +++++- MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h | 274 ++++++++= ++++++++---- MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h | 122 ++++++++- 6 files changed, 788 insertions(+), 59 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/Ipmi.h b/MdePkg/Include/Indust= ryStandard/Ipmi.h index fd3a1d2a8f..3362191e30 100644 --- a/MdePkg/Include/IndustryStandard/Ipmi.h +++ b/MdePkg/Include/IndustryStandard/Ipmi.h @@ -1,10 +1,11 @@ /** @file IPMI 2.0 definitions from the IPMI Specification Version 2.0, Revision 1= .1. + IPMI Platform Management FRU Information Storage Definition v1.0 Revisio= n 1.3. =20 See IPMI specification, Appendix G, Command Assignments and Appendix H, Sub-function Assignments. =20 - Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -26,4 +27,35 @@ #include #include =20 +#include + +// +// Generic Completion Codes definitions +// +#define IPMI_COMP_CODE_NORMAL 0x00 +#define IPMI_COMP_CODE_NODE_BUSY 0xC0 +#define IPMI_COMP_CODE_INVALID_COMMAND 0xC1 +#define IPMI_COMP_CODE_INVALID_FOR_GIVEN_LUN 0xC2 +#define IPMI_COMP_CODE_TIMEOUT 0xC3 +#define IPMI_COMP_CODE_OUT_OF_SPACE 0xC4 +#define IPMI_COMP_CODE_RESERVATION_CANCELED_OR_INVALID 0xC5 +#define IPMI_COMP_CODE_REQUEST_DATA_TRUNCATED 0xC6 +#define IPMI_COMP_CODE_INVALID_REQUEST_DATA_LENGTH 0xC7 +#define IPMI_COMP_CODE_REQUEST_EXCEED_LIMIT 0xC8 +#define IPMI_COMP_CODE_OUT_OF_RANGE 0xC9 +#define IPMI_COMP_CODE_CANNOT_RETURN 0xCA +#define IPMI_COMP_CODE_NOT_PRESENT 0xCB +#define IPMI_COMP_CODE_INVALID_DATA_FIELD 0xCC +#define IPMI_COMP_CODE_COMMAND_ILLEGAL 0xCD +#define IPMI_COMP_CODE_CMD_RESP_NOT_PROVIDED 0xCE +#define IPMI_COMP_CODE_FAIL_DUP_REQUEST 0xCF +#define IPMI_COMP_CODE_SDR_REP_IN_UPDATE_MODE 0xD0 +#define IPMI_COMP_CODE_DEV_IN_FW_UPDATE_MODE 0xD1 +#define IPMI_COMP_CODE_BMC_INIT_IN_PROGRESS 0xD2 +#define IPMI_COMP_CODE_DEST_UNAVAILABLE 0xD3 +#define IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE 0xD4 +#define IPMI_COMP_CODE_UNSUPPORTED_IN_PRESENT_STATE 0xD5 +#define IPMI_COMP_CODE_SUBFUNCTION_DISABLED 0xD6 +#define IPMI_COMP_CODE_UNSPECIFIED 0xFF + #endif diff --git a/MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h b/= MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h new file mode 100644 index 0000000000..2b58cbf0b4 --- /dev/null +++ b/MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h @@ -0,0 +1,66 @@ +/** @file + IPMI Platform Management FRU Information Storage Definitions + + This file contains the definitions for: + Common Header Format (Chapter 8) + MultiRecord Header (Section 16.1) + + Copyright (c) 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may b= e 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 IMP= LIED. + + @par Revision Reference: + - IPMI Platform Management FRU Information Storage Definition v1.0 Rev= ision + 1.3, Dated March 24, 2015. + https://www.intel.com/content/dam/www/public/us/en/documents/specifi= cation-updates/ipmi-platform-mgt-fru-info-storage-def-v1-0-rev-1-3-spec-upd= ate.pdf +**/ + +#ifndef _IPMI_FRU_INFORMATION_STORAGE_H_ +#define _IPMI_FRU_INFORMATION_STORAGE_H_ + +#pragma pack(1) + +// +// Structure definition for FRU Common Header +// +typedef struct { + UINT8 FormatVersionNumber:4; + UINT8 Reserved:4; + UINT8 InternalUseStartingOffset; + UINT8 ChassisInfoStartingOffset; + UINT8 BoardAreaStartingOffset; + UINT8 ProductInfoStartingOffset; + UINT8 MultiRecInfoStartingOffset; + UINT8 Pad; + UINT8 Checksum; +} IPMI_FRU_COMMON_HEADER; + +// +// Structure definition for FRU MultiRecord Header +// +typedef struct { + UINT8 RecordTypeId; + UINT8 RecordFormatVersion:4; + UINT8 Reserved:3; + UINT8 EndofList:1; + UINT8 RecordLength; + UINT8 RecordChecksum; + UINT8 HeaderChecksum; +} IPMI_FRU_MULTI_RECORD_HEADER; + +// +// Structure definition for System UUID Subrecord with checksum. +// +typedef struct { + UINT8 RecordCheckSum; + UINT8 SubRecordId; + EFI_GUID Uuid; +} IPMI_SYSTEM_UUID_SUB_RECORD_WITH_CHECKSUM; + +#pragma pack() +#endif diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h b/MdePkg/Includ= e/IndustryStandard/IpmiNetFnApp.h index 31f9e839ea..cdd3f07c65 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h @@ -11,7 +11,7 @@ See IPMI specification, Appendix G, Command Assignments and Appendix H, Sub-function Assignments. =20 - Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -128,6 +128,43 @@ typedef struct { // // Constants and Structure definitions for "Set ACPI Power State" command= to follow here // + +// +// Definitions for System Power State +// +// Working +#define IPMI_SYSTEM_POWER_STATE_S0_G0 0x0 +#define IPMI_SYSTEM_POWER_STATE_S1 0x1 +#define IPMI_SYSTEM_POWER_STATE_S2 0x2 +#define IPMI_SYSTEM_POWER_STATE_S3 0x3 +#define IPMI_SYSTEM_POWER_STATE_S4 0x4 +// Soft off +#define IPMI_SYSTEM_POWER_STATE_S5_G2 0x5 +// Sent when message source cannot differentiate between S4 and S5 +#define IPMI_SYSTEM_POWER_STATE_S4_S5 0x6 +// Mechanical off +#define IPMI_SYSTEM_POWER_STATE_G3 0x7 +// Sleeping - cannot differentiate between S1-S3 +#define IPMI_SYSTEM_POWER_STATE_SLEEPING 0x8 +// Sleeping - cannot differentiate between S1-S4 +#define IPMI_SYSTEM_POWER_STATE_G1_SLEEPING 0x9 +// S5 entered by override +#define IPMI_SYSTEM_POWER_STATE_OVERRIDE 0xA +#define IPMI_SYSTEM_POWER_STATE_LEGACY_ON 0x20 +#define IPMI_SYSTEM_POWER_STATE_LEGACY_OFF 0x21 +#define IPMI_SYSTEM_POWER_STATE_UNKNOWN 0x2A +#define IPMI_SYSTEM_POWER_STATE_NO_CHANGE 0x7F + +// +// Definitions for Device Power State +// +#define IPMI_DEVICE_POWER_STATE_D0 0x0 +#define IPMI_DEVICE_POWER_STATE_D1 0x1 +#define IPMI_DEVICE_POWER_STATE_D2 0x2 +#define IPMI_DEVICE_POWER_STATE_D3 0x3 +#define IPMI_DEVICE_POWER_STATE_UNKNOWN 0x2A +#define IPMI_DEVICE_POWER_STATE_NO_CHANGE 0x7F + typedef struct { UINT8 AcpiSystemPowerState : 7; UINT8 AcpiSystemStateChange : 1; @@ -170,7 +207,25 @@ typedef struct { #define IPMI_APP_RESET_WATCHDOG_TIMER 0x22 =20 // -// Constants and Structure definitions for "Reset WatchDog Timer" command= to follow here +// Definitions for Set WatchDog Timer command +// +#define IPMI_APP_SET_WATCHDOG_TIMER 0x24 + +// +// Constants and Structure definitions for "Set WatchDog Timer" command t= o follow here +// + +// +// Definitions for watchdog timer use +// +#define IPMI_WATCHDOG_TIMER_BIOS_FRB2 0x1 +#define IPMI_WATCHDOG_TIMER_BIOS_POST 0x2 +#define IPMI_WATCHDOG_TIMER_OS_LOADER 0x3 +#define IPMI_WATCHDOG_TIMER_SMS 0x4 +#define IPMI_WATCHDOG_TIMER_OEM 0x5 + +// +// Structure definition for timer Use // typedef struct { UINT8 TimerUse : 3; @@ -180,16 +235,43 @@ typedef struct { } IPMI_WATCHDOG_TIMER_USE; =20 // -// Definitions for Set WatchDog Timer command +// Definitions for watchdog timeout action // -#define IPMI_APP_SET_WATCHDOG_TIMER 0x24 +#define IPMI_WATCHDOG_TIMER_ACTION_NO_ACTION 0x0 +#define IPMI_WATCHDOG_TIMER_ACTION_HARD_RESET 0x1 +#define IPMI_WATCHDOG_TIMER_ACTION_POWER_DONW 0x2 +#define IPMI_WATCHDOG_TIMER_ACTION_POWER_CYCLE 0x3 =20 // -// Constants and Structure definitions for "Set WatchDog Timer" command t= o follow here +// Definitions for watchdog pre-timeout interrupt +// +#define IPMI_WATCHDOG_PRE_TIMEOUT_INTERRUPT_NONE 0x0 +#define IPMI_WATCHDOG_PRE_TIMEOUT_INTERRUPT_SMI 0x1 +#define IPMI_WATCHDOG_PRE_TIMEOUT_INTERRUPT_NMI 0x2 +#define IPMI_WATCHDOG_PRE_TIMEOUT_INTERRUPT_MESSAGING 0x3 + +// +// Structure definitions for Timer Actions // typedef struct { + UINT8 TimeoutAction : 3; + UINT8 Reserved1 : 1; + UINT8 PreTimeoutInterrupt : 3; + UINT8 Reserved2 : 1; +} IPMI_WATCHDOG_TIMER_ACTIONS; + +// +// Bit definitions for Timer use expiration flags +// +#define IPMI_WATCHDOG_TIMER_EXPIRATION_FLAG_BIOS_FRB2 BIT1 +#define IPMI_WATCHDOG_TIMER_EXPIRATION_FLAG_BIOS_POST BIT2 +#define IPMI_WATCHDOG_TIMER_EXPIRATION_FLAG_OS_LOAD BIT3 +#define IPMI_WATCHDOG_TIMER_EXPIRATION_FLAG_SMS_OS BIT4 +#define IPMI_WATCHDOG_TIMER_EXPIRATION_FLAG_OEM BIT5 + +typedef struct { IPMI_WATCHDOG_TIMER_USE TimerUse; - UINT8 TimerActions; + IPMI_WATCHDOG_TIMER_ACTIONS TimerActions; UINT8 PretimeoutInterval; UINT8 TimerUseExpirationFlagsClear; UINT16 InitialCountdownValue; @@ -206,7 +288,7 @@ typedef struct { typedef struct { UINT8 CompletionCode; IPMI_WATCHDOG_TIMER_USE TimerUse; - UINT8 TimerActions; + IPMI_WATCHDOG_TIMER_ACTIONS TimerActions; UINT8 PretimeoutInterval; UINT8 TimerUseExpirationFlagsClear; UINT16 InitialCountdownValue; @@ -225,6 +307,16 @@ typedef struct { // // Constants and Structure definitions for "Set BMC Global Enables " comm= and to follow here // +typedef struct { + UINT8 EnableReceiveMessageQueueInterrupt : 1; + UINT8 EnableEventMessageBufferFullInterrupt : 1; + UINT8 EnableEventMessageBuffer : 1; + UINT8 EnableSystemEventLogging : 1; + UINT8 Reserved : 1; + UINT8 Oem0Enable : 1; + UINT8 Oem1Enable : 1; + UINT8 Oem2Enable : 1; +} IPMI_SET_BMC_GLOBAL_ENABLES_REQUEST; =20 // // Definitions for Get BMC Global Enables command @@ -234,6 +326,17 @@ typedef struct { // // Constants and Structure definitions for "Get BMC Global Enables " comm= and to follow here // +typedef struct { + UINT8 CompletionCode; + UINT8 ReceiveMessageQueueInterrupt : 1; + UINT8 EventMessageBufferFullInterrupt : 1; + UINT8 EventMessageBuffer : 1; + UINT8 SystemEventLogging : 1; + UINT8 Reserved : 1; + UINT8 Oem0Enable : 1; + UINT8 Oem1Enable : 1; + UINT8 Oem2Enable : 1; +} IPMI_GET_BMC_GLOBAL_ENABLES_RESPONSE; =20 // // Definitions for Clear Message Flags command @@ -243,6 +346,16 @@ typedef struct { // // Constants and Structure definitions for "Clear Message Flags" command = to follow here // +typedef struct { + UINT8 ClearReceiveMessageQueue : 1; + UINT8 ClearEventMessageBuffer : 1; + UINT8 Reserved0 : 1; + UINT8 ClearWatchdogPerTimeoutInterruptFlag : 1; + UINT8 Reserved : 1; + UINT8 ClearOem0Enable : 1; + UINT8 ClearOem1Enable : 1; + UINT8 ClearOem2Enable : 1; +} IPMI_CLEAR_MESSAGE_FLAGS_REQUEST; =20 // // Definitions for Get Message Flags command @@ -252,6 +365,17 @@ typedef struct { // // Constants and Structure definitions for "Get Message Flags" command to= follow here // +typedef struct { + UINT8 CompletionCode; + UINT8 ReceiveMessageAvailable : 1; + UINT8 EventMessageBufferFull : 1; + UINT8 Reserved0 : 1; + UINT8 WatchdogPerTimeoutInterruptOccurred : 1; + UINT8 Reserved : 1; + UINT8 Oem0DataAvailable : 1; + UINT8 Oem1DataAvailable : 1; + UINT8 Oem2DataAvailable : 1; +} IPMI_GET_MESSAGE_FLAGS_RESPONSE; =20 // // Definitions for Enable Message Channel Receive command @@ -270,6 +394,12 @@ typedef struct { // // Constants and Structure definitions for "Get Message" command to follo= w here // +typedef struct { + UINT8 CompletionCode; + UINT8 ChannelNumber : 4; + UINT8 InferredPrivilegeLevel : 4; + UINT8 MessageData[0]; +} IPMI_GET_MESSAGE_RESPONSE; =20 // // Definitions for Send Message command @@ -279,6 +409,19 @@ typedef struct { // // Constants and Structure definitions for "Send Message" command to foll= ow here // +typedef struct { + UINT8 CompletionCode; + UINT8 ChannelNumber : 4; + UINT8 Authentication : 1; + UINT8 Encryption : 1; + UINT8 Tracking : 2; + UINT8 MessageData[0]; +} IPMI_SEND_MESSAGE_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT8 ResponseData[0]; +} IPMI_SEND_MESSAGE_RESPONSE; =20 // // Definitions for Read Event Message Buffer command @@ -387,6 +530,21 @@ typedef struct { // // Constants and Structure definitions for "Get Channel Access" command t= o follow here // + +// +// Definitions for channel access memory type in Get Channel Access comma= nd request +// +#define IPMI_CHANNEL_ACCESS_MEMORY_TYPE_NON_VOLATILE 0x1 +#define IPMI_CHANNEL_ACCESS_MEMORY_TYPE_PRESENT_VOLATILE_SETTING 0x2 + +// +// Definitions for channel access modes in Get Channel Access command res= ponse +// +#define IPMI_CHANNEL_ACCESS_MODES_DISABLED 0x0 +#define IPMI_CHANNEL_ACCESS_MODES_PRE_BOOT_ONLY 0x1 +#define IPMI_CHANNEL_ACCESS_MODES_ALWAYS_AVAILABLE 0x2 +#define IPMI_CHANNEL_ACCESS_MODES_SHARED 0x3 + typedef struct { UINT8 ChannelNo : 4; UINT8 Reserve1 : 4; @@ -413,6 +571,38 @@ typedef struct { // // Constants and Structure definitions for "Get Channel Info" command to = follow here // + +// +// Definitions for channel media type +// +// IPMB (I2C) +#define IPMI_CHANNEL_MEDIA_TYPE_IPMB 0x1 +// ICMB v1.0 +#define IPMI_CHANNEL_MEDIA_TYPE_ICMB_1_0 0x2 +// ICMB v0.9 +#define IPMI_CHANNEL_MEDIA_TYPE_ICMB_0_9 0x3 +// 802.3 LAN +#define IPMI_CHANNEL_MEDIA_TYPE_802_3_LAN 0x4 +// Asynch. Serial/Modem (RS-232) +#define IPMI_CHANNEL_MEDIA_TYPE_RS_232 0x5 +// Other LAN +#define IPMI_CHANNEL_MEDIA_TYPE_OTHER_LAN 0x6 +// PCI SMBus +#define IPMI_CHANNEL_MEDIA_TYPE_PCI_SM_BUS 0x7 +// SMBus v1.0/1.1 +#define IPMI_CHANNEL_MEDIA_TYPE_SM_BUS_V1 0x8 +// SMBus v2.0 +#define IPMI_CHANNEL_MEDIA_TYPE_SM_BUS_V2 0x9 +// USB 1.x +#define IPMI_CHANNEL_MEDIA_TYPE_USB1 0xA +// USB 2.x +#define IPMI_CHANNEL_MEDIA_TYPE_USB2 0xB +// System Interface (KCS, SMIC, or BT) +#define IPMI_CHANNEL_MEDIA_TYPE_SYSTEM_INTERFACE 0xC +// OEM +#define IPMI_CHANNEL_MEDIA_TYPE_OEM_START 0x60 +#define IPMI_CHANNEL_MEDIA_TYPE_OEM_END 0x7F + typedef struct { UINT8 CompletionCode; UINT8 ChannelNo : 4; @@ -453,6 +643,27 @@ typedef struct { // // Constants and Structure definitions for "Get User Access" command to f= ollow here // +typedef struct { + UINT8 ChannelNo : 4; + UINT8 Reserved1 : 4; + UINT8 UserId : 6; + UINT8 Reserved2 : 2; +} IPMI_GET_USER_ACCESS_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT8 MaxUserId : 6; + UINT8 Reserved1 : 2; + UINT8 CurrentUserId : 6; + UINT8 UserIdEnableStatus : 2; + UINT8 FixedUserId : 6; + UINT8 Reserved2 : 2; + UINT8 UserPrivilegeLimit : 4; + UINT8 EnableIpmiMessaging : 1; + UINT8 EnableUserLinkAuthetication : 1; + UINT8 UserAccessAvailable : 1; + UINT8 Reserved3 : 1; +} IPMI_GET_USER_ACCESS_RESPONSE; =20 // // Definitions for Set User Name command @@ -462,6 +673,11 @@ typedef struct { // // Constants and Structure definitions for "Set User Name" command to fol= low here // +typedef struct { + UINT8 UserId : 6; + UINT8 Reserved : 2; + UINT8 UserName[16]; +} IPMI_SET_USER_NAME_REQUEST; =20 // // Definitions for Get User Name command @@ -471,6 +687,15 @@ typedef struct { // // Constants and Structure definitions for "Get User Name" command to fol= low here // +typedef struct { + UINT8 UserId : 6; + UINT8 Reserved : 2; +} IPMI_GET_USER_NAME_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT8 UserName[16]; +} IPMI_GET_USER_NAME_RESPONSE; =20 // // Definitions for Set User Password command @@ -482,6 +707,29 @@ typedef struct { // =20 // +// Definitions for Set User password command operation type +// +#define IPMI_SET_USER_PASSWORD_OPERATION_TYPE_DISABLE_USER 0x0 +#define IPMI_SET_USER_PASSWORD_OPERATION_TYPE_ENABLE_USER 0x1 +#define IPMI_SET_USER_PASSWORD_OPERATION_TYPE_SET_PASSWORD 0x2 +#define IPMI_SET_USER_PASSWORD_OPERATION_TYPE_TEST_PASSWORD 0x3 + +// +// Definitions for Set user password command password size +// +#define IPMI_SET_USER_PASSWORD_PASSWORD_SIZE_16 0x0 +#define IPMI_SET_USER_PASSWORD_PASSWORD_SIZE_20 0x1 + +typedef struct { + UINT8 UserId : 6; + UINT8 Reserved1 : 1; + UINT8 PasswordSize : 1; + UINT8 Operation : 2; + UINT8 Reserved2 : 6; + UINT8 PasswordData[0]; // 16 or 20 bytes, depending on the 'PasswordS= ize' field +} IPMI_SET_USER_PASSWORD_REQUEST; + +// // Below is Definitions for RMCP+ Support and Payload Commands (Chapter 2= 4) // =20 @@ -619,5 +867,12 @@ typedef struct { // Constants and Structure definitions for "Get System Interface Capabili= ties" command to follow here // =20 +// +// Definitions for Get System Interface Capabilities command SSIF transac= tion support +// +#define IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_SSIF_TRANSACTION_SUPPORT_SI= NGLE_PARTITION_RW 0x0 +#define IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_SSIF_TRANSACTION_SUPPORT_MU= LTI_PARTITION_RW 0x1 +#define IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_SSIF_TRANSACTION_SUPPORT_MU= LTI_PARTITION_RW_WITH_MIDDLE 0x2 + #pragma pack() #endif diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h b/MdePkg/In= clude/IndustryStandard/IpmiNetFnChassis.h index b549dc4366..bbc5bf0db3 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h @@ -7,7 +7,7 @@ See IPMI specification, Appendix G, Command Assignments and Appendix H, Sub-function Assignments. =20 - Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -38,6 +38,15 @@ // // Constants and Structure definitions for "Get Chassis Capabilities" com= mand to follow here // +typedef struct { + UINT8 CompletionCode; + UINT8 CapabilitiesFlags; + UINT8 ChassisFruInfoDeviceAddress; + UINT8 ChassisSDRDeviceAddress; + UINT8 ChassisSELDeviceAddress; + UINT8 ChassisSystemManagementDeviceAddress; + UINT8 ChassisBridgeDeviceAddress; +} IPMI_GET_CHASSIS_CAPABILITIES_RESPONSE; =20 // // Definitions for Get Chassis Status command @@ -47,6 +56,13 @@ // // Constants and Structure definitions for "Get Chassis Status" command t= o follow here // +typedef struct { + UINT8 CompletionCode; + UINT8 CurrentPowerState; + UINT8 LastPowerEvent; + UINT8 MiscChassisState; + UINT8 FrontPanelButtonCapabilities; +} IPMI_GET_CHASSIS_STATUS_RESPONSE; =20 // // Definitions for Chassis Control command @@ -56,6 +72,10 @@ // // Constants and Structure definitions for "Chassis Control" command to f= ollow here // +typedef struct { + UINT8 ChassisControl:4; + UINT8 Reserved:4; +} IPMI_CHASSIS_CONTROL_REQUEST; =20 // // Definitions for Chassis Reset command @@ -92,6 +112,15 @@ // // Constants and Structure definitions for "Set Power Restore Policy" com= mand to follow here // +typedef struct { + UINT8 PowerRestorePolicy:3; + UINT8 Reserved:5; +} IPMI_SET_POWER_RESTORE_POLICY_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT8 PowerRestorePolicySupport; +} IPMI_SET_POWER_RESTORE_POLICY_RESPONSE; =20 // // Definitions for Get System Restart Cause command @@ -138,7 +167,7 @@ typedef struct { } IPMI_SET_BOOT_OPTIONS_REQUEST; =20 // -// Definitions for Get System BOOT options command +// Definitions for Get System Boot options command // #define IPMI_CHASSIS_GET_SYSTEM_BOOT_OPTIONS 0x09 =20 @@ -172,6 +201,20 @@ typedef struct { } IPMI_BOOT_INITIATOR; =20 // +// Definitions for boot option parameter selector +// +#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SET_IN_PROGRESS 0= x0 +#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SELECTOR 0= x1 +#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SCAN 0= x2 +#define IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_BMC_BOOT_FLAG 0= x3 +#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INFO_ACK 0= x4 +#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_FLAGS 0= x5 +#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_INFO 0= x6 +#define IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_MAILBOX 0= x7 +#define IPMI_BOOT_OPTIONS_PARAMETER_OEM_BEGIN 0= x60 +#define IPMI_BOOT_OPTIONS_PARAMETER_OEM_END 0= x7F + +// // Response Parameters for IPMI Get Boot Options // typedef struct { @@ -199,13 +242,37 @@ typedef struct { UINT8 BootInitiatorAcknowledgeData; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_4; =20 +// +// Definitions for the 'Boot device selector' field of Boot Option Parame= ters #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 =20 +// +// 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 struct { // // Data 1 // - UINT8 Reserved0:6; + UINT8 Reserved0:5; + UINT8 BiosBootType:1; UINT8 PersistentOptions:1; UINT8 BootFlagValid:1; // @@ -217,8 +284,8 @@ typedef struct { UINT8 LockKeyboard:1; UINT8 CmosClear:1; // - // // Data 3 + // UINT8 ConsoleRedirection:2; UINT8 LockSleep:1; UINT8 UserPasswordBypass:1; @@ -228,9 +295,14 @@ typedef struct { // // Data 4 // - UINT8 BiosMuxControlOverride:2; + UINT8 BiosMuxControlOverride:3; UINT8 BiosSharedModeOverride:1; UINT8 Reserved1:4; + // + // Data 5 + // + UINT8 DeviceInstanceSelector:5; + UINT8 Reserved2:3; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5; =20 typedef struct { diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h b/MdePkg/In= clude/IndustryStandard/IpmiNetFnStorage.h index 7abcd4a3be..fe5ed38179 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h @@ -10,7 +10,7 @@ See IPMI specification, Appendix G, Command Assignments and Appendix H, Sub-function Assignments. =20 - Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -45,14 +45,23 @@ // // Constants and Structure definitions for "Get Fru Inventory Area Info" = command to follow here // +typedef struct { + UINT8 DeviceId; +} IPMI_GET_FRU_INVENTORY_AREA_INFO_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT16 InventoryAreaSize; + UINT8 AccessType; +} IPMI_GET_FRU_INVENTORY_AREA_INFO_RESPONSE; =20 // -// Definitions for Get Fru Data command +// Definitions for Read Fru Data command // #define IPMI_STORAGE_READ_FRU_DATA 0x11 =20 // -// Constants and Structure definitions for "Get Fru Data" command to foll= ow here +// Constants and Structure definitions for "Read Fru Data" command to fol= low here // typedef struct { UINT8 FruDeviceId; @@ -64,6 +73,18 @@ typedef struct { UINT8 Count; } IPMI_FRU_READ_COMMAND; =20 +typedef struct { + UINT8 DeviceId; + UINT16 InventoryOffset; + UINT8 CountToRead; +} IPMI_READ_FRU_DATA_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT8 CountReturned; + UINT8 Data[0]; +} IPMI_READ_FRU_DATA_RESPONSE; + // // Definitions for Write Fru Data command // @@ -77,6 +98,17 @@ typedef struct { UINT8 FruData[16]; } IPMI_FRU_WRITE_COMMAND; =20 +typedef struct { + UINT8 DeviceId; + UINT16 InventoryOffset; + UINT8 Data[0]; +} IPMI_WRITE_FRU_DATA_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT8 CountWritten; +} IPMI_WRITE_FRU_DATA_RESPONSE; + // // Below is Definitions for SDR Repository (Chapter 33) // @@ -103,7 +135,7 @@ typedef struct { UINT8 Reserved : 1; UINT8 SdrRepUpdateOp : 2; UINT8 Overflow : 1; -} IPMI_GET_SDR_REPOSITORY_INFO; +} IPMI_GET_SDR_REPOSITORY_INFO_RESPONSE; =20 // // Definitions for Get SDR Repository Allocateion Info command @@ -122,6 +154,10 @@ typedef struct { // // Constants and Structure definitions for "Reserve SDR Repository" comma= nd to follow here // +typedef struct { + UINT8 CompletionCode; + UINT8 ReservationId[2]; // Reservation ID. LS byte first. +} IPMI_RESERVE_SDR_REPOSITORY_RESPONSE; =20 // // Definitions for Get SDR command @@ -253,27 +289,25 @@ typedef struct { } IPMI_SDR_RECORD_STRUCT_11; =20 typedef struct { - UINT16 NextRecordId; //1 - UINT16 RecordId; //3 - UINT8 Version; //5 - UINT8 RecordType; //6 - UINT8 RecordLength; //7 - UINT8 ManufacturerId[3]; //8 + UINT16 RecordId; //1 + UINT8 Version; //3 + UINT8 RecordType; //4 + UINT8 RecordLength; //5 + UINT8 ManufacturerId[3]; //6 UINT8 StringChars[20]; } IPMI_SDR_RECORD_STRUCT_C0; =20 typedef struct { - UINT16 NextRecordId; //1 - UINT16 RecordId; //3 - UINT8 Version; //5 - UINT8 RecordType; //6 - UINT8 RecordLength; //7 + UINT16 RecordId; //1 + UINT8 Version; //3 + UINT8 RecordType; //4 + UINT8 RecordLength; //5 } IPMI_SDR_RECORD_STRUCT_HEADER; =20 typedef union { - IPMI_SDR_RECORD_STRUCT_1 SensorType1; - IPMI_SDR_RECORD_STRUCT_2 SensorType2; - IPMI_SDR_RECORD_STRUCT_11 SensorType11; + IPMI_SDR_RECORD_STRUCT_1 SensorType1; + IPMI_SDR_RECORD_STRUCT_2 SensorType2; + IPMI_SDR_RECORD_STRUCT_11 SensorType11; IPMI_SDR_RECORD_STRUCT_C0 SensorTypeC0; IPMI_SDR_RECORD_STRUCT_HEADER SensorHeader; } IPMI_SENSOR_RECORD_STRUCT; @@ -285,6 +319,12 @@ typedef struct { UINT8 BytesToRead; } IPMI_GET_SDR_REQUEST; =20 +typedef struct { + UINT8 CompletionCode; + UINT16 NextRecordId; + IPMI_SENSOR_RECORD_STRUCT RecordData; +} IPMI_GET_SDR_RESPONSE; + // // Definitions for Add SDR command // @@ -378,6 +418,12 @@ typedef struct { // // Constants and Structure definitions for "Get SEL Info" command to foll= ow here // +#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_GET_SEL_ALLOCATION_INFO_CMD = BIT0 +#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_RESERVE_SEL_CMD = BIT1 +#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_PARTIAL_ADD_SEL_ENTRY_CMD = BIT2 +#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_DELETE_SEL_CMD = BIT3 +#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_OVERFLOW_FLAG = BIT7 + typedef struct { UINT8 CompletionCode; UINT8 Version; // Version of SEL @@ -405,6 +451,10 @@ typedef struct { // // Constants and Structure definitions for "Reserve SEL" command to follo= w here // +typedef struct { + UINT8 CompletionCode; + UINT8 ReservationId[2]; // Reservation ID. LS byte first. +} IPMI_RESERVE_SEL_RESPONSE; =20 // // Definitions for Get SEL Entry command @@ -414,6 +464,38 @@ typedef struct { // // Constants and Structure definitions for "Get SEL Entry" command to fol= low here // + +// +// Below is Definitions for SEL Record Formats (Chapter 32) +// +typedef struct { + UINT16 RecordId; + UINT8 RecordType; + UINT32 TimeStamp; + UINT16 GeneratorId; + UINT8 EvMRevision; + UINT8 SensorType; + UINT8 SensorNumber; + UINT8 EventDirType; + UINT8 OEMEvData1; + UINT8 OEMEvData2; + UINT8 OEMEvData3; +} IPMI_SEL_EVENT_RECORD_DATA; + +typedef struct { + UINT16 RecordId; + UINT8 RecordType; // C0h-DFh =3D OEM system event record + UINT32 TimeStamp; + UINT8 ManufacturerId[3]; + UINT8 OEMDefined[6]; +} IPMI_TIMESTAMPED_OEM_SEL_RECORD_DATA; + +typedef struct { + UINT16 RecordId; + UINT8 RecordType; // E0h-FFh =3D OEM system event record + UINT8 OEMDefined[13]; +} IPMI_NON_TIMESTAMPED_OEM_SEL_RECORD_DATA; + typedef struct { UINT8 ReserveId[2]; // Reservation ID, LS Byte First UINT8 SelRecID[2]; // Sel Record ID, LS Byte First @@ -421,6 +503,12 @@ typedef struct { UINT8 BytesToRead; // Bytes to be Read, 0xFF for entire record } IPMI_GET_SEL_ENTRY_REQUEST; =20 +typedef struct { + UINT8 CompletionCode; + UINT16 NextSelRecordId; // Next SEL Record ID, LS B= yte first + IPMI_SEL_EVENT_RECORD_DATA RecordData; +} IPMI_GET_SEL_ENTRY_RESPONSE; + // // Definitions for Add SEL Entry command // @@ -429,6 +517,14 @@ typedef struct { // // Constants and Structure definitions for "Add SEL Entry" command to fol= low here // +typedef struct { + IPMI_SEL_EVENT_RECORD_DATA RecordData; +} IPMI_ADD_SEL_ENTRY_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT16 RecordId; // Record ID for added record, LS Byte first +} IPMI_ADD_SEL_ENTRY_RESPONSE; =20 // // Definitions for Partial Add SEL Entry command @@ -438,6 +534,18 @@ typedef struct { // // Constants and Structure definitions for "Partial Add SEL Entry" comman= d to follow here // +typedef struct { + UINT16 ReservationId; + UINT16 RecordId; + UINT8 OffsetIntoRecord; + UINT8 InProgress; + UINT8 RecordData[0]; +} IPMI_PARTIAL_ADD_SEL_ENTRY_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT16 RecordId; +} IPMI_PARTIAL_ADD_SEL_ENTRY_RESPONSE; =20 // // Definitions for Delete SEL Entry command @@ -450,7 +558,15 @@ typedef struct { typedef struct { UINT8 ReserveId[2]; // Reservation ID, LS byte first UINT8 RecordToDelete[2]; // Record to Delete, LS Byte First -} IPMI_DELETE_SEL_REQUEST; +} IPMI_DELETE_SEL_ENTRY_REQUEST; + +#define IPMI_DELETE_SEL_ENTRY_RESPONSE_TYPE_UNSUPPORTED 0x80 +#define IPMI_DELETE_SEL_ENTRY_RESPONSE_ERASE_IN_PROGRESS 0x81 + +typedef struct { + UINT8 CompletionCode; + UINT16 RecordId; // Record ID added. LS byte first +} IPMI_DELETE_SEL_ENTRY_RESPONSE; =20 // // Definitions for Clear SEL command @@ -460,6 +576,12 @@ typedef struct { // // Constants and Structure definitions for "Clear SEL" command to follow = here // +#define IPMI_CLEAR_SEL_REQUEST_C_CHAR_ASCII 0x43 +#define IPMI_CLEAR_SEL_REQUEST_L_CHAR_ASCII 0x4C +#define IPMI_CLEAR_SEL_REQUEST_R_CHAR_ASCII 0x52 +#define IPMI_CLEAR_SEL_REQUEST_INITIALIZE_ERASE 0xAA +#define IPMI_CLEAR_SEL_REQUEST_GET_ERASE_STATUS 0x00 + typedef struct { UINT8 Reserve[2]; // Reserve ID, LSB first UINT8 AscC; // Ascii for 'C' (0x43) @@ -468,6 +590,14 @@ typedef struct { UINT8 Erase; // 0xAA, Initiate Erase, 0x00 Get Erase Status } IPMI_CLEAR_SEL_REQUEST; =20 +#define IPMI_CLEAR_SEL_RESPONSE_ERASURE_IN_PROGRESS 0x00 +#define IPMI_CLEAR_SEL_RESPONSE_ERASURE_COMPLETED 0x01 + +typedef struct { + UINT8 CompletionCode; + UINT8 ErasureProgress; +} IPMI_CLEAR_SEL_RESPONSE; + // // Definitions for Get SEL Time command // @@ -476,6 +606,10 @@ typedef struct { // // Constants and Structure definitions for "Get SEL Time" command to foll= ow here // +typedef struct { + UINT8 CompletionCode; + UINT32 Timestamp; // Present Timestamp clock reading. LS byte first. +} IPMI_GET_SEL_TIME_RESPONSE; =20 // // Definitions for Set SEL Time command @@ -485,6 +619,9 @@ typedef struct { // // Constants and Structure definitions for "Set SEL Time" command to foll= ow here // +typedef struct { + UINT32 Timestamp; +} IPMI_SET_SEL_TIME_REQUEST; =20 // // Definitions for Get Auxillary Log Status command @@ -504,39 +641,88 @@ typedef struct { // Constants and Structure definitions for "Set Auxillary Log Status" com= mand to follow here // =20 -#define IPMI_COMPLETE_SEL_RECORD 0xFF +// +// Definitions for Get SEL Time UTC Offset command +// +#define IPMI_STORAGE_GET_SEL_TIME_UTC_OFFSET 0x5C =20 // -// Below is Definitions for SEL Record Formats (Chapter 32) +// Constants and Structure definitions for "Get SEL Time UTC Offset" comm= and to follow here // typedef struct { - UINT16 RecordId; - UINT8 RecordType; - UINT32 TimeStamp; - UINT16 GeneratorId; - UINT8 EvMRevision; - UINT8 SensorType; - UINT8 SensorNumber; - UINT8 EventDirType; - UINT8 OEMEvData1; - UINT8 OEMEvData2; - UINT8 OEMEvData3; -} IPMI_SEL_EVENT_RECORD_DATA; + UINT8 CompletionCode; + // + // 16-bit, 2s-complement signed integer for the offset in minutes from U= TC to SEL Time. + // LS-byte first. (ranges from -1440 to 1440) + // + INT16 UtcOffset; +} IPMI_GET_SEL_TIME_UTC_OFFSET_RESPONSE; =20 -#define IPMI_SEL_SYSTEM_RECORD 0x02 +// +// Definitions for Set SEL Time UTC Offset command +// +#define IPMI_STORAGE_SET_SEL_TIME_UTC_OFFSET 0x5D =20 -#define IPMI_EVM_REVISION 0x04 -#define IPMI_BIOS_ID 0x18 -#define IPMI_FORMAT_REV 0x00 -#define IPMI_FORMAT_REV1 0x01 -#define IPMI_SOFTWARE_ID 0x01 -#define IPMI_PLATFORM_VAL_ID 0x01 -#define IPMI_GENERATOR_ID(i,f) ((i << 1) | (f << 1) | = IPMI_SOFTWARE_ID) +// +// Constants and Structure definitions for "Set SEL Time UTC Offset" comm= and to follow here +// =20 -#define IPMI_SENSOR_TYPE_EVENT_CODE_DISCRETE 0x6F +#define IPMI_COMPLETE_SEL_RECORD 0xFF =20 -#define IPMI_OEM_SPECIFIC_DATA 0x02 -#define IPMI_SENSOR_SPECIFIC_DATA 0x03 +#define IPMI_SEL_SYSTEM_RECORD 0x02 +#define IPMI_SEL_OEM_TIME_STAMP_RECORD_START 0xC0 +#define IPMI_SEL_OEM_TIME_STAMP_RECORD_END 0xDF +#define IPMI_SEL_OEM_NO_TIME_STAMP_RECORD_START 0xE0 +#define IPMI_SEL_OEM_NO_TIME_STAMP_RECORD_END 0xFF + +#define IPMI_SEL_EVENT_DIR(EventDirType) (EventDirType >> 7) +#define IPMI_SEL_EVENT_DIR_ASSERTION_EVENT 0x00 +#define IPMI_SEL_EVENT_DIR_DEASSERTION_EVENT 0x01 + +#define IPMI_SEL_EVENT_TYPE(EventDirType) (EventDirType & 0x= 7F) +// +// Event/Reading Type Code Ranges (Chapter 42) +// +#define IPMI_SEL_EVENT_TYPE_UNSPECIFIED 0x00 +#define IPMI_SEL_EVENT_TYPE_THRESHOLD 0x01 +#define IPMI_SEL_EVENT_TYPE_GENERIC_START 0x02 +#define IPMI_SEL_EVENT_TYPE_GENERIC_END 0x0C +#define IPMI_SEL_EVENT_TYPE_SENSOR_SPECIFIC 0x6F +#define IPMI_SEL_EVENT_TYPE_OEM_START 0x70 +#define IPMI_SEL_EVENT_TYPE_OEM_END 0x7F + +#define SOFTWARE_ID_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId & 0x= FF) >> 1) +// +// System Software IDs definitions (Section 5.5) +// +#define IPMI_SWID_BIOS_RANGE_START 0x00 +#define IPMI_SWID_BIOS_RANGE_END 0x0F +#define IPMI_SWID_SMI_HANDLER_RANGE_START 0x10 +#define IPMI_SWID_SMI_HANDLER_RANGE_END 0x1F +#define IPMI_SWID_SMS_RANGE_START 0x20 +#define IPMI_SWID_SMS_RANGE_END 0x2F +#define IPMI_SWID_OEM_RANGE_START 0x30 +#define IPMI_SWID_OEM_RANGE_END 0x3F +#define IPMI_SWID_REMOTE_CONSOLE_RANGE_START 0x40 +#define IPMI_SWID_REMOTE_CONSOLE_RANGE_END 0x46 +#define IPMI_SWID_TERMINAL_REMOTE_CONSOLE_ID 0x47 + +#define SLAVE_ADDRESS_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId & 0x= FF) >> 1) +#define LUN_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId >> 8= ) & 0x03) +#define CHANNEL_NUMBER_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId >> 1= 2) & 0x0F) + +#define IPMI_EVM_REVISION 0x04 +#define IPMI_BIOS_ID 0x18 +#define IPMI_FORMAT_REV 0x00 +#define IPMI_FORMAT_REV1 0x01 +#define IPMI_SOFTWARE_ID 0x01 +#define IPMI_PLATFORM_VAL_ID 0x01 +#define IPMI_GENERATOR_ID(i,f) ((i << 1) | (f << = 1) | IPMI_SOFTWARE_ID) + +#define IPMI_SENSOR_TYPE_EVENT_CODE_DISCRETE 0x6F + +#define IPMI_OEM_SPECIFIC_DATA 0x02 +#define IPMI_SENSOR_SPECIFIC_DATA 0x03 =20 #pragma pack() #endif diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h b/MdePkg/= Include/IndustryStandard/IpmiNetFnTransport.h index 1e9bbe2755..28ede2f63a 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h @@ -10,7 +10,7 @@ See IPMI specification, Appendix G, Command Assignments and Appendix H, Sub-function Assignments. =20 - Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -65,7 +65,22 @@ typedef enum { IpmiLanCommunityString, IpmiLanReserved3, IpmiLanDestinationType, - IpmiLanDestinationAddress + IpmiLanDestinationAddress, + IpmiIpv4OrIpv6Support =3D 0x32, + IpmiIpv4OrIpv6AddressEnable, + IpmiIpv6HdrStatTrafficClass, + IpmiIpv6HdrStatHopLimit, + IpmiIpv6HdrFlowLabel, + IpmiIpv6Status, + IpmiIpv6StaticAddress, + IpmiIpv6DhcpStaticDuidLen, + IpmiIpv6DhcpStaticDuid, + IpmiIpv6DhcpAddress, + IpmiIpv6DhcpDynamicDuidLen, + IpmiIpv6DhcpDynamicDuid, + IpmiIpv6RouterConfig =3D 0x40, + IpmiIpv6StaticRouter1IpAddr, + IpmiIpv6DynamicRouterIpAddr =3D 0x4a } IPMI_LAN_OPTION_TYPE; =20 // @@ -183,6 +198,32 @@ typedef union { IPMI_LAN_DEST_ADDRESS IpmiLanDestAddress; } IPMI_LAN_OPTIONS; =20 +typedef struct { + UINT8 SetSelector; + UINT8 AddressSourceType : 4; + UINT8 Reserved : 3; + UINT8 EnableStatus : 1; + UINT8 Ipv6Address[16]; + UINT8 AddressPrefixLen; + UINT8 AddressStatus; +} IPMI_LAN_IPV6_STATIC_ADDRESS; + +// +// Set in progress parameter +// +typedef struct { + UINT8 SetInProgress:2; + UINT8 Reserved:6; +} IPMI_LAN_SET_IN_PROGRESS; + + +typedef struct { + UINT8 ChannelNo : 4; + UINT8 Reserved : 4; + UINT8 ParameterSelector; + UINT8 ParameterData[0]; +} IPMI_SET_LAN_CONFIGURATION_PARAMETERS_COMMAND_REQUEST; + // // Definitions for Get Lan Configuration Parameters command // @@ -191,6 +232,20 @@ typedef union { // // Constants and Structure definitions for "Get Lan Configuration Paramet= ers" command to follow here // +typedef struct { + UINT8 ChannelNo : 4; + UINT8 Reserved : 3; + UINT8 GetParameter : 1; + UINT8 ParameterSelector; + UINT8 SetSelector; + UINT8 BlockSelector; +} IPMI_GET_LAN_CONFIGURATION_PARAMETERS_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT8 ParameterRevision; + UINT8 ParameterData[0]; +} IPMI_GET_LAN_CONFIGURATION_PARAMETERS_RESPONSE; =20 // // Definitions for Suspend BMC ARPs command @@ -434,6 +489,26 @@ typedef union { // // Constants and Structure definitions for "Set Serial/Modem Mux" command= to follow here // + +// +// Set Serial/Modem Mux command request return status +// +#define IPMI_MUX_SETTING_REQUEST_REJECTED 0x00 +#define IPMI_MUX_SETTING_REQUEST_ACCEPTED 0x01 + +// +// Definitions for serial multiplex settings +// +#define IPMI_MUX_SETTING_GET_MUX_SETTING 0x0 +#define IPMI_MUX_SETTING_REQUEST_MUX_TO_SYSTEM 0x1 +#define IPMI_MUX_SETTING_REQUEST_MUX_TO_BMC 0x2 +#define IPMI_MUX_SETTING_FORCE_MUX_TO_SYSTEM 0x3 +#define IPMI_MUX_SETTING_FORCE_MUX_TO_BMC 0x4 +#define IPMI_MUX_SETTING_BLOCK_REQUEST_MUX_TO_SYSTEM 0x5 +#define IPMI_MUX_SETTING_ALLOW_REQUEST_MUX_TO_SYSTEM 0x6 +#define IPMI_MUX_SETTING_BLOCK_REQUEST_MUX_TO_BMC 0x7 +#define IPMI_MUX_SETTING_ALLOW_REQUEST_MUX_TO_BMC 0x8 + typedef struct { UINT8 ChannelNo : 4; UINT8 Reserved1 : 4; @@ -442,6 +517,7 @@ typedef struct { } IPMI_SET_SERIAL_MODEM_MUX_COMMAND_REQUEST; =20 typedef struct { + UINT8 CompletionCode; UINT8 MuxSetToBmc : 1; UINT8 CommandStatus : 1; UINT8 MessagingSessionActive : 1; @@ -544,6 +620,13 @@ typedef struct { // // Constants and Structure definitions for "SOL activating" command to fo= llow here // +typedef struct { + UINT8 SessionState : 4; + UINT8 Reserved : 4; + UINT8 PayloadInstance; + UINT8 FormatVersionMajor; // 1 + UINT8 FormatVersionMinor; // 0 +} IPMI_SOL_ACTIVATING_REQUEST; =20 // // Definitions for Set SOL Configuration Parameters command @@ -555,6 +638,26 @@ typedef struct { // =20 // +// SOL Configuration Parameters selector +// +#define IPMI_SOL_CONFIGURATION_PARAMETER_SET_IN_PROGRESS 0 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_ENABLE 1 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_AUTHENTICATION 2 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_CHARACTER_PARAM 3 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_RETRY 4 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_NV_BIT_RATE 5 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_VOLATILE_BIT_RATE 6 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_CHANNEL 7 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_PORT 8 + +typedef struct { + UINT8 ChannelNumber : 4; + UINT8 Reserved : 4; + UINT8 ParameterSelector; + UINT8 ParameterData[0]; +} IPMI_SET_SOL_CONFIGURATION_PARAMETERS_REQUEST; + +// // Definitions for Get SOL Configuration Parameters command // #define IPMI_TRANSPORT_GET_SOL_CONFIG_PARAM 0x22 @@ -562,5 +665,20 @@ typedef struct { // // Constants and Structure definitions for "Get SOL Configuration Paramet= ers" command to follow here // +typedef struct { + UINT8 ChannelNumber : 4; + UINT8 Reserved : 3; + UINT8 GetParameter : 1; + UINT8 ParameterSelector; + UINT8 SetSelector; + UINT8 BlockSelector; +} IPMI_GET_SOL_CONFIGURATION_PARAMETERS_REQUEST; + +typedef struct { + UINT8 CompletionCode; + UINT8 ParameterRevision; + UINT8 ParameterData[0]; +} IPMI_GET_SOL_CONFIGURATION_PARAMETERS_RESPONSE; + #pragma pack() #endif --=20 2.12.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Wed Apr 24 21:58:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1528168822947512.5253738556567; Mon, 4 Jun 2018 20:20:22 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3C2EC211211FE; Mon, 4 Jun 2018 20:20:19 -0700 (PDT) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 782AD2111B793 for ; Mon, 4 Jun 2018 20:20:18 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2018 20:20:18 -0700 Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.10]) by FMSMGA003.fm.intel.com with ESMTP; 04 Jun 2018 20:20:15 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,477,1520924400"; d="scan'208";a="54774797" From: Hao Wu To: edk2-devel@lists.01.org Date: Tue, 5 Jun 2018 11:20:10 +0800 Message-Id: <20180605032010.25104-3-hao.a.wu@intel.com> X-Mailer: git-send-email 2.12.0.windows.1 In-Reply-To: <20180605032010.25104-1-hao.a.wu@intel.com> References: <20180605032010.25104-1-hao.a.wu@intel.com> Subject: [edk2] [RFC PATCH v1 2/2] MdePkg/IndustryStandard/Ipmi: Use union for bitmap fields X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hao Wu , Michael Kinney , Jiewen Yao , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Cc: Liming Gao Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu Reviewed-by: Liming Gao --- MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h | 60 ++- MdePkg/Include/IndustryStandard/IpmiNetFnApp.h | 429 ++++++++= ++----- MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h | 271 ++++++--= -- MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h | 309 ++++++--= --- MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h | 561 ++++++++= ++++++------ 5 files changed, 1094 insertions(+), 536 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h b/= MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h index 2b58cbf0b4..1aef4b14f2 100644 --- a/MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h +++ b/MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h @@ -26,31 +26,57 @@ #pragma pack(1) =20 // -// Structure definition for FRU Common Header +// Structure definitions for FRU Common Header // +typedef union { + /// + /// Individual bit fields + /// + struct { + UINT8 FormatVersionNumber:4; + UINT8 Reserved:4; + } Bits; + /// + /// All bit fields as a 8-bit value + /// + UINT8 Uint8; +} IPMI_FRU_COMMON_HEADER_FORMAT_VERSION; + typedef struct { - UINT8 FormatVersionNumber:4; - UINT8 Reserved:4; - UINT8 InternalUseStartingOffset; - UINT8 ChassisInfoStartingOffset; - UINT8 BoardAreaStartingOffset; - UINT8 ProductInfoStartingOffset; - UINT8 MultiRecInfoStartingOffset; - UINT8 Pad; - UINT8 Checksum; + IPMI_FRU_COMMON_HEADER_FORMAT_VERSION FormatVersion; + UINT8 InternalUseStartingOffset; + UINT8 ChassisInfoStartingOffset; + UINT8 BoardAreaStartingOffset; + UINT8 ProductInfoStartingOffset; + UINT8 MultiRecInfoStartingOffset; + UINT8 Pad; + UINT8 Checksum; } IPMI_FRU_COMMON_HEADER; =20 // // Structure definition for FRU MultiRecord Header // +typedef union { + /// + /// Individual bit fields + /// + struct { + UINT8 RecordFormatVersion:4; + UINT8 Reserved:3; + UINT8 EndofList:1; + } Bits; + /// + /// All bit fields as a 8-bit value + /// + UINT8 Uint8; +} IPMI_FRU_MULTI_RECORD_HEADER_FORMAT_VERSION; + typedef struct { - UINT8 RecordTypeId; - UINT8 RecordFormatVersion:4; - UINT8 Reserved:3; - UINT8 EndofList:1; - UINT8 RecordLength; - UINT8 RecordChecksum; - UINT8 HeaderChecksum; + UINT8 RecordTypeId; + IPMI_FRU_MULTI_RECORD_HEADER_FORMAT_VERSION FormatVersion; + UINT8 RecordLength; + UINT8 RecordChecksum; + UINT8 HeaderChecksum; } IPMI_FRU_MULTI_RECORD_HEADER; =20 // diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h b/MdePkg/Includ= e/IndustryStandard/IpmiNetFnApp.h index cdd3f07c65..7147a1623e 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h @@ -42,27 +42,66 @@ // // Constants and Structure definitions for "Get Device ID" command to fol= low here // +typedef union { + /// + /// Individual bit fields + /// + struct { + UINT8 DeviceRevision : 4; + UINT8 Reserved : 3; + UINT8 DeviceSdr : 1; + } Bits; + /// + /// All bit fields as a 8-bit value + /// + UINT8 Uint8; +} IPMI_GET_DEVICE_ID_DEVICE_REV; + +typedef union { + /// + /// Individual bit fields + /// + struct { + UINT8 MajorFirmwareRev : 7; + UINT8 UpdateMode : 1; + } Bits; + /// + /// All bit fields as a 8-bit value + /// + UINT8 Uint8; +} IPMI_GET_DEVICE_ID_FIRMWARE_REV_1; + +typedef union { + /// + /// Individual bit fields + /// + struct { + UINT8 SensorDeviceSupport : 1; + UINT8 SdrRepositorySupport : 1; + UINT8 SelDeviceSupport : 1; + UINT8 FruInventorySupport : 1; + UINT8 IpmbMessageReceiver : 1; + UINT8 IpmbMessageGenerator : 1; + UINT8 BridgeSupport : 1; + UINT8 ChassisSupport : 1; + } Bits; + /// + /// All bit fields as a 8-bit value + /// + UINT8 Uint8; +} IPMI_GET_DEVICE_ID_DEVICE_SUPPORT; + typedef struct { - UINT8 CompletionCode; - UINT8 DeviceId; - UINT8 DeviceRevision : 4; - UINT8 Reserved : 3; - UINT8 DeviceSdr : 1; - UINT8 MajorFirmwareRev : 7; - UINT8 UpdateMode : 1; - UINT8 MinorFirmwareRev; - UINT8 SpecificationVersion; - UINT8 SensorDeviceSupport : 1; - UINT8 SdrRepositorySupport : 1; - UINT8 SelDeviceSupport : 1; - UINT8 FruInventorySupport : 1; - UINT8 IpmbMessageReceiver : 1; - UINT8 IpmbMessageGenerator : 1; - UINT8 BridgeSupport : 1; - UINT8 ChassisSupport : 1; - UINT8 ManufacturerId[3]; - UINT16 ProductId; - UINT32 AuxFirmwareRevInfo; + UINT8 CompletionCode; + UINT8 DeviceId; + IPMI_GET_DEVICE_ID_DEVICE_REV DeviceRevision; + IPMI_GET_DEVICE_ID_FIRMWARE_REV_1 FirmwareRev1; + UINT8 MinorFirmwareRev; + UINT8 SpecificationVersion; + IPMI_GET_DEVICE_ID_DEVICE_SUPPORT DeviceSupport; + UINT8 ManufacturerId[3]; + UINT16 ProductId; + UINT32 AuxFirmwareRevInfo; } IPMI_GET_DEVICE_ID_RESPONSE; =20 =20 @@ -165,11 +204,17 @@ typedef struct { #define IPMI_DEVICE_POWER_STATE_UNKNOWN 0x2A #define IPMI_DEVICE_POWER_STATE_NO_CHANGE 0x7F =20 +typedef union { + struct { + UINT8 PowerState : 7; + UINT8 StateChange : 1; + } Bits; + UINT8 Uint8; +} IPMI_ACPI_POWER_STATE; + typedef struct { - UINT8 AcpiSystemPowerState : 7; - UINT8 AcpiSystemStateChange : 1; - UINT8 AcpiDevicePowerState : 7; - UINT8 AcpiDeviceStateChange : 1; + IPMI_ACPI_POWER_STATE SystemPowerState; + IPMI_ACPI_POWER_STATE DevicePowerState; } IPMI_SET_ACPI_POWER_STATE_REQUEST; =20 // @@ -227,11 +272,14 @@ typedef struct { // // Structure definition for timer Use // -typedef struct { - UINT8 TimerUse : 3; - UINT8 Reserved : 3; - UINT8 TimerRunning : 1; - UINT8 TimerUseExpirationFlagLog : 1; +typedef union { + struct { + UINT8 TimerUse : 3; + UINT8 Reserved : 3; + UINT8 TimerRunning : 1; + UINT8 TimerUseExpirationFlagLog : 1; + } Bits; + UINT8 Uint8; } IPMI_WATCHDOG_TIMER_USE; =20 // @@ -253,11 +301,14 @@ typedef struct { // // Structure definitions for Timer Actions // -typedef struct { - UINT8 TimeoutAction : 3; - UINT8 Reserved1 : 1; - UINT8 PreTimeoutInterrupt : 3; - UINT8 Reserved2 : 1; +typedef union { + struct { + UINT8 TimeoutAction : 3; + UINT8 Reserved1 : 1; + UINT8 PreTimeoutInterrupt : 3; + UINT8 Reserved2 : 1; + } Bits; + UINT8 Uint8; } IPMI_WATCHDOG_TIMER_ACTIONS; =20 // @@ -307,15 +358,22 @@ typedef struct { // // Constants and Structure definitions for "Set BMC Global Enables " comm= and to follow here // +typedef union { + struct { + UINT8 ReceiveMessageQueueInterrupt : 1; + UINT8 EventMessageBufferFullInterrupt : 1; + UINT8 EventMessageBuffer : 1; + UINT8 SystemEventLogging : 1; + UINT8 Reserved : 1; + UINT8 Oem0Enable : 1; + UINT8 Oem1Enable : 1; + UINT8 Oem2Enable : 1; + } Bits; + UINT8 Uint8; +} IPMI_BMC_GLOBAL_ENABLES; + typedef struct { - UINT8 EnableReceiveMessageQueueInterrupt : 1; - UINT8 EnableEventMessageBufferFullInterrupt : 1; - UINT8 EnableEventMessageBuffer : 1; - UINT8 EnableSystemEventLogging : 1; - UINT8 Reserved : 1; - UINT8 Oem0Enable : 1; - UINT8 Oem1Enable : 1; - UINT8 Oem2Enable : 1; + IPMI_BMC_GLOBAL_ENABLES SetEnables; } IPMI_SET_BMC_GLOBAL_ENABLES_REQUEST; =20 // @@ -327,15 +385,8 @@ typedef struct { // Constants and Structure definitions for "Get BMC Global Enables " comm= and to follow here // typedef struct { - UINT8 CompletionCode; - UINT8 ReceiveMessageQueueInterrupt : 1; - UINT8 EventMessageBufferFullInterrupt : 1; - UINT8 EventMessageBuffer : 1; - UINT8 SystemEventLogging : 1; - UINT8 Reserved : 1; - UINT8 Oem0Enable : 1; - UINT8 Oem1Enable : 1; - UINT8 Oem2Enable : 1; + UINT8 CompletionCode; + IPMI_BMC_GLOBAL_ENABLES GetEnables; } IPMI_GET_BMC_GLOBAL_ENABLES_RESPONSE; =20 // @@ -346,15 +397,22 @@ typedef struct { // // Constants and Structure definitions for "Clear Message Flags" command = to follow here // +typedef union { + struct { + UINT8 ReceiveMessageQueue : 1; + UINT8 EventMessageBuffer : 1; + UINT8 Reserved1 : 1; + UINT8 WatchdogPerTimeoutInterrupt : 1; + UINT8 Reserved2 : 1; + UINT8 Oem0 : 1; + UINT8 Oem1 : 1; + UINT8 Oem2 : 1; + } Bits; + UINT8 Uint8; +} IPMI_MESSAGE_FLAGS; + typedef struct { - UINT8 ClearReceiveMessageQueue : 1; - UINT8 ClearEventMessageBuffer : 1; - UINT8 Reserved0 : 1; - UINT8 ClearWatchdogPerTimeoutInterruptFlag : 1; - UINT8 Reserved : 1; - UINT8 ClearOem0Enable : 1; - UINT8 ClearOem1Enable : 1; - UINT8 ClearOem2Enable : 1; + IPMI_MESSAGE_FLAGS ClearFlags; } IPMI_CLEAR_MESSAGE_FLAGS_REQUEST; =20 // @@ -366,15 +424,8 @@ typedef struct { // Constants and Structure definitions for "Get Message Flags" command to= follow here // typedef struct { - UINT8 CompletionCode; - UINT8 ReceiveMessageAvailable : 1; - UINT8 EventMessageBufferFull : 1; - UINT8 Reserved0 : 1; - UINT8 WatchdogPerTimeoutInterruptOccurred : 1; - UINT8 Reserved : 1; - UINT8 Oem0DataAvailable : 1; - UINT8 Oem1DataAvailable : 1; - UINT8 Oem2DataAvailable : 1; + UINT8 CompletionCode; + IPMI_MESSAGE_FLAGS GetFlags; } IPMI_GET_MESSAGE_FLAGS_RESPONSE; =20 // @@ -394,11 +445,18 @@ typedef struct { // // Constants and Structure definitions for "Get Message" command to follo= w here // +typedef union { + struct { + UINT8 ChannelNumber : 4; + UINT8 InferredPrivilegeLevel : 4; + } Bits; + UINT8 Uint8; +} IPMI_GET_MESSAGE_CHANNEL_NUMBER; + typedef struct { - UINT8 CompletionCode; - UINT8 ChannelNumber : 4; - UINT8 InferredPrivilegeLevel : 4; - UINT8 MessageData[0]; + UINT8 CompletionCode; + IPMI_GET_MESSAGE_CHANNEL_NUMBER ChannelNumber; + UINT8 MessageData[0]; } IPMI_GET_MESSAGE_RESPONSE; =20 // @@ -409,13 +467,20 @@ typedef struct { // // Constants and Structure definitions for "Send Message" command to foll= ow here // +typedef union { + struct { + UINT8 ChannelNumber : 4; + UINT8 Authentication : 1; + UINT8 Encryption : 1; + UINT8 Tracking : 2; + } Bits; + UINT8 Uint8; +} IPMI_SEND_MESSAGE_CHANNEL_NUMBER; + typedef struct { - UINT8 CompletionCode; - UINT8 ChannelNumber : 4; - UINT8 Authentication : 1; - UINT8 Encryption : 1; - UINT8 Tracking : 2; - UINT8 MessageData[0]; + UINT8 CompletionCode; + IPMI_SEND_MESSAGE_CHANNEL_NUMBER ChannelNumber; + UINT8 MessageData[0]; } IPMI_SEND_MESSAGE_REQUEST; =20 typedef struct { @@ -545,22 +610,50 @@ typedef struct { #define IPMI_CHANNEL_ACCESS_MODES_ALWAYS_AVAILABLE 0x2 #define IPMI_CHANNEL_ACCESS_MODES_SHARED 0x3 =20 +typedef union { + struct { + UINT8 ChannelNo : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_GET_CHANNEL_ACCESS_CHANNEL_NUMBER; + +typedef union { + struct { + UINT8 Reserved : 6; + UINT8 MemoryType : 2; + } Bits; + UINT8 Uint8; +} IPMI_GET_CHANNEL_ACCESS_TYPE; + typedef struct { - UINT8 ChannelNo : 4; - UINT8 Reserve1 : 4; - UINT8 Reserve2 : 6; - UINT8 MemoryType : 2; + IPMI_GET_CHANNEL_ACCESS_CHANNEL_NUMBER ChannelNumber; + IPMI_GET_CHANNEL_ACCESS_TYPE AccessType; } IPMI_GET_CHANNEL_ACCESS_REQUEST; =20 +typedef union { + struct { + UINT8 AccessMode : 3; + UINT8 UserLevelAuthEnabled : 1; + UINT8 MessageAuthEnable : 1; + UINT8 Alert : 1; + UINT8 Reserved : 2; + } Bits; + UINT8 Uint8; +} IPMI_GET_CHANNEL_ACCESS_CHANNEL_ACCESS; + +typedef union { + struct { + UINT8 ChannelPriviledgeLimit : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_GET_CHANNEL_ACCESS_PRIVILEGE_LIMIT; + typedef struct { - UINT8 CompletionCode; - UINT8 AccessMode : 3; - UINT8 UserLevelAuthEnabled : 1; - UINT8 MessageAuthEnable : 1; - UINT8 Alert : 1; - UINT8 Reserve1 : 2; - UINT8 ChannelPriviledgeLimit : 4; - UINT8 Reserve2 : 4; + UINT8 CompletionCode; + IPMI_GET_CHANNEL_ACCESS_CHANNEL_ACCESS ChannelAccess; + IPMI_GET_CHANNEL_ACCESS_PRIVILEGE_LIMIT PrivilegeLimit; } IPMI_GET_CHANNEL_ACCESS_RESPONSE; =20 // @@ -603,18 +696,46 @@ typedef struct { #define IPMI_CHANNEL_MEDIA_TYPE_OEM_START 0x60 #define IPMI_CHANNEL_MEDIA_TYPE_OEM_END 0x7F =20 +typedef union { + struct { + UINT8 ChannelNo : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_CHANNEL_INFO_CHANNEL_NUMBER; + +typedef union { + struct { + UINT8 ChannelMediumType : 7; + UINT8 Reserved : 1; + } Bits; + UINT8 Uint8; +} IPMI_CHANNEL_INFO_MEDIUM_TYPE; + +typedef union { + struct { + UINT8 ChannelProtocolType : 5; + UINT8 Reserved : 3; + } Bits; + UINT8 Uint8; +} IPMI_CHANNEL_INFO_PROTOCOL_TYPE; + +typedef union { + struct { + UINT8 ActiveSessionCount : 6; + UINT8 SessionSupport : 2; + } Bits; + UINT8 Uint8; +} IPMI_CHANNEL_INFO_SESSION_SUPPORT; + typedef struct { UINT8 CompletionCode; - UINT8 ChannelNo : 4; - UINT8 Reserve1 : 4; - UINT8 ChannelMediumType : 7; - UINT8 Reserve2 : 1; - UINT8 ChannelProtocolType : 5; - UINT8 Reserve3 : 3; - UINT8 ActiveSessionCount : 6; - UINT8 SessionSupport : 2; - UINT8 VendorId[3]; - UINT16 AuxChannelInfo; + IPMI_CHANNEL_INFO_CHANNEL_NUMBER ChannelNumber; + IPMI_CHANNEL_INFO_MEDIUM_TYPE MediumType; + IPMI_CHANNEL_INFO_PROTOCOL_TYPE ProtocolType; + IPMI_CHANNEL_INFO_SESSION_SUPPORT SessionSupport; + UINT8 VendorId[3]; + UINT16 AuxChannelInfo; } IPMI_GET_CHANNEL_INFO_RESPONSE; =20 // @@ -643,26 +764,68 @@ typedef struct { // // Constants and Structure definitions for "Get User Access" command to f= ollow here // +typedef union { + struct { + UINT8 ChannelNo : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_GET_USER_ACCESS_CHANNEL_NUMBER; + +typedef union { + struct { + UINT8 UserId : 6; + UINT8 Reserved : 2; + } Bits; + UINT8 Uint8; +} IPMI_USER_ID; + typedef struct { - UINT8 ChannelNo : 4; - UINT8 Reserved1 : 4; - UINT8 UserId : 6; - UINT8 Reserved2 : 2; + IPMI_GET_USER_ACCESS_CHANNEL_NUMBER ChannelNumber; + IPMI_USER_ID UserId; } IPMI_GET_USER_ACCESS_REQUEST; =20 +typedef union { + struct { + UINT8 MaxUserId : 6; + UINT8 Reserved : 2; + } Bits; + UINT8 Uint8; +} IPMI_GET_USER_ACCESS_MAX_USER_ID; + +typedef union { + struct { + UINT8 CurrentUserId : 6; + UINT8 UserIdEnableStatus : 2; + } Bits; + UINT8 Uint8; +} IPMI_GET_USER_ACCESS_CURRENT_USER; + +typedef union { + struct { + UINT8 FixedUserId : 6; + UINT8 Reserved : 2; + } Bits; + UINT8 Uint8; +} IPMI_GET_USER_ACCESS_FIXED_NAME_USER; + +typedef union { + struct { + UINT8 UserPrivilegeLimit : 4; + UINT8 EnableIpmiMessaging : 1; + UINT8 EnableUserLinkAuthetication : 1; + UINT8 UserAccessAvailable : 1; + UINT8 Reserved : 1; + } Bits; + UINT8 Uint8; +} IPMI_GET_USER_ACCESS_CHANNEL_ACCESS; + typedef struct { - UINT8 CompletionCode; - UINT8 MaxUserId : 6; - UINT8 Reserved1 : 2; - UINT8 CurrentUserId : 6; - UINT8 UserIdEnableStatus : 2; - UINT8 FixedUserId : 6; - UINT8 Reserved2 : 2; - UINT8 UserPrivilegeLimit : 4; - UINT8 EnableIpmiMessaging : 1; - UINT8 EnableUserLinkAuthetication : 1; - UINT8 UserAccessAvailable : 1; - UINT8 Reserved3 : 1; + UINT8 CompletionCode; + IPMI_GET_USER_ACCESS_MAX_USER_ID MaxUserId; + IPMI_GET_USER_ACCESS_CURRENT_USER CurrentUser; + IPMI_GET_USER_ACCESS_FIXED_NAME_USER FixedNameUser; + IPMI_GET_USER_ACCESS_CHANNEL_ACCESS ChannelAccess; } IPMI_GET_USER_ACCESS_RESPONSE; =20 // @@ -674,9 +837,8 @@ typedef struct { // Constants and Structure definitions for "Set User Name" command to fol= low here // typedef struct { - UINT8 UserId : 6; - UINT8 Reserved : 2; - UINT8 UserName[16]; + IPMI_USER_ID UserId; + UINT8 UserName[16]; } IPMI_SET_USER_NAME_REQUEST; =20 // @@ -688,8 +850,7 @@ typedef struct { // Constants and Structure definitions for "Get User Name" command to fol= low here // typedef struct { - UINT8 UserId : 6; - UINT8 Reserved : 2; + IPMI_USER_ID UserId; } IPMI_GET_USER_NAME_REQUEST; =20 typedef struct { @@ -720,13 +881,27 @@ typedef struct { #define IPMI_SET_USER_PASSWORD_PASSWORD_SIZE_16 0x0 #define IPMI_SET_USER_PASSWORD_PASSWORD_SIZE_20 0x1 =20 +typedef union { + struct { + UINT8 UserId : 6; + UINT8 Reserved : 1; + UINT8 PasswordSize : 1; + } Bits; + UINT8 Uint8; +} IPMI_SET_USER_PASSWORD_USER_ID; + +typedef union { + struct { + UINT8 Operation : 2; + UINT8 Reserved : 6; + } Bits; + UINT8 Uint8; +} IPMI_SET_USER_PASSWORD_OPERATION; + typedef struct { - UINT8 UserId : 6; - UINT8 Reserved1 : 1; - UINT8 PasswordSize : 1; - UINT8 Operation : 2; - UINT8 Reserved2 : 6; - UINT8 PasswordData[0]; // 16 or 20 bytes, depending on the 'PasswordS= ize' field + IPMI_SET_USER_PASSWORD_USER_ID UserId; + IPMI_SET_USER_PASSWORD_OPERATION Operation; + UINT8 PasswordData[0]; // 16 or 20 bytes, d= epending on the 'PasswordSize' field } IPMI_SET_USER_PASSWORD_REQUEST; =20 // diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h b/MdePkg/In= clude/IndustryStandard/IpmiNetFnChassis.h index bbc5bf0db3..28d4823235 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h @@ -72,9 +72,16 @@ typedef struct { // // Constants and Structure definitions for "Chassis Control" command to f= ollow here // +typedef union { + struct { + UINT8 ChassisControl:4; + UINT8 Reserved:4; + } Bits; + UINT8 Uint8; +} IPMI_CHASSIS_CONTROL_CHASSIS_CONTROL; + typedef struct { - UINT8 ChassisControl:4; - UINT8 Reserved:4; + IPMI_CHASSIS_CONTROL_CHASSIS_CONTROL ChassisControl; } IPMI_CHASSIS_CONTROL_REQUEST; =20 // @@ -112,9 +119,16 @@ typedef struct { // // Constants and Structure definitions for "Set Power Restore Policy" com= mand to follow here // +typedef union { + struct { + UINT8 PowerRestorePolicy : 3; + UINT8 Reserved : 5; + } Bits; + UINT8 Uint8; +} IPMI_POWER_RESTORE_POLICY; + typedef struct { - UINT8 PowerRestorePolicy:3; - UINT8 Reserved:5; + IPMI_POWER_RESTORE_POLICY PowerRestorePolicy; } IPMI_SET_POWER_RESTORE_POLICY_REQUEST; =20 typedef struct { @@ -130,26 +144,31 @@ typedef struct { // // Constants and Structure definitions for "Get System Restart Cause" com= mand 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; =20 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; =20 // @@ -160,10 +179,17 @@ typedef struct { // // Constants and Structure definitions for "Set System boot options" comm= and 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[1]; } IPMI_SET_BOOT_OPTIONS_REQUEST; =20 // @@ -174,11 +200,18 @@ typedef struct { // // Constants and Structure definitions for "Get System boot options" comm= and 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; =20 typedef struct { @@ -217,24 +250,33 @@ typedef struct { // // 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; =20 typedef struct { UINT8 ServicePartitionSelector; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1; =20 -typedef struct { - UINT8 ServicePartitionDiscovered:1; - UINT8 ServicePartitionScanRequest:1; - UINT8 Reserved: 5; +typedef union { + struct { + UINT8 ServicePartitionDiscovered : 1; + UINT8 ServicePartitionScanRequest : 1; + UINT8 Reserved: 5; + } Bits; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2; =20 -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; =20 typedef struct { @@ -267,49 +309,76 @@ typedef struct { #define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_BMC 0x01 #define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_SYSTEM 0x02 =20 +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:5; - UINT8 BiosBootType:1; - 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:3; - UINT8 BiosSharedModeOverride:1; - UINT8 Reserved1:4; - // - // Data 5 - // - UINT8 DeviceInstanceSelector:5; - UINT8 Reserved2:3; + 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; =20 +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; =20 typedef struct { @@ -328,13 +397,27 @@ typedef union { IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7 Parm7; } IPMI_BOOT_OPTIONS_PARAMETERS; =20 +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[1]; } IPMI_GET_BOOT_OPTIONS_RESPONSE; =20 // @@ -342,17 +425,23 @@ typedef struct { // #define IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES 0x0A =20 -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 enable= s" 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; =20 // // Definitions for Set Power Cycle Interval command diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h b/MdePkg/In= clude/IndustryStandard/IpmiNetFnStorage.h index fe5ed38179..548339286f 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h @@ -121,20 +121,27 @@ typedef struct { // // Constants and Structure definitions for "Get SDR Repository Info" comm= and to follow here // +typedef union { + struct { + UINT8 SdrRepAllocInfoCmd : 1; + UINT8 SdrRepReserveCmd : 1; + UINT8 PartialAddSdrCmd : 1; + UINT8 DeleteSdrRepCmd : 1; + UINT8 Reserved : 1; + UINT8 SdrRepUpdateOp : 2; + UINT8 Overflow : 1; + } Bits; + UINT8 Uint8; +} IPMI_SDR_OPERATION_SUPPORT; + typedef struct { - UINT8 CompletionCode; - UINT8 Version; - UINT16 RecordCount; - UINT16 FreeSpace; - UINT32 RecentAdditionTimeStamp; - UINT32 RecentEraseTimeStamp; - UINT8 SdrRepAllocInfoCmd : 1; - UINT8 SdrRepReserveCmd : 1; - UINT8 PartialAddSdrCmd : 1; - UINT8 DeleteSdrRepCmd : 1; - UINT8 Reserved : 1; - UINT8 SdrRepUpdateOp : 2; - UINT8 Overflow : 1; + UINT8 CompletionCode; + UINT8 Version; + UINT16 RecordCount; + UINT16 FreeSpace; + UINT32 RecentAdditionTimeStamp; + UINT32 RecentEraseTimeStamp; + IPMI_SDR_OPERATION_SUPPORT OperationSupport; } IPMI_GET_SDR_REPOSITORY_INFO_RESPONSE; =20 // @@ -167,125 +174,179 @@ typedef struct { // // Constants and Structure definitions for "Get SDR" command to follow he= re // +typedef union { + struct { + UINT8 EventScanningEnabled : 1; + UINT8 EventScanningDisabled : 1; + UINT8 InitSensorType : 1; + UINT8 InitHysteresis : 1; + UINT8 InitThresholds : 1; + UINT8 InitEvent : 1; + UINT8 InitScanning : 1; + UINT8 SettableSensor : 1; + } Bits; + UINT8 Uint8; +} IPMI_SDR_RECORD_SENSOR_INIT; =20 -typedef struct { - UINT16 RecordId; // 1 - UINT8 Version; // 3 - UINT8 RecordType; // 4 - UINT8 RecordLength; // 5 - UINT8 OwnerId; // 6 - UINT8 OwnerLun; // 7 - UINT8 SensorNumber; // 8 - UINT8 EntityId; // 9 - UINT8 EntityInstance; // 10 - UINT8 EventScanningEnabled : 1; // 11 - UINT8 EventScanningDisabled : 1; // 11 - UINT8 InitSensorType : 1; // 11 - UINT8 InitHysteresis : 1; // 11 - UINT8 InitThresholds : 1; // 11 - UINT8 InitEvent : 1; // 11 - UINT8 InitScanning : 1; // 11 - UINT8 Reserved : 1; // 11 - UINT8 EventMessageControl : 2; // 12 - UINT8 ThresholdAccessSupport : 2; // 12 - UINT8 HysteresisSupport : 2; // 12 - UINT8 ReArmSupport : 1; // 12 - UINT8 IgnoreSensor : 1; // 12 - UINT8 SensorType; // 13 - UINT8 EventType; // 14 - UINT8 Reserved1[7]; // 15 - UINT8 UnitType; // 22 - UINT8 Reserved2; // 23 - UINT8 Linearization : 7; // 24 - UINT8 Reserved3 : 1; // 24 - UINT8 MLo; // 25 - UINT8 Toleremce : 6; // 26 - UINT8 MHi : 2; // 26 - UINT8 BLo; // 27 - UINT8 AccuracyLow : 6; // 28 - UINT8 BHi : 2; // 28 - UINT8 Reserved4 : 2; // 29 - UINT8 AccuracyExp : 2; // 29 - UINT8 AccuracyHi : 4; // 29 - UINT8 BExp : 4; // 30 - UINT8 RExp : 4; // 30 - UINT8 NominalReadingSpscified : 1; // 31 - UINT8 NominalMaxSpscified : 1; // 31 - UINT8 NominalMinSpscified : 1; // 31 - UINT8 Reserved5 : 5; // 31 - UINT8 NominalReading; // 32 - UINT8 Reserved6[4]; // 33 - UINT8 UpperNonRecoverThreshold; // 37 - UINT8 UpperCriticalThreshold; // 38 - UINT8 UpperNonCriticalThreshold; // 39 - UINT8 LowerNonRecoverThreshold; // 40 - UINT8 LowerCriticalThreshold; // 41 - UINT8 LowerNonCriticalThreshold; // 42 - UINT8 Reserved7[5]; // 43 - UINT8 IdStringLength; // 48 - UINT8 AsciiIdString[16]; // 49 - 64 +typedef union { + struct { + UINT8 EventMessageControl : 2; + UINT8 ThresholdAccessSupport : 2; + UINT8 HysteresisSupport : 2; + UINT8 ReArmSupport : 1; + UINT8 IgnoreSensor : 1; + } Bits; + UINT8 Uint8; +} IPMI_SDR_RECORD_SENSOR_CAP; + +typedef union { + struct { + UINT8 Linearization : 7; + UINT8 Reserved : 1; + } Bits; + UINT8 Uint8; +} IPMI_SDR_RECORD_LINEARIZATION; + +typedef union { + struct { + UINT8 Toleremce : 6; + UINT8 MHi : 2; + } Bits; + UINT8 Uint8; +} IPMI_SDR_RECORD_M_TOLERANCE; + +typedef union { + struct { + UINT8 AccuracyLow : 6; + UINT8 BHi : 2; + } Bits; + UINT8 Uint8; +} IPMI_SDR_RECORD_B_ACCURACY; + +typedef union { + struct { + UINT8 Reserved : 2; + UINT8 AccuracyExp : 2; + UINT8 AccuracyHi : 4; + } Bits; + UINT8 Uint8; +} IPMI_SDR_RECORD_ACCURACY_SENSOR_DIR; + +typedef union { + struct { + UINT8 BExp : 4; + UINT8 RExp : 4; + } Bits; + UINT8 Uint8; +} IPMI_SDR_RECORD_R_EXP_B_EXP; + +typedef union { + struct { + UINT8 NominalReadingSpscified : 1; + UINT8 NominalMaxSpscified : 1; + UINT8 NominalMinSpscified : 1; + UINT8 Reserved : 5; + } Bits; + UINT8 Uint8; +} IPMI_SDR_RECORD_ANALOG_FLAGS; + +typedef struct { + UINT16 RecordId; // 1 + UINT8 Version; // 3 + UINT8 RecordType; // 4 + UINT8 RecordLength; // 5 + UINT8 OwnerId; // 6 + UINT8 OwnerLun; // 7 + UINT8 SensorNumber; // 8 + UINT8 EntityId; // 9 + UINT8 EntityInstance; // 10 + IPMI_SDR_RECORD_SENSOR_INIT SensorInitialization; // 11 + IPMI_SDR_RECORD_SENSOR_CAP SensorCapabilities; // 12 + UINT8 SensorType; // 13 + UINT8 EventType; // 14 + UINT8 Reserved1[7]; // 15 + UINT8 UnitType; // 22 + UINT8 Reserved2; // 23 + IPMI_SDR_RECORD_LINEARIZATION Linearization; // 24 + UINT8 MLo; // 25 + IPMI_SDR_RECORD_M_TOLERANCE MHiTolerance; // 26 + UINT8 BLo; // 27 + IPMI_SDR_RECORD_B_ACCURACY BHiAccuracyLo; // 28 + IPMI_SDR_RECORD_ACCURACY_SENSOR_DIR AccuracySensorDirection; // 29 + IPMI_SDR_RECORD_R_EXP_B_EXP RExpBExp; // 30 + IPMI_SDR_RECORD_ANALOG_FLAGS AnalogFlags; // 31 + UINT8 NominalReading; // 32 + UINT8 Reserved3[4]; // 33 + UINT8 UpperNonRecoverThreshold; // 37 + UINT8 UpperCriticalThreshold; // 38 + UINT8 UpperNonCriticalThreshold; // 39 + UINT8 LowerNonRecoverThreshold; // 40 + UINT8 LowerCriticalThreshold; // 41 + UINT8 LowerNonCriticalThreshold; // 42 + UINT8 Reserved4[5]; // 43 + UINT8 IdStringLength; // 48 + UINT8 AsciiIdString[16]; // 49 - 64 } IPMI_SDR_RECORD_STRUCT_1; =20 typedef struct { - UINT16 RecordId; // 1 - UINT8 Version; // 3 - UINT8 RecordType; // 4 - UINT8 RecordLength; // 5 - UINT8 OwnerId; // 6 - UINT8 OwnerLun; // 7 - UINT8 SensorNumber; // 8 - UINT8 EntityId; // 9 - UINT8 EntityInstance; // 10 - UINT8 SensorScanning : 1; // 11 - UINT8 EventScanning : 1; // 11 - UINT8 InitSensorType : 1; // 11 - UINT8 InitHysteresis : 1; // 11 - UINT8 InitThresholds : 1; // 11 - UINT8 InitEvent : 1; // 11 - UINT8 InitScanning : 1; // 11 - UINT8 Reserved : 1; // 11 - UINT8 EventMessageControl : 2; // 12 - UINT8 ThresholdAccessSupport : 2; // 12 - UINT8 HysteresisSupport : 2; // 12 - UINT8 ReArmSupport : 1; // 12 - UINT8 IgnoreSensor : 1; // 12 - UINT8 SensorType; // 13 - UINT8 EventType; // 14 - UINT8 Reserved1[7]; // 15 - UINT8 UnitType; // 22 - UINT8 Reserved2[9]; // 23 - UINT8 IdStringLength; // 32 - UINT8 AsciiIdString[16]; // 33 - 48 + UINT16 RecordId; // 1 + UINT8 Version; // 3 + UINT8 RecordType; // 4 + UINT8 RecordLength; // 5 + UINT8 OwnerId; // 6 + UINT8 OwnerLun; // 7 + UINT8 SensorNumber; // 8 + UINT8 EntityId; // 9 + UINT8 EntityInstance; // 10 + IPMI_SDR_RECORD_SENSOR_INIT SensorInitialization; // 11 + IPMI_SDR_RECORD_SENSOR_CAP SensorCapabilities; // 12 + UINT8 SensorType; // 13 + UINT8 EventType; // 14 + UINT8 Reserved1[7]; // 15 + UINT8 UnitType; // 22 + UINT8 Reserved2[9]; // 23 + UINT8 IdStringLength; // 32 + UINT8 AsciiIdString[16]; // 33 - 48 } IPMI_SDR_RECORD_STRUCT_2; =20 -typedef struct { - UINT8 Reserved1 : 1; - UINT8 ControllerSlaveAddress : 7; - UINT8 FruDeviceId; - UINT8 BusId : 3; - UINT8 Lun : 2; - UINT8 Reserved : 2; - UINT8 LogicalFruDevice : 1; - UINT8 Reserved3 : 4; - UINT8 ChannelNumber : 4; +typedef union { + struct { + UINT8 Reserved1 : 1; + UINT8 ControllerSlaveAddress : 7; + UINT8 FruDeviceId; + UINT8 BusId : 3; + UINT8 Lun : 2; + UINT8 Reserved2 : 2; + UINT8 LogicalFruDevice : 1; + UINT8 Reserved3 : 4; + UINT8 ChannelNumber : 4; + } Bits; + UINT32 Uint32; } IPMI_FRU_DATA_INFO; =20 -typedef struct { - UINT16 RecordId; // 1 - UINT8 Version; // 3 - UINT8 RecordType; // 4 - UINT8 RecordLength; // 5 - IPMI_FRU_DATA_INFO FruDeviceData; // 6 - UINT8 Reserved1; // 10 - UINT8 DeviceType; // 11 - UINT8 DeviceTypeModifier; // 12 - UINT8 FruEntityId; // 13 - UINT8 FruEntityInstance; // 14 - UINT8 OemReserved; // 15 - UINT8 Length : 4; // 16 - UINT8 Reserved2 : 1; // 16 - UINT8 StringType : 3; // 16 - UINT8 String[16]; // 17 +typedef union { + struct { + UINT8 Length : 4; + UINT8 Reserved : 1; + UINT8 StringType : 3; + } Bits; + UINT8 Uint8; +} IPMI_SDR_RECORD_DEV_ID_STR_TYPE_LENGTH; + +typedef struct { + UINT16 RecordId; // 1 + UINT8 Version; // 3 + UINT8 RecordType; // 4 + UINT8 RecordLength; // 5 + IPMI_FRU_DATA_INFO FruDeviceData; // 6 + UINT8 Reserved; // 10 + UINT8 DeviceType; // 11 + UINT8 DeviceTypeModifier; // 12 + UINT8 FruEntityId; // 13 + UINT8 FruEntityInstance; // 14 + UINT8 OemReserved; // 15 + IPMI_SDR_RECORD_DEV_ID_STR_TYPE_LENGTH StringTypeLength; // 16 + UINT8 String[16]; // 17 } IPMI_SDR_RECORD_STRUCT_11; =20 typedef struct { diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h b/MdePkg/= Include/IndustryStandard/IpmiNetFnTransport.h index 28ede2f63a..9a5da6a12f 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h @@ -109,23 +109,29 @@ typedef enum { IpmiOem2 } IPMI_LAN_DEST_TYPE_DEST_TYPE; =20 -typedef struct { - UINT8 NoAuth : 1; - UINT8 MD2Auth : 1; - UINT8 MD5Auth : 1; - UINT8 Reserved1 : 1; - UINT8 StraightPswd : 1; - UINT8 OemType : 1; - UINT8 Reserved2 : 2; +typedef union { + struct { + UINT8 NoAuth : 1; + UINT8 MD2Auth : 1; + UINT8 MD5Auth : 1; + UINT8 Reserved1 : 1; + UINT8 StraightPswd : 1; + UINT8 OemType : 1; + UINT8 Reserved2 : 2; + } Bits; + UINT8 Uint8; } IPMI_LAN_AUTH_TYPE; =20 typedef struct { UINT8 IpAddress[4]; } IPMI_LAN_IP_ADDRESS; =20 -typedef struct { - UINT8 AddressSrc : 4; - UINT8 Reserved : 4; +typedef union { + struct { + UINT8 AddressSrc : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; } IPMI_LAN_IP_ADDRESS_SRC; =20 typedef struct { @@ -136,13 +142,27 @@ typedef struct { UINT8 IpAddress[4]; } IPMI_LAN_SUBNET_MASK; =20 -typedef struct { - UINT8 TimeToLive; - UINT8 IpFlag : 3; - UINT8 Reserved1 : 5; - UINT8 Precedence : 3; - UINT8 Reserved2 : 1; - UINT8 ServiceType : 4; +typedef union { + struct { + UINT8 IpFlag : 3; + UINT8 Reserved : 5; + } Bits; + UINT8 Uint8; +} IPMI_LAN_IPV4_HDR_PARAM_DATA_2; + +typedef union { + struct { + UINT8 Precedence : 3; + UINT8 Reserved : 1; + UINT8 ServiceType : 4; + } Bits; + UINT8 Uint8; +} IPMI_LAN_IPV4_HDR_PARAM_DATA_3; + +typedef struct { + UINT8 TimeToLive; + IPMI_LAN_IPV4_HDR_PARAM_DATA_2 Data2; + IPMI_LAN_IPV4_HDR_PARAM_DATA_3 Data3; } IPMI_LAN_IPV4_HDR_PARAM; =20 typedef struct { @@ -150,10 +170,13 @@ typedef struct { UINT8 RcmpPortLsb; } IPMI_LAN_RCMP_PORT; =20 -typedef struct { - UINT8 EnableBmcArpResponse : 1; - UINT8 EnableBmcGratuitousArp : 1; - UINT8 Reserved : 6; +typedef union { + struct { + UINT8 EnableBmcArpResponse : 1; + UINT8 EnableBmcGratuitousArp : 1; + UINT8 Reserved : 6; + } Bits; + UINT8 Uint8; } IPMI_LAN_BMC_GENERATED_ARP_CONTROL; =20 typedef struct { @@ -164,23 +187,50 @@ typedef struct { UINT8 Data[18]; } IPMI_LAN_COMMUNITY_STRING; =20 +typedef union { + struct { + UINT8 DestinationSelector : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_LAN_SET_SELECTOR; + +typedef union { + struct { + UINT8 DestinationType : 3; + UINT8 Reserved : 4; + UINT8 AlertAcknowledged : 1; + } Bits; + UINT8 Uint8; +} IPMI_LAN_DEST_TYPE_DESTINATION_TYPE; + typedef struct { - UINT8 DestinationSelector : 4; - UINT8 Reserved2 : 4; - UINT8 DestinationType : 3; - UINT8 Reserved1 : 4; - UINT8 AlertAcknowledged : 1; + IPMI_LAN_SET_SELECTOR SetSelector; + IPMI_LAN_DEST_TYPE_DESTINATION_TYPE DestinationType; } IPMI_LAN_DEST_TYPE; =20 -typedef struct { - UINT8 DestinationSelector : 4; - UINT8 Reserved1 : 4; - UINT8 AlertingIpAddressSelector : 4; - UINT8 AddressFormat : 4; - UINT8 UseDefaultGateway : 1; - UINT8 Reserved2 : 7; - IPMI_LAN_IP_ADDRESS AlertingIpAddress; - IPMI_LAN_MAC_ADDRESS AlertingMacAddress; +typedef union { + struct { + UINT8 AlertingIpAddressSelector : 4; + UINT8 AddressFormat : 4; + } Bits; + UINT8 Uint8; +} IPMI_LAN_ADDRESS_FORMAT; + +typedef union { + struct { + UINT8 UseDefaultGateway : 1; + UINT8 Reserved2 : 7; + } Bits; + UINT8 Uint8; +} IPMI_LAN_GATEWAY_SELECTOR; + +typedef struct { + IPMI_LAN_SET_SELECTOR SetSelector; + IPMI_LAN_ADDRESS_FORMAT AddressFormat; + IPMI_LAN_GATEWAY_SELECTOR GatewaySelector; + IPMI_LAN_IP_ADDRESS AlertingIpAddress; + IPMI_LAN_MAC_ADDRESS AlertingMacAddress; } IPMI_LAN_DEST_ADDRESS; =20 typedef union { @@ -198,30 +248,46 @@ typedef union { IPMI_LAN_DEST_ADDRESS IpmiLanDestAddress; } IPMI_LAN_OPTIONS; =20 -typedef struct { - UINT8 SetSelector; - UINT8 AddressSourceType : 4; - UINT8 Reserved : 3; - UINT8 EnableStatus : 1; - UINT8 Ipv6Address[16]; - UINT8 AddressPrefixLen; - UINT8 AddressStatus; +typedef union { + struct { + UINT8 AddressSourceType : 4; + UINT8 Reserved : 3; + UINT8 EnableStatus : 1; + } Bits; + UINT8 Uint8; +} IPMI_LAN_IPV6_ADDRESS_SOURCE_TYPE; + +typedef struct { + UINT8 SetSelector; + IPMI_LAN_IPV6_ADDRESS_SOURCE_TYPE AddressSourceType; + UINT8 Ipv6Address[16]; + UINT8 AddressPrefixLen; + UINT8 AddressStatus; } IPMI_LAN_IPV6_STATIC_ADDRESS; =20 // // Set in progress parameter // -typedef struct { - UINT8 SetInProgress:2; - UINT8 Reserved:6; +typedef union { + struct { + UINT8 SetInProgress:2; + UINT8 Reserved:6; + } Bits; + UINT8 Uint8; } IPMI_LAN_SET_IN_PROGRESS; =20 +typedef union { + struct { + UINT8 ChannelNo : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_SET_LAN_CONFIG_CHANNEL_NUM; =20 typedef struct { - UINT8 ChannelNo : 4; - UINT8 Reserved : 4; - UINT8 ParameterSelector; - UINT8 ParameterData[0]; + IPMI_SET_LAN_CONFIG_CHANNEL_NUM ChannelNumber; + UINT8 ParameterSelector; + UINT8 ParameterData[0]; } IPMI_SET_LAN_CONFIGURATION_PARAMETERS_COMMAND_REQUEST; =20 // @@ -232,13 +298,20 @@ typedef struct { // // Constants and Structure definitions for "Get Lan Configuration Paramet= ers" command to follow here // -typedef struct { - UINT8 ChannelNo : 4; - UINT8 Reserved : 3; - UINT8 GetParameter : 1; - UINT8 ParameterSelector; - UINT8 SetSelector; - UINT8 BlockSelector; +typedef union { + struct { + UINT8 ChannelNo : 4; + UINT8 Reserved : 3; + UINT8 GetParameter : 1; + } Bits; + UINT8 Uint8; +} IPMI_GET_LAN_CONFIG_CHANNEL_NUM; + +typedef struct { + IPMI_GET_LAN_CONFIG_CHANNEL_NUM ChannelNumber; + UINT8 ParameterSelector; + UINT8 SetSelector; + UINT8 BlockSelector; } IPMI_GET_LAN_CONFIGURATION_PARAMETERS_REQUEST; =20 typedef struct { @@ -281,67 +354,100 @@ typedef struct { // // EMP OPTION DATA // -typedef struct { - UINT8 NoAuthentication : 1; - UINT8 MD2Authentication : 1; - UINT8 MD5Authentication : 1; - UINT8 Reserved1 : 1; - UINT8 StraightPassword : 1; - UINT8 OemProprietary : 1; - UINT8 Reservd2 : 2; +typedef union { + struct { + UINT8 NoAuthentication : 1; + UINT8 MD2Authentication : 1; + UINT8 MD5Authentication : 1; + UINT8 Reserved1 : 1; + UINT8 StraightPassword : 1; + UINT8 OemProprietary : 1; + UINT8 Reservd2 : 2; + } Bits; + UINT8 Uint8; } IPMI_EMP_AUTH_TYPE; =20 -typedef struct { - UINT8 EnableBasicMode : 1; - UINT8 EnablePPPMode : 1; - UINT8 EnableTerminalMode : 1; - UINT8 Reserved1 : 2; - UINT8 SnoopOsPPPNegotiation : 1; - UINT8 Reserved2 : 1; - UINT8 DirectConnect : 1; +typedef union { + struct { + UINT8 EnableBasicMode : 1; + UINT8 EnablePPPMode : 1; + UINT8 EnableTerminalMode : 1; + UINT8 Reserved1 : 2; + UINT8 SnoopOsPPPNegotiation : 1; + UINT8 Reserved2 : 1; + UINT8 DirectConnect : 1; + } Bits; + UINT8 Uint8; } IPMI_EMP_CONNECTION_TYPE; =20 -typedef struct { - UINT8 InactivityTimeout : 4; - UINT8 Reserved : 4; +typedef union { + struct { + UINT8 InactivityTimeout : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; } IPMI_EMP_INACTIVITY_TIMEOUT; =20 -typedef struct { - UINT8 IpmiCallback : 1; - UINT8 CBCPCallback : 1; - UINT8 Reserved1 : 6; - UINT8 CbcpEnableNoCallback : 1; - UINT8 CbcpEnablePreSpecifiedNumber : 1; - UINT8 CbcpEnableUserSpecifiedNumber : 1; - UINT8 CbcpEnableCallbackFromList : 1; - UINT8 Reserved : 4; - UINT8 CallbackDestination1; - UINT8 CallbackDestination2; - UINT8 CallbackDestination3; +typedef union { + struct { + UINT8 IpmiCallback : 1; + UINT8 CBCPCallback : 1; + UINT8 Reserved : 6; + } Bits; + UINT8 Uint8; +} IPMI_CHANNEL_CALLBACK_CONTROL_ENABLE; + +typedef union { + struct { + UINT8 CbcpEnableNoCallback : 1; + UINT8 CbcpEnablePreSpecifiedNumber : 1; + UINT8 CbcpEnableUserSpecifiedNumber : 1; + UINT8 CbcpEnableCallbackFromList : 1; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_CHANNEL_CALLBACK_CONTROL_CBCP; + +typedef struct { + IPMI_CHANNEL_CALLBACK_CONTROL_ENABLE CallbackEnable; + IPMI_CHANNEL_CALLBACK_CONTROL_CBCP CBCPNegotiation; + UINT8 CallbackDestination1; + UINT8 CallbackDestination2; + UINT8 CallbackDestination3; } IPMI_EMP_CHANNEL_CALLBACK_CONTROL; =20 -typedef struct { - UINT8 CloseSessionOnDCDLoss : 1; - UINT8 EnableSessionInactivityTimeout : 1; - UINT8 Reserved : 6; +typedef union { + struct { + UINT8 CloseSessionOnDCDLoss : 1; + UINT8 EnableSessionInactivityTimeout : 1; + UINT8 Reserved : 6; + } Bits; + UINT8 Uint8; } IPMI_EMP_SESSION_TERMINATION; =20 -typedef struct { - UINT8 Reserved1 : 5; - UINT8 EnableDtrHangup : 1; - UINT8 FlowControl : 2; - UINT8 BitRate : 4; - UINT8 Reserved2 : 4; - UINT8 SaveSetting : 1; - UINT8 SetComPort : 1; - UINT8 Reserved3 : 6; +typedef union { + struct { + UINT8 Reserved1 : 5; + UINT8 EnableDtrHangup : 1; + UINT8 FlowControl : 2; + UINT8 BitRate : 4; + UINT8 Reserved2 : 4; + UINT8 SaveSetting : 1; + UINT8 SetComPort : 1; + UINT8 Reserved3 : 6; + } Bits; + UINT8 Uint8; + UINT16 Uint16; } IPMI_EMP_MESSAGING_COM_SETTING; =20 -typedef struct { - UINT8 RingDurationInterval : 6; - UINT8 Reserved1 : 2; - UINT8 RingDeadTime : 4; - UINT8 Reserved : 4; +typedef union { + struct { + UINT8 RingDurationInterval : 6; + UINT8 Reserved1 : 2; + UINT8 RingDeadTime : 4; + UINT8 Reserved2 : 4; + } Bits; + UINT8 Uint8; } IPMI_EMP_MODEM_RING_TIME; =20 typedef struct { @@ -369,14 +475,20 @@ typedef struct { UINT8 CommunityString[18]; } IPMI_EMP_COMMUNITY_STRING; =20 -typedef struct { - UINT8 Reserved5 : 4; - UINT8 DialStringSelector : 4; +typedef union { + struct { + UINT8 Reserved : 4; + UINT8 DialStringSelector : 4; + } Bits; + UINT8 Uint8; } IPMI_DIAL_PAGE_DESTINATION; =20 -typedef struct { - UINT8 TapAccountSelector : 4; - UINT8 Reserved : 4; +typedef union { + struct { + UINT8 TapAccountSelector : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; } IPMI_TAP_PAGE_DESTINATION; =20 typedef struct { @@ -390,40 +502,78 @@ typedef union { IPMI_PPP_ALERT_DESTINATION PppAlertDestination; } IPMI_DEST_TYPE_SPECIFIC; =20 -typedef struct { - UINT8 DestinationSelector : 4; - UINT8 Reserved1 : 4; - UINT8 DestinationType : 4; - UINT8 Reserved2 : 3; - UINT8 AlertAckRequired : 1; - UINT8 AlertAckTimeoutSeconds; - UINT8 NumRetriesCall : 3; - UINT8 Reserved3 : 1; - UINT8 NumRetryAlert : 3; - UINT8 Reserved4 : 1; - IPMI_DEST_TYPE_SPECIFIC DestinationTypeSpecific; +typedef union { + struct { + UINT8 DestinationSelector : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_EMP_DESTINATION_SELECTOR; + +typedef union { + struct { + UINT8 DestinationType : 4; + UINT8 Reserved : 3; + UINT8 AlertAckRequired : 1; + } Bits; + UINT8 Uint8; +} IPMI_EMP_DESTINATION_TYPE; + +typedef union { + struct { + UINT8 NumRetriesCall : 3; + UINT8 Reserved1 : 1; + UINT8 NumRetryAlert : 3; + UINT8 Reserved2 : 1; + } Bits; + UINT8 Uint8; +} IPMI_EMP_RETRIES; + +typedef struct { + IPMI_EMP_DESTINATION_SELECTOR DestinationSelector; + IPMI_EMP_DESTINATION_TYPE DestinationType; + UINT8 AlertAckTimeoutSeconds; + IPMI_EMP_RETRIES Retries; + IPMI_DEST_TYPE_SPECIFIC DestinationTypeSpecific; } IPMI_EMP_DESTINATION_INFO; =20 +typedef union { + struct { + UINT8 Parity : 3; + UINT8 CharacterSize : 1; + UINT8 StopBit : 1; + UINT8 DtrHangup : 1; + UINT8 FlowControl : 2; + } Bits; + UINT8 Uint8; +} IPMI_EMP_DESTINATION_COM_SETTING_DATA_2; + +typedef union { + struct { + UINT8 BitRate : 4; + UINT8 Reserved2 : 4; + } Bits; + UINT8 Uint8; +} IPMI_EMP_BIT_RATE; + typedef struct { - UINT8 DestinationSelector : 4; - UINT8 Reserved1 : 4; - UINT8 Parity : 3; - UINT8 CharacterSize : 1; - UINT8 StopBit : 1; - UINT8 DtrHangup : 1; - UINT8 FlowControl : 2; - UINT8 BitRate : 4; - UINT8 Reserved2 : 4; - UINT8 SaveSetting : 1; - UINT8 SetComPort : 1; - UINT8 Reserved3 : 6; + IPMI_EMP_DESTINATION_SELECTOR DestinationSelector; + IPMI_EMP_DESTINATION_COM_SETTING_DATA_2 Data2; + IPMI_EMP_BIT_RATE BitRate; } IPMI_EMP_DESTINATION_COM_SETTING; =20 +typedef union { + struct { + UINT8 DialStringSelector : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_DIAL_STRING_SELECTOR; + typedef struct { - UINT8 DialStringSelector : 4; - UINT8 Reserved1 : 4; - UINT8 Reserved2; - UINT8 DialString[48]; + IPMI_DIAL_STRING_SELECTOR DestinationSelector; + UINT8 Reserved; + UINT8 DialString[48]; } IPMI_DESTINATION_DIAL_STRING; =20 typedef union { @@ -431,16 +581,31 @@ typedef union { UINT8 IpAddress[4]; } IPMI_PPP_IP_ADDRESS; =20 +typedef union { + struct { + UINT8 IpAddressSelector : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_DESTINATION_IP_ADDRESS_SELECTOR; + typedef struct { - UINT8 IpAddressSelector : 4; - UINT8 Reserved1 : 4; - IPMI_PPP_IP_ADDRESS PppIpAddress; + IPMI_DESTINATION_IP_ADDRESS_SELECTOR DestinationSelector; + IPMI_PPP_IP_ADDRESS PppIpAddress; } IPMI_DESTINATION_IP_ADDRESS; =20 +typedef union { + struct { + UINT8 TapServiceSelector : 4; + UINT8 TapDialStringSelector : 4; + } Bits; + UINT8 Uint8; +} IPMI_TAP_DIAL_STRING_SERVICE_SELECTOR; + + typedef struct { - UINT8 TapSelector; - UINT8 TapServiceSelector : 4; - UINT8 TapDialStringSelector : 4; + UINT8 TapSelector; + IPMI_TAP_DIAL_STRING_SERVICE_SELECTOR TapDialStringServiceSelector; } IPMI_DESTINATION_TAP_ACCOUNT; =20 typedef struct { @@ -509,22 +674,43 @@ typedef union { #define IPMI_MUX_SETTING_BLOCK_REQUEST_MUX_TO_BMC 0x7 #define IPMI_MUX_SETTING_ALLOW_REQUEST_MUX_TO_BMC 0x8 =20 +typedef union { + struct { + UINT8 ChannelNo : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_MUX_CHANNEL_NUM; + +typedef union { + struct { + UINT8 MuxSetting : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_MUX_SETTING_REQUEST; + typedef struct { - UINT8 ChannelNo : 4; - UINT8 Reserved1 : 4; - UINT8 MuxSetting : 4; - UINT8 Reserved2 : 4; + IPMI_MUX_CHANNEL_NUM ChannelNumber; + IPMI_MUX_SETTING_REQUEST MuxSetting; } IPMI_SET_SERIAL_MODEM_MUX_COMMAND_REQUEST; =20 -typedef struct { - UINT8 CompletionCode; - UINT8 MuxSetToBmc : 1; - UINT8 CommandStatus : 1; - UINT8 MessagingSessionActive : 1; - UINT8 AlertInProgress : 1; - UINT8 Reserved2 : 2; - UINT8 MuxToBmcAllowed : 1; - UINT8 MuxToSystemBlocked : 1; +typedef union { + struct { + UINT8 MuxSetToBmc : 1; + UINT8 CommandStatus : 1; + UINT8 MessagingSessionActive : 1; + UINT8 AlertInProgress : 1; + UINT8 Reserved : 2; + UINT8 MuxToBmcAllowed : 1; + UINT8 MuxToSystemBlocked : 1; + } Bits; + UINT8 Uint8; +} IPMI_MUX_SETTING_PRESENT_STATE; + +typedef struct { + UINT8 CompletionCode; + IPMI_MUX_SETTING_PRESENT_STATE MuxSetting; } IPMI_SET_SERIAL_MODEM_MUX_COMMAND_RESPONSE; =20 // @@ -620,12 +806,19 @@ typedef struct { // // Constants and Structure definitions for "SOL activating" command to fo= llow here // -typedef struct { - UINT8 SessionState : 4; - UINT8 Reserved : 4; - UINT8 PayloadInstance; - UINT8 FormatVersionMajor; // 1 - UINT8 FormatVersionMinor; // 0 +typedef union { + struct { + UINT8 SessionState : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_SOL_SESSION_STATE; + +typedef struct { + IPMI_SOL_SESSION_STATE SessionState; + UINT8 PayloadInstance; + UINT8 FormatVersionMajor; // 1 + UINT8 FormatVersionMinor; // 0 } IPMI_SOL_ACTIVATING_REQUEST; =20 // @@ -650,11 +843,18 @@ typedef struct { #define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_CHANNEL 7 #define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_PORT 8 =20 +typedef union { + struct { + UINT8 ChannelNumber : 4; + UINT8 Reserved : 4; + } Bits; + UINT8 Uint8; +} IPMI_SET_SOL_CONFIG_PARAM_CHANNEL_NUM; + typedef struct { - UINT8 ChannelNumber : 4; - UINT8 Reserved : 4; - UINT8 ParameterSelector; - UINT8 ParameterData[0]; + IPMI_SET_SOL_CONFIG_PARAM_CHANNEL_NUM ChannelNumber; + UINT8 ParameterSelector; + UINT8 ParameterData[0]; } IPMI_SET_SOL_CONFIGURATION_PARAMETERS_REQUEST; =20 // @@ -665,13 +865,20 @@ typedef struct { // // Constants and Structure definitions for "Get SOL Configuration Paramet= ers" command to follow here // -typedef struct { - UINT8 ChannelNumber : 4; - UINT8 Reserved : 3; - UINT8 GetParameter : 1; - UINT8 ParameterSelector; - UINT8 SetSelector; - UINT8 BlockSelector; +typedef union { + struct { + UINT8 ChannelNumber : 4; + UINT8 Reserved : 3; + UINT8 GetParameter : 1; + } Bits; + UINT8 Uint8; +} IPMI_GET_SOL_CONFIG_PARAM_CHANNEL_NUM; + +typedef struct { + IPMI_GET_SOL_CONFIG_PARAM_CHANNEL_NUM ChannelNumber; + UINT8 ParameterSelector; + UINT8 SetSelector; + UINT8 BlockSelector; } IPMI_GET_SOL_CONFIGURATION_PARAMETERS_REQUEST; =20 typedef struct { --=20 2.12.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel