From 9dabe005f0cd422068fbb6cb915cf8180c55918d Mon Sep 17 00:00:00 2001 From: Nhi Pham Date: Fri, 30 Aug 2024 15:06:47 +0700 Subject: [PATCH] MdePkg/IndustryStandard: Add definitions for IPMI Boot Progress Code This adds constants and structure definitions for Send/Get Boot Progress Code through IPMI, according to Server Base Manageability Requirements (SBMR) [1], Appendix F. [1] https://developer.arm.com/documentation/den0069 Signed-off-by: Nhi Pham --- .../IpmiNetFnGroupExtension.h | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnGroupExtension.h b/MdePkg/Include/IndustryStandard/IpmiNetFnGroupExtension.h index 6b26656cfe..aa242efcbb 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnGroupExtension.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnGroupExtension.h @@ -2,12 +2,15 @@ IPMI 2.0 definitions from the IPMI Specification Version 2.0, Revision 1.1. Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2024, Ampere Computing LLC. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef _IPMI_NET_FN_GROUP_EXTENSION_H_ #define _IPMI_NET_FN_GROUP_EXTENSION_H_ +#include + // // Net function definition for Group Extension command // @@ -17,4 +20,70 @@ // All Group Extension commands and their structure definitions to follow here // +/// +/// Constants and structure definitions for Boot Progress Codes +/// +/// See Section F of the Arm Server Base Manageability Requirements 2.0 specification, +/// https://developer.arm.com/documentation/den0069 +/// + +// +// Definitions for send progress code command +// +#define IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_SEND 0x02 + +// +// Definitions for get progress code command +// +#define IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_GET 0x03 + +// +// Definitions for send and get progress code command response +// +#define IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_COMPLETED_NORMALLY 0x00 +#define IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_COMPLETED_ERROR 0x80 +#define IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_DEFINING_BODY 0xAE + +// +// Structure for the format of the boot progress code data +// See Table 29: SBMR Boot Progress Codes format +// +typedef struct { + EFI_STATUS_CODE_TYPE CodeType; + EFI_STATUS_CODE_VALUE CodeValue; + UINT8 Instance; +} IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_FORMAT; + +// +// Structure for the boot progress code send request +// +typedef struct { + UINT8 DefiningBody; + IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_FORMAT BootProgressCode; +} IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_SEND_REQUEST; + +// +// Structure for the boot progress code send response +// +typedef struct { + UINT8 CompletionCode; + UINT8 DefiningBody; +} IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_SEND_RESPONSE; + +// +// Structure for the boot progress code get request +// +typedef struct { + UINT8 DefiningBody; +} IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_GET_REQUEST; + +// +// Structure for the boot progress code get response +// +typedef struct { + UINT8 CompletionCode; + UINT8 DefiningBody; + IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_FORMAT BootProgressCode; +} IPMI_GROUP_EXTENSION_BOOT_PROGRESS_CODE_GET_RESPONSE; + #endif