[edk2] [PATCH v2] MdePkg/IndustryStandard: Add header file for SPMI ACPI table

Hao Wu posted 1 patch 6 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/edk2 tags/patchew/20180323012026.10076-1-hao.a.wu@intel.com
There is a newer version of this series
.../ServiceProcessorManagementInterfaceTable.h     | 109 +++++++++++++++++++++
1 file changed, 109 insertions(+)
create mode 100644 MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTable.h
[edk2] [PATCH v2] MdePkg/IndustryStandard: Add header file for SPMI ACPI table
Posted by Hao Wu 6 years, 1 month ago
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=840

Add the header file for Service Processor Management Interface ACPI table
definition.

Cc: Younas Khan <pmdyounaskhan786@gmail.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 .../ServiceProcessorManagementInterfaceTable.h     | 109 +++++++++++++++++++++
 1 file changed, 109 insertions(+)
 create mode 100644 MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTable.h

diff --git a/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTable.h b/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTable.h
new file mode 100644
index 0000000000..bda32c8c94
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTable.h
@@ -0,0 +1,109 @@
+/** @file
+  Service Processor Management Interface (SPMI) ACPI table definition from
+  Intelligent Platform Management Interface Specification Second Generation.
+
+  Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+  This program and the accompanying materials
+  are licensed and made available under the terms and conditions of the BSD License
+  which accompanies this distribution.  The full text of the license may be found at
+  http://opensource.org/licenses/bsd-license.php
+
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+  @par Revision Reference:
+    - Intelligent Platform Management Interface Specification Second Generation
+      v2.0 Revision 1.1, Dated October 2013.
+      https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/ipmi-intelligent-platform-mgt-interface-spec-2nd-gen-v2-0-spec-update.pdf
+**/
+#ifndef _SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_H_
+#define _SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_H_
+
+#include <IndustryStandard/Acpi.h>
+
+#pragma pack(1)
+
+///
+/// Definition for Service Processor Management Interface Description Table
+///
+typedef struct {
+  EFI_ACPI_DESCRIPTION_HEADER               Header;
+  ///
+  /// Indicates the type of IPMI interface.
+  ///
+  UINT8                                     InterfaceType;
+  ///
+  /// This field must always be 01h to be compatible with any software that
+  /// implements previous versions of this spec.
+  ///
+  UINT8                                     Reserved1;
+  ///
+  /// Identifies the IPMI specification revision, in BCD format.
+  ///
+  UINT16                                    SpecificationRevision;
+  ///
+  /// Interrupt type(s) used by the interface.
+  ///
+  UINT8                                     InterruptType;
+  ///
+  /// The bit assignment of the SCI interrupt within the GPEx_STS register of a
+  /// GPE described if the FADT that the interface triggers.
+  ///
+  UINT8                                     Gpe;
+  ///
+  /// Reserved, must be 00h.
+  ///
+  UINT8                                     Reserved2;
+  ///
+  /// PCI Device Flag.
+  ///
+  UINT8                                     PciDeviceFlag;
+  ///
+  /// The I/O APIC or I/O SAPIC Global System Interrupt used by the interface.
+  ///
+  UINT32                                    GlobalSystemInterrupt;
+  ///
+  /// The base address of the interface register set described using the
+  /// Generic Address Structure (GAS, See [ACPI 2.0] for the definition).
+  ///
+  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    BaseAddress;
+  ///
+  /// PCI Segment Group Number, if the IPMI device is a PCI device.
+  /// Otherwise, this field is byte 1 of a UID.
+  ///
+  union {
+    UINT8                                   PciSegmentGroup;
+    UINT8                                   Uid1;
+  } Byte60;
+  ///
+  /// PCI Bus Number, if the IPMI device is a PCI device.
+  /// Otherwise, this field is byte 2 of a UID.
+  ///
+  union {
+    UINT8                                   PciBus;
+    UINT8                                   Uid2;
+  } Byte61;
+  ///
+  /// PCI Device fields or byte 3 of a UID.
+  ///
+  union {
+    UINT8                                   PciDevice;
+    UINT8                                   Uid3;
+  } Byte62;
+  ///
+  /// PCI Function fields or byte 4 of a UID.
+  ///
+  union {
+    UINT8                                   PciFunction;
+    UINT8                                   Uid4;
+  } Byte63;
+  ///
+  /// This field must always be null (0x00) to be compatible with any software
+  /// that implements previous versions of this spec.
+  ///
+  UINT8                                     Reserved3;
+} EFI_ACPI_SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE;
+
+#pragma pack()
+
+#endif
-- 
2.12.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2] MdePkg/IndustryStandard: Add header file for SPMI ACPI table
Posted by Yao, Jiewen 6 years, 1 month ago
Sorry, I did not express my thought clearly.

