public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chang, Abner" <abner.chang@amd.com>
To: <devel@edk2.groups.io>
Cc: Abner Chang <abner.chang@amd.com>,
	Igor Kulchytskyy <igork@ami.com>,
	"Isaac Oram" <isaac.w.oram@intel.com>
Subject: [PATCH V4 2/3] RedfishPkg/Include: Add Redfish IPMI definitions
Date: Fri, 6 Jan 2023 10:57:54 +0800	[thread overview]
Message-ID: <20230106025756.1184-3-abner.chang@amd.com> (raw)
In-Reply-To: <20230106025756.1184-1-abner.chang@amd.com>

From: Abner Chang <abner.chang@amd.com>

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>
---
 .../RedfishHostInterfaceIpmi.h                | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h

diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterfaceIpmi.h
new file mode 100644
index 00000000000..9b4a5eb8e3f
--- /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
-- 
2.37.1.windows.1


  parent reply	other threads:[~2023-01-06  2:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-06  2:57 [PATCH V4 0/3] IPMI changes for Redfish Chang, Abner
2023-01-06  2:57 ` [PATCH V4 1/3] MdePkg/IndustryStandard: Update IPMI definitions Chang, Abner
2023-01-18  5:13   ` 回复: [edk2-devel] " gaoliming
2023-01-18  6:06     ` Chang, Abner
2023-01-19  1:07       ` 回复: " gaoliming
2023-01-19  1:15         ` Chang, Abner
2023-01-19  3:31         ` Chang, Abner
2023-01-06  2:57 ` Chang, Abner [this message]
2023-01-06  2:57 ` [PATCH V4 3/3] RedfishPkg/Include: Redfish USB Interface V2 update Chang, Abner
2023-01-11 23:11 ` [PATCH V4 0/3] IPMI changes for Redfish Isaac Oram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230106025756.1184-3-abner.chang@amd.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox