public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF
@ 2023-05-02 17:49 Tinh Nguyen
  2023-05-02 17:49 ` [PATCH v2 3/3] MdePkg/IndustryStandard: Add Interface Capabilities definitions Tinh Nguyen
  2023-05-03  1:13 ` [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF Chang, Abner
  0 siblings, 2 replies; 4+ messages in thread
From: Tinh Nguyen @ 2023-05-02 17:49 UTC (permalink / raw)
  To: devel
  Cc: patches, michael.d.kinney, gaoliming, zhiguang.liu, abner.chang,
	Tinh Nguyen

This change adds new PCDs for IPMI SSIF.

Specification reference:
https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1-1.html

Signed-off-by: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
---
 MdePkg/MdePkg.dec | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 7488ccda7a00..b840092382cb 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -10,6 +10,7 @@
 # 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>
+# Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -2353,6 +2354,31 @@ [PcdsFixedAtBuild,PcdsPatchableInModule]
   # @Prompt IPMI KCS Interface I/O Base Address
   gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsIoBaseAddress|0xca2|UINT16|0x00000031
 
+  ## This is SMBus slave address for the SSIF to the BMC.
+  #  The recommended value defined by IPMI specification is 0x20 (section 12.12).
+  # @Prompt IPMI SSIF SMBus slave address
+  gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifSmbusSlaveAddr|0x20|UINT8|0x00000032
+
+  ## This is the maximum number of IPMI SSIF request retries.
+  #  The IPMI specification specified min value is 5 (section 12.17).
+  # @Prompt Number of IPMI SSIF request retries.
+  gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifRequestRetryCount|0x05|UINT8|0x00000033
+
+  ## This is the required interval for each IPMI request retry.
+  #  The IPMI specification specified a time range of 60ms to 250ms (section 12.17).
+  #  The default setting is min.
+  # @Prompt Time between IPMI SSIF request retries.
+  gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifRequestRetryIntervalMicrosecond|60000|UINT32|0x00000034
+
+  ## This value is the maximum retries of an IPMI SSIF response
+  # @Prompt Number of IPMI SSIF response retries.
+  gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifResponseRetryCount|250|UINT8|0x00000035
+
+  ## This is the required interval for each IPMI response retry.
+  #  The IPMI specification specified min value is 60ms (section 12.17).
+  # @Prompt Time-out for a response, internal
+  gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifResponseRetryIntervalMicrosecond|60000|UINT32|0x00000036
+
 [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
   ## This value is used to set the base address of PCI express hierarchy.
   # @Prompt PCI Express Base Address.
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 3/3] MdePkg/IndustryStandard: Add Interface Capabilities definitions
  2023-05-02 17:49 [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF Tinh Nguyen
@ 2023-05-02 17:49 ` Tinh Nguyen
  2023-05-03  1:13 ` [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF Chang, Abner
  1 sibling, 0 replies; 4+ messages in thread
From: Tinh Nguyen @ 2023-05-02 17:49 UTC (permalink / raw)
  To: devel
  Cc: patches, michael.d.kinney, gaoliming, zhiguang.liu, abner.chang,
	Tinh Nguyen, Abner Chang

This adds more definitions for the IPMI Get System Interface
Capabilities command.

Signed-off-by: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
Reviewed-by: Abner Chang <Abner.Chang@amd.com>
---
 MdePkg/Include/IndustryStandard/IpmiNetFnApp.h | 46 ++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h
index a5835ba08c00..b6bc91f46c2d 100644
--- a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h
+++ b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h
@@ -13,6 +13,7 @@
 
   Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.<BR>
   Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
@@ -1046,6 +1047,51 @@ typedef struct {
 //  Constants and Structure definitions for "Get System Interface Capabilities" command to follow here
 //
 
+#define IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_INTERFACE_TYPE_SSIF  0x0
+#define IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_INTERFACE_TYPE_KCS   0x1
+#define IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_INTERFACE_TYPE_SMIC  0x2
+
+typedef union {
+  struct {
+    UINT8    InterfaceType : 4;
+    UINT8    Reserved      : 4;
+  } Bits;
+  UINT8    Uint8;
+} IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_REQUEST;
+
+typedef union {
+  struct {
+    UINT8    Version            : 3;
+    UINT8    PecSupport         : 1;
+    UINT8    Reserved           : 2;
+    UINT8    TransactionSupport : 2;
+  } Bits;
+  UINT8    Uint8;
+} IPMI_SYSTEM_INTERFACE_SSIF_CAPABILITIES;
+
+typedef union {
+  struct {
+    UINT8    SystemInterfaceVersion : 3;
+    UINT8    Reserved               : 5;
+  } Bits;
+  UINT8    Uint8;
+} IPMI_SYSTEM_INTERFACE_KCS_SMIC_CAPABILITIES;
+
+typedef struct {
+  UINT8                                      CompletionCode;
+  UINT8                                      Reserved;
+  IPMI_SYSTEM_INTERFACE_SSIF_CAPABILITIES    InterfaceCap;
+  UINT8                                      InputMsgSize;
+  UINT8                                      OutputMsgSize;
+} IPMI_GET_SYSTEM_INTERFACE_SSIF_CAPABILITIES_RESPONSE;
+
+typedef struct {
+  UINT8                                          CompletionCode;
+  UINT8                                          Reserved;
+  IPMI_SYSTEM_INTERFACE_KCS_SMIC_CAPABILITIES    InterfaceCap;
+  UINT8                                          InputMaxMsgSize;
+} IPMI_GET_SYSTEM_INTERFACE_KCS_SMIC_CAPABILITIES_RESPONSE;
+
 //
 //  Definitions for Get System Interface Capabilities command SSIF transaction support
 //
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF
  2023-05-02 17:49 [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF Tinh Nguyen
  2023-05-02 17:49 ` [PATCH v2 3/3] MdePkg/IndustryStandard: Add Interface Capabilities definitions Tinh Nguyen
@ 2023-05-03  1:13 ` Chang, Abner
  2023-05-03  1:23   ` Chang, Abner
  1 sibling, 1 reply; 4+ messages in thread
From: Chang, Abner @ 2023-05-03  1:13 UTC (permalink / raw)
  To: Tinh Nguyen, devel@edk2.groups.io
  Cc: patches@amperecomputing.com, michael.d.kinney@intel.com,
	gaoliming@byosoft.com.cn, zhiguang.liu@intel.com

[AMD Official Use Only - General]

Acked-by: Abner Chang <Abner.Chang@amd.com>

> -----Original Message-----
> From: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> Sent: Wednesday, May 3, 2023 1:49 AM
> To: devel@edk2.groups.io
> Cc: patches@amperecomputing.com; michael.d.kinney@intel.com;
> gaoliming@byosoft.com.cn; zhiguang.liu@intel.com; Chang, Abner
> <Abner.Chang@amd.com>; Tinh Nguyen
> <tinhnguyen@os.amperecomputing.com>
> Subject: [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> This change adds new PCDs for IPMI SSIF.
> 
> Specification reference:
> https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/i
> pmi-second-gen-interface-spec-v2-rev1-1.html
> 
> Signed-off-by: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> ---
>  MdePkg/MdePkg.dec | 26 ++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> 7488ccda7a00..b840092382cb 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -10,6 +10,7 @@
>  # 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>
> +# Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -2353,6 +2354,31 @@
> [PcdsFixedAtBuild,PcdsPatchableInModule]
>    # @Prompt IPMI KCS Interface I/O Base Address
> 
> gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsIoBaseAddress|0xca2|UINT16|0x00
> 000031
> 
> +  ## This is SMBus slave address for the SSIF to the BMC.
> +  #  The recommended value defined by IPMI specification is 0x20 (section
> 12.12).
> +  # @Prompt IPMI SSIF SMBus slave address
> +
> +
> gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifSmbusSlaveAddr|0x20|UINT8|0x00
> 0000
> + 32
> +
> +  ## This is the maximum number of IPMI SSIF request retries.
> +  #  The IPMI specification specified min value is 5 (section 12.17).
> +  # @Prompt Number of IPMI SSIF request retries.
> +
> +
> gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifRequestRetryCount|0x05|UINT8|0
> x000
> + 00033
> +
> +  ## This is the required interval for each IPMI request retry.
> +  #  The IPMI specification specified a time range of 60ms to 250ms (section
> 12.17).
> +  #  The default setting is min.
> +  # @Prompt Time between IPMI SSIF request retries.
> +
> +
> gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifRequestRetryIntervalMicrosecond|
> 60
> + 000|UINT32|0x00000034
> +
> +  ## This value is the maximum retries of an IPMI SSIF response  #
> + @Prompt Number of IPMI SSIF response retries.
> +
> +
> gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifResponseRetryCount|250|UINT8|0
> x000
> + 00035
> +
> +  ## This is the required interval for each IPMI response retry.
> +  #  The IPMI specification specified min value is 60ms (section 12.17).
> +  # @Prompt Time-out for a response, internal
> +
> +
> gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifResponseRetryIntervalMicrosecond
> |6
> + 0000|UINT32|0x00000036
> +
>  [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
>    ## This value is used to set the base address of PCI express hierarchy.
>    # @Prompt PCI Express Base Address.
> --
> 2.40.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF
  2023-05-03  1:13 ` [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF Chang, Abner
@ 2023-05-03  1:23   ` Chang, Abner
  0 siblings, 0 replies; 4+ messages in thread
From: Chang, Abner @ 2023-05-03  1:23 UTC (permalink / raw)
  To: Tinh Nguyen, devel@edk2.groups.io
  Cc: patches@amperecomputing.com, michael.d.kinney@intel.com,
	gaoliming@byosoft.com.cn, zhiguang.liu@intel.com

[AMD Official Use Only - General]

Ah sorry, one thing I missed. Please check feedback below.

> -----Original Message-----
> From: Chang, Abner
> Sent: Wednesday, May 3, 2023 9:13 AM
> To: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>;
> devel@edk2.groups.io
> Cc: patches@amperecomputing.com; michael.d.kinney@intel.com;
> gaoliming@byosoft.com.cn; zhiguang.liu@intel.com
> Subject: RE: [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF
> 
> [AMD Official Use Only - General]
> 
> Acked-by: Abner Chang <Abner.Chang@amd.com>
> 
> > -----Original Message-----
> > From: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> > Sent: Wednesday, May 3, 2023 1:49 AM
> > To: devel@edk2.groups.io
> > Cc: patches@amperecomputing.com; michael.d.kinney@intel.com;
> > gaoliming@byosoft.com.cn; zhiguang.liu@intel.com; Chang, Abner
> > <Abner.Chang@amd.com>; Tinh Nguyen
> <tinhnguyen@os.amperecomputing.com>
> > Subject: [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > This change adds new PCDs for IPMI SSIF.
> >
> > Specification reference:
> >
> https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/i
> > pmi-second-gen-interface-spec-v2-rev1-1.html
> >
> > Signed-off-by: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> > ---
> >  MdePkg/MdePkg.dec | 26 ++++++++++++++++++++
> >  1 file changed, 26 insertions(+)
> >
> > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> > 7488ccda7a00..b840092382cb 100644
> > --- a/MdePkg/MdePkg.dec
> > +++ b/MdePkg/MdePkg.dec
> > @@ -10,6 +10,7 @@
> >  # 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>
> > +# Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
> >  #
> >  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -2353,6 +2354,31
> > @@ [PcdsFixedAtBuild,PcdsPatchableInModule]
> >    # @Prompt IPMI KCS Interface I/O Base Address
> >
> >
> gEfiMdePkgTokenSpaceGuid.PcdIpmiKcsIoBaseAddress|0xca2|UINT16|0x00
> > 000031
> >
> > +  ## This is SMBus slave address for the SSIF to the BMC.
> > +  #  The recommended value defined by IPMI specification is 0x20
> > + (section
> > 12.12).
> > +  # @Prompt IPMI SSIF SMBus slave address
> > +
> > +
> >
> gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifSmbusSlaveAddr|0x20|UINT8|0x00
> > 0000
> > + 32
> > +
> > +  ## This is the maximum number of IPMI SSIF request retries.
> > +  #  The IPMI specification specified min value is 5 (section 12.17).
> > +  # @Prompt Number of IPMI SSIF request retries.
> > +
> > +
> >
> gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifRequestRetryCount|0x05|UINT8|0
> > x000
> > + 00033
> > +
> > +  ## This is the required interval for each IPMI request retry.
> > +  #  The IPMI specification specified a time range of 60ms to 250ms
> > + (section
> > 12.17).
> > +  #  The default setting is min.
> > +  # @Prompt Time between IPMI SSIF request retries.
> > +
> > +
> >
> gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifRequestRetryIntervalMicrosecond|
> > 60
> > + 000|UINT32|0x00000034
> > +
> > +  ## This value is the maximum retries of an IPMI SSIF response  #
> > + @Prompt Number of IPMI SSIF response retries.
Please also mention that the value of PcdIpmiSsifResponseRetryCount refers to Linux driver.

Thanks
Abner

> > +
> > +
> >
> gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifResponseRetryCount|250|UINT8|0
> > x000
> > + 00035
> > +
> > +  ## This is the required interval for each IPMI response retry.
> > +  #  The IPMI specification specified min value is 60ms (section 12.17).
> > +  # @Prompt Time-out for a response, internal
> > +
> > +
> >
> gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifResponseRetryIntervalMicrosecond
> > |6
> > + 0000|UINT32|0x00000036
> > +
> >  [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
> >    ## This value is used to set the base address of PCI express hierarchy.
> >    # @Prompt PCI Express Base Address.
> > --
> > 2.40.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-03  1:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-02 17:49 [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF Tinh Nguyen
2023-05-02 17:49 ` [PATCH v2 3/3] MdePkg/IndustryStandard: Add Interface Capabilities definitions Tinh Nguyen
2023-05-03  1:13 ` [PATCH v2 2/3] MdePkg: Add new PCDs for IPMI SSIF Chang, Abner
2023-05-03  1:23   ` Chang, Abner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox