From: "gaoliming" <gaoliming@byosoft.com.cn>
To: <abner.chang@amd.com>, <devel@edk2.groups.io>
Cc: "'Michael D Kinney'" <michael.d.kinney@intel.com>,
"'Zhiguang Liu'" <zhiguang.liu@intel.com>,
"'Nickle Wang'" <nicklew@nvidia.com>,
"'Igor Kulchytskyy'" <igork@ami.com>,
"'Isaac Oram'" <isaac.w.oram@intel.com>,
"'Abdul Lateef Attar'" <AbdulLateef.Attar@amd.com>
Subject: 回复: [PATCH V2] MdePkg/Include: Add IPMI KCS definitions
Date: Thu, 23 Mar 2023 09:35:12 +0800 [thread overview]
Message-ID: <000901d95d27$b69cd720$23d68560$@byosoft.com.cn> (raw)
In-Reply-To: <20230308144653.733-1-abner.chang@amd.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> -----邮件原件-----
> 发件人: abner.chang@amd.com <abner.chang@amd.com>
> 发送时间: 2023年3月8日 22:47
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Nickle
> Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>; Isaac
> Oram <isaac.w.oram@intel.com>; Abdul Lateef Attar
> <AbdulLateef.Attar@amd.com>
> 主题: [PATCH V2] MdePkg/Include: Add IPMI KCS definitions
>
> From: Abner Chang <abner.chang@amd.com>
>
> BZ #4354
> This change adds definitions for IPMI KCS.
>
> Spec ref:
> https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ip
> mi-second-gen-interface-spec-v2-rev1-1.html
>
> Signed-off-by: Abner Chang <abner.chang@amd.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> Acked-by: Isaac Oram <isaac.w.oram@intel.com>
> ---
> MdePkg/MdePkg.dec | 5 ++
> MdePkg/Include/IndustryStandard/IpmiKcs.h | 76
> +++++++++++++++++++++++
> 2 files changed, 81 insertions(+)
> create mode 100644 MdePkg/Include/IndustryStandard/IpmiKcs.h
>
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
> index 80b65590531..808c487bb49 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -9,6 +9,7 @@
> # (C) Copyright 2016 - 2021 Hewlett Packard Enterprise Development
> LP<BR>
> # Copyright (c) 2022, Loongson Technology Corporation Limited. All rights
> reserved.<BR>
> # Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.<BR>
> +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
reserved.<BR>
> #
> # SPDX-License-Identifier: BSD-2-Clause-Patent
> #
> @@ -2339,6 +2340,10 @@
> # @Prompt Memory Address of GuidedExtractHandler Table.
>
> gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|0x10000
> 00|UINT64|0x30001015
>
> + ## This value is the IPMI KCS Interface I/O base address used to
transmit
> IPMI commands.
> + # @Prompt IPMI KCS Interface I/O Base Address
> +
> gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsBaseAddress|0xca2|UINT16|0x0000
> 0031
> +
> [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
> ## This value is used to set the base address of PCI express hierarchy.
> # @Prompt PCI Express Base Address.
> diff --git a/MdePkg/Include/IndustryStandard/IpmiKcs.h
> b/MdePkg/Include/IndustryStandard/IpmiKcs.h
> new file mode 100644
> index 00000000000..c3baf80bd76
> --- /dev/null
> +++ b/MdePkg/Include/IndustryStandard/IpmiKcs.h
> @@ -0,0 +1,76 @@
> +/** @file
> + IPMI KCS Register Definitions
> +
> + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
reserved.<BR>
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> + @par Revision Reference:
> + IPMI Specification
> + Version 2.0, Rev. 1.1
> +
> https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ip
> mi-second-gen-interface-spec-v2-rev1-1.html
> +**/
> +
> +#ifndef IPMI_KCS_H_
> +#define IPMI_KCS_H_
> +
> +#define IPMI_KCS_STATUS_REGISTER_OFFSET 1
> +#define IPMI_KCS_COMMAND_REGISTER_OFFSET 1
> +#define IPMI_KCS_DATA_OUT_REGISTER_OFFSET 0
> +#define IPMI_KCS_DATA_IN_REGISTER_OFFSET 0
> +
> +///
> +/// IPMI KCS Interface Status Bits
> +///
> +#define IPMI_KCS_OBF BIT0
> +#define IPMI_KCS_IBF BIT1
> +#define IPMI_KCS_SMS_ATN BIT2
> +#define IPMI_KCS_COMMAND_DATA BIT3
> +#define IPMI_KCS_OEM1 BIT4
> +#define IPMI_KCS_OEM2 BIT5
> +#define IPMI_KCS_S0 BIT6
> +#define IPMI_KCS_S1 BIT7
> +
> +///
> +/// IPMI KCS Interface Control Codes
> +///
> +#define IPMI_KCS_CONTROL_CODE_GET_STATUS_ABORT 0x60
> +#define IPMI_KCS_CONTROL_CODE_WRITE_START 0x61
> +#define IPMI_KCS_CONTROL_CODE_WRITE_END 0x62
> +#define IPMI_KCS_CONTROL_CODE_READ 0x68
> +
> +///
> +/// Status Codes
> +///
> +#define IPMI_KCS_STATUS_NO_ERROR 0x00
> +#define IPMI_KCS_STATUS_ABORT 0x01
> +#define IPMI_KCS_STATUS_ILLEGAL 0x02
> +#define IPMI_KCS_STATUS_LENGTH_ERROR 0x06
> +#define IPMI_KCS_STATUS_UNSPECIFIED 0xFF
> +
> +///
> +/// KCS Interface State Bit
> +///
> +typedef enum {
> + IPMI_KCS_IDLE_STATE = 0,
> + IPMI_KCS_READ_STATE,
> + IPMI_KCS_WRITE_STATE,
> + IPMI_KCS_ERROR_STATE
> +} IPMI_KCS_STATE;
> +
> +///
> +/// IPMI KCS Interface Request Format
> +///
> +typedef struct {
> + UINT8 NetFunc;
> + UINT8 Command;
> + UINT8 Data[0];
> +} IPMI_KCS_RESQUEST_HEADER;
> +
> +///
> +/// IPMI KCS Interface Response Format
> +///
> +typedef struct {
> + UINT8 NetFunc;
> + UINT8 Command;
> +} IPMI_KCS_RESPONSE_HEADER;
> +#endif
> --
> 2.37.1.windows.1
prev parent reply other threads:[~2023-03-23 1:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 14:46 [PATCH V2] MdePkg/Include: Add IPMI KCS definitions Chang, Abner
2023-03-23 1:35 ` gaoliming [this message]
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='000901d95d27$b69cd720$23d68560$@byosoft.com.cn' \
--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