I mean union like below:

  union {
    struct {
       UINT8                                   SegmentGroup;
       UINT8                                   Bus;
       UINT8                                   Device;
       UINT8                                   Function;
    } Pci;
    UINT32                                    Uid;
  } DeviceId;


> -----Original Message-----
> From: Wu, Hao A
> Sent: Friday, March 23, 2018 9:20 AM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Younas Khan
> <pmdyounaskhan786@gmail.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Yao,
> Jiewen <jiewen.yao@intel.com>
> Subject: [PATCH v2] MdePkg/IndustryStandard: Add header file for SPMI ACPI
> table
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=840
> 
> Add the header file for Service Processor Management Interface ACPI table
> definition.
> 
> Cc: Younas Khan <pmdyounaskhan786@gmail.com>
> Cc: Michael Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Hao Wu <hao.a.wu@intel.com>
> ---
>  .../ServiceProcessorManagementInterfaceTable.h     | 109
> +++++++++++++++++++++
>  1 file changed, 109 insertions(+)
>  create mode 100644
> MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTable
> .h
> 
> diff --git
> a/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTa
> ble.h
> b/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTa
> ble.h
> new file mode 100644
> index 0000000000..bda32c8c94
> --- /dev/null
> +++
> b/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTa
> ble.h
> @@ -0,0 +1,109 @@
> +/** @file
> +  Service Processor Management Interface (SPMI) ACPI table definition from
> +  Intelligent Platform Management Interface Specification Second Generation.
> +
> +  Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
> +  This program and the accompanying materials
> +  are licensed and made available under the terms and conditions of the BSD
> License
> +  which accompanies this distribution.  The full text of the license may be
> found at
> +  http://opensource.org/licenses/bsd-license.php
> +
> +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"
> BASIS,
> +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
> EXPRESS OR IMPLIED.
> +
> +  @par Revision Reference:
> +    - Intelligent Platform Management Interface Specification Second
> Generation
> +      v2.0 Revision 1.1, Dated October 2013.
> +
> https://www.intel.com/content/dam/www/public/us/en/documents/specificati
> on-updates/ipmi-intelligent-platform-mgt-interface-spec-2nd-gen-v2-0-spec-up
> date.pdf
> +**/
> +#ifndef _SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_H_
> +#define _SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_H_
> +
> +#include <IndustryStandard/Acpi.h>
> +
> +#pragma pack(1)
> +
> +///
> +/// Definition for Service Processor Management Interface Description Table
> +///
> +typedef struct {
> +  EFI_ACPI_DESCRIPTION_HEADER               Header;
> +  ///
> +  /// Indicates the type of IPMI interface.
> +  ///
> +  UINT8                                     InterfaceType;
> +  ///
> +  /// This field must always be 01h to be compatible with any software that
> +  /// implements previous versions of this spec.
> +  ///
> +  UINT8                                     Reserved1;
> +  ///
> +  /// Identifies the IPMI specification revision, in BCD format.
> +  ///
> +  UINT16                                    SpecificationRevision;
> +  ///
> +  /// Interrupt type(s) used by the interface.
> +  ///
> +  UINT8                                     InterruptType;
> +  ///
> +  /// The bit assignment of the SCI interrupt within the GPEx_STS register of a
> +  /// GPE described if the FADT that the interface triggers.
> +  ///
> +  UINT8                                     Gpe;
> +  ///
> +  /// Reserved, must be 00h.
> +  ///
> +  UINT8                                     Reserved2;
> +  ///
> +  /// PCI Device Flag.
> +  ///
> +  UINT8                                     PciDeviceFlag;
> +  ///
> +  /// The I/O APIC or I/O SAPIC Global System Interrupt used by the interface.
> +  ///
> +  UINT32                                    GlobalSystemInterrupt;
> +  ///
> +  /// The base address of the interface register set described using the
> +  /// Generic Address Structure (GAS, See [ACPI 2.0] for the definition).
> +  ///
> +  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    BaseAddress;
> +  ///
> +  /// PCI Segment Group Number, if the IPMI device is a PCI device.
> +  /// Otherwise, this field is byte 1 of a UID.
> +  ///
> +  union {
> +    UINT8                                   PciSegmentGroup;
> +    UINT8                                   Uid1;
> +  } Byte60;
> +  ///
> +  /// PCI Bus Number, if the IPMI device is a PCI device.
> +  /// Otherwise, this field is byte 2 of a UID.
> +  ///
> +  union {
> +    UINT8                                   PciBus;
> +    UINT8                                   Uid2;
> +  } Byte61;
> +  ///
> +  /// PCI Device fields or byte 3 of a UID.
> +  ///
> +  union {
> +    UINT8                                   PciDevice;
> +    UINT8                                   Uid3;
> +  } Byte62;
> +  ///
> +  /// PCI Function fields or byte 4 of a UID.
> +  ///
> +  union {
> +    UINT8                                   PciFunction;
> +    UINT8                                   Uid4;
> +  } Byte63;
> +  ///
> +  /// This field must always be null (0x00) to be compatible with any software
> +  /// that implements previous versions of this spec.
> +  ///
> +  UINT8                                     Reserved3;
> +} EFI_ACPI_SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE;
> +
> +#pragma pack()
> +
> +#endif
> --
> 2.12.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2] MdePkg/IndustryStandard: Add header file for SPMI ACPI table
Posted by Wu, Hao A 6 years, 1 month ago
Got it.

A new version will be sent out to address this.

Best Regards,
Hao Wu


> -----Original Message-----
> From: Yao, Jiewen
> Sent: Friday, March 23, 2018 9:34 AM
> To: Wu, Hao A; edk2-devel@lists.01.org
> Cc: Younas Khan; Kinney, Michael D; Gao, Liming
> Subject: RE: [PATCH v2] MdePkg/IndustryStandard: Add header file for SPMI
> ACPI table
> 
> Sorry, I did not express my thought clearly.
> 
> I mean union like below:
> 
>   union {
>     struct {
>        UINT8                                   SegmentGroup;
>        UINT8                                   Bus;
>        UINT8                                   Device;
>        UINT8                                   Function;
>     } Pci;
>     UINT32                                    Uid;
>   } DeviceId;
> 
> 
> > -----Original Message-----
> > From: Wu, Hao A
> > Sent: Friday, March 23, 2018 9:20 AM
> > To: edk2-devel@lists.01.org
> > Cc: Wu, Hao A <hao.a.wu@intel.com>; Younas Khan
> > <pmdyounaskhan786@gmail.com>; Kinney, Michael D
> > <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Yao,
> > Jiewen <jiewen.yao@intel.com>
> > Subject: [PATCH v2] MdePkg/IndustryStandard: Add header file for SPMI ACPI
> > table
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=840
> >
> > Add the header file for Service Processor Management Interface ACPI table
> > definition.
> >
> > Cc: Younas Khan <pmdyounaskhan786@gmail.com>
> > Cc: Michael Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Hao Wu <hao.a.wu@intel.com>
> > ---
> >  .../ServiceProcessorManagementInterfaceTable.h     | 109
> > +++++++++++++++++++++
> >  1 file changed, 109 insertions(+)
> >  create mode 100644
> >
> MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTabl
> e
> > .h
> >
> > diff --git
> >
> a/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTa
> > ble.h
> >
> b/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTa
> > ble.h
> > new file mode 100644
> > index 0000000000..bda32c8c94
> > --- /dev/null
> > +++
> >
> b/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTa
> > ble.h
> > @@ -0,0 +1,109 @@
> > +/** @file
> > +  Service Processor Management Interface (SPMI) ACPI table definition from
> > +  Intelligent Platform Management Interface Specification Second
> Generation.
> > +
> > +  Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
> > +  This program and the accompanying materials
> > +  are licensed and made available under the terms and conditions of the BSD
> > License
> > +  which accompanies this distribution.  The full text of the license may be
> > found at
> > +  http://opensource.org/licenses/bsd-license.php
> > +
> > +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"
> > BASIS,
> > +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
> > EXPRESS OR IMPLIED.
> > +
> > +  @par Revision Reference:
> > +    - Intelligent Platform Management Interface Specification Second
> > Generation
> > +      v2.0 Revision 1.1, Dated October 2013.
> > +
> >
> https://www.intel.com/content/dam/www/public/us/en/documents/specificati
> > on-updates/ipmi-intelligent-platform-mgt-interface-spec-2nd-gen-v2-0-spec-
> up
> > date.pdf
> > +**/
> > +#ifndef _SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_H_
> > +#define _SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_H_
> > +
> > +#include <IndustryStandard/Acpi.h>
> > +
> > +#pragma pack(1)
> > +
> > +///
> > +/// Definition for Service Processor Management Interface Description
> Table
> > +///
> > +typedef struct {
> > +  EFI_ACPI_DESCRIPTION_HEADER               Header;
> > +  ///
> > +  /// Indicates the type of IPMI interface.
> > +  ///
> > +  UINT8                                     InterfaceType;
> > +  ///
> > +  /// This field must always be 01h to be compatible with any software that
> > +  /// implements previous versions of this spec.
> > +  ///
> > +  UINT8                                     Reserved1;
> > +  ///
> > +  /// Identifies the IPMI specification revision, in BCD format.
> > +  ///
> > +  UINT16                                    SpecificationRevision;
> > +  ///
> > +  /// Interrupt type(s) used by the interface.
> > +  ///
> > +  UINT8                                     InterruptType;
> > +  ///
> > +  /// The bit assignment of the SCI interrupt within the GPEx_STS register of
> a
> > +  /// GPE described if the FADT that the interface triggers.
> > +  ///
> > +  UINT8                                     Gpe;
> > +  ///
> > +  /// Reserved, must be 00h.
> > +  ///
> > +  UINT8                                     Reserved2;
> > +  ///
> > +  /// PCI Device Flag.
> > +  ///
> > +  UINT8                                     PciDeviceFlag;
> > +  ///
> > +  /// The I/O APIC or I/O SAPIC Global System Interrupt used by the interface.
> > +  ///
> > +  UINT32                                    GlobalSystemInterrupt;
> > +  ///
> > +  /// The base address of the interface register set described using the
> > +  /// Generic Address Structure (GAS, See [ACPI 2.0] for the definition).
> > +  ///
> > +  EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE    BaseAddress;
> > +  ///
> > +  /// PCI Segment Group Number, if the IPMI device is a PCI device.
> > +  /// Otherwise, this field is byte 1 of a UID.
> > +  ///
> > +  union {
> > +    UINT8                                   PciSegmentGroup;
> > +    UINT8                                   Uid1;
> > +  } Byte60;
> > +  ///
> > +  /// PCI Bus Number, if the IPMI device is a PCI device.
> > +  /// Otherwise, this field is byte 2 of a UID.
> > +  ///
> > +  union {
> > +    UINT8                                   PciBus;
> > +    UINT8                                   Uid2;
> > +  } Byte61;
> > +  ///
> > +  /// PCI Device fields or byte 3 of a UID.
> > +  ///
> > +  union {
> > +    UINT8                                   PciDevice;
> > +    UINT8                                   Uid3;
> > +  } Byte62;
> > +  ///
> > +  /// PCI Function fields or byte 4 of a UID.
> > +  ///
> > +  union {
> > +    UINT8                                   PciFunction;
> > +    UINT8                                   Uid4;
> > +  } Byte63;
> > +  ///
> > +  /// This field must always be null (0x00) to be compatible with any
> software
> > +  /// that implements previous versions of this spec.
> > +  ///
> > +  UINT8                                     Reserved3;
> > +} EFI_ACPI_SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE;
> > +
> > +#pragma pack()
> > +
> > +#endif
> > --
> > 2.12.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel