diff options
author | Abner Chang <abner.chang@amd.com> | 2022-12-23 14:33:48 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-01-19 02:32:26 +0000 |
commit | 663e70851c47c4bf0f457852f89fb1e1946d393f (patch) | |
tree | 176b4dbb3b5079cd87919a5a59ca0419b0e6cc78 | |
parent | cabcc6851b74925038e51d2265c5c63ab2a912cb (diff) | |
download | edk2-663e70851c47c4bf0f457852f89fb1e1946d393f.tar.gz edk2-663e70851c47c4bf0f457852f89fb1e1946d393f.tar.bz2 edk2-663e70851c47c4bf0f457852f89fb1e1946d393f.zip |
RedfishPkg/Include: Add Redfish IPMI definitions
Add the definitions of Redfish Host Interface
credential bootstrapping IPMI commands.
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Reviewed-by: Igor Kulchytskyy<igork@ami.com>
Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
-rw-r--r-- | RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h new file mode 100644 index 0000000000..9b4a5eb8e3 --- /dev/null +++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h @@ -0,0 +1,51 @@ +/** @file
+ Redfish Host Interface IPMI command
+
+ Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef REDFISH_HOST_INTERFACE_IPMI_H_
+#define REDFISH_HOST_INTERFACE_IPMI_H_
+
+#include <Uefi.h>
+#include <IndustryStandard/IpmiNetFnGroupExtension.h>
+
+#define REDFISH_IPMI_GROUP_EXTENSION 0x52
+#define REDFISH_IPMI_GET_BOOTSTRAP_CREDENTIALS_CMD 0x02
+#define REDFISH_IPMI_BOOTSTRAP_CREDENTIAL_ENABLE 0xA5
+#define REDFISH_IPMI_BOOTSTRAP_CREDENTIAL_DISABLE 0x00
+#define REDFISH_IPMI_COMP_CODE_BOOTSTRAP_CREDENTIAL_DISABLED 0x80
+
+///
+/// Per Redfish Host Interface Specification 1.3, The maximum length of
+/// username and password is 16 characters long.
+//
+#define USERNAME_MAX_LENGTH 16
+#define PASSWORD_MAX_LENGTH 16
+#define USERNAME_MAX_SIZE (USERNAME_MAX_LENGTH + 1) // NULL terminator
+#define PASSWORD_MAX_SIZE (PASSWORD_MAX_LENGTH + 1) // NULL terminator
+
+#pragma pack(1)
+
+///
+/// The definition of IPMI command to get bootstrap account credentials
+///
+typedef struct {
+ UINT8 GroupExtensionId;
+ UINT8 DisableBootstrapControl;
+} IPMI_BOOTSTRAP_CREDENTIALS_COMMAND_DATA;
+
+///
+/// The response data of getting bootstrap credential
+///
+typedef struct {
+ UINT8 CompletionCode;
+ UINT8 GroupExtensionId;
+ CHAR8 Username[USERNAME_MAX_LENGTH];
+ CHAR8 Password[PASSWORD_MAX_LENGTH];
+} IPMI_BOOTSTRAP_CREDENTIALS_RESULT_RESPONSE;
+
+#pragma pack()
+
+#endif
|