]> git.proxmox.com Git - mirror_edk2.git/commitdiff
PrmPkg/PrmContextBuffer.h: Add ACPI parameter support structures
authorMichael Kubacki <michael.kubacki@microsoft.com>
Mon, 8 Jun 2020 23:32:34 +0000 (16:32 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 5 Apr 2022 00:42:38 +0000 (00:42 +0000)
Adds a new type ACPI_PARAMETER_BUFFER_DESCRIPTOR that can be
used by PRM module configuration code to associate a PRM handler
GUID with an ACPI parameter buffer allocated by the PRM module
configuration code.

The ACPI parameter buffer descriptors for a given PRM module
are tracked in the firmware internal structure
PRM_MODULE_CONTEXT_BUFFERS produced by the module configuration
code.

Cc: Andrew Fish <afish@apple.com>
Cc: Kang Gao <kang.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Liu Yun <yun.y.liu@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
Reviewed-by: Ankit Sinha <ankit.sinha@intel.com>
PrmPkg/Include/PrmContextBuffer.h

index 8f8144545e64bcf67788ac38d2d6afeb19d10288..8694801017730f19b4d0855816b80d936a46a2d8 100644 (file)
 \r
 #pragma pack(push, 1)\r
 \r
+//\r
+// Associates an ACPI parameter buffer with a particular PRM handler in\r
+// a PRM module.\r
+//\r
+// If either the GUID or address are zero then neither value is used to\r
+// copy the ACPI parameter buffer address to the PRMT ACPI table.\r
+//\r
+typedef struct {\r
+  EFI_GUID                              HandlerGuid;\r
+  UINT64                                AcpiParameterBufferAddress;\r
+} ACPI_PARAMETER_BUFFER_DESCRIPTOR;\r
+\r
 //\r
 // This is the context buffer structure that is passed to a PRM handler.\r
 //\r
@@ -124,6 +136,35 @@ typedef struct
   /// This pointer may be NULL if runtime memory ranges are not needed.\r
   ///\r
   PRM_RUNTIME_MMIO_RANGES                 *RuntimeMmioRanges;\r
+\r
+  ///\r
+  /// The number of ACPI parameter buffer descriptors in the array\r
+  /// AcpiParameterBufferDescriptors\r
+  ///\r
+  UINTN                                   AcpiParameterBufferDescriptorCount;\r
+\r
+  ///\r
+  /// A pointer to an array of ACPI parameter buffer descriptors. PRM module\r
+  /// configuration code uses this structure to associate a specific PRM\r
+  /// handler with an ACPI parameter buffer.\r
+  ///\r
+  /// An ACPI parameter buffer is a parameter buffer allocated by the PRM\r
+  /// module configuration code to be used by ACPI as a parameter buffer\r
+  /// to the associated PRM handler at OS runtime.\r
+  ///\r
+  /// This buffer is not required if:\r
+  /// 1. A parameter buffer is not used by a PRM handler at all\r
+  /// 2. A parameter buffer is used but the PRM handler is never invoked\r
+  ///    from ACPI (it is directly called by an OS device driver for example)\r
+  ///\r
+  /// In case #2 above, the direct PRM handler is responsible for allocating\r
+  /// a parameter buffer and passing that buffer to the PRM handler.\r
+  ///\r
+  /// A PRM module only needs to provide an ACPI_PARAMETER_BUFFER_DESCRIPTOR\r
+  /// for each PRM handler that actually uses an ACPI parameter buffer. If\r
+  /// no handlers use an ACPI parameter buffer this pointer should be NULL.\r
+  ///\r
+  ACPI_PARAMETER_BUFFER_DESCRIPTOR        *AcpiParameterBufferDescriptors;\r
 } PRM_MODULE_CONTEXT_BUFFERS;\r
 \r
 #pragma pack(pop)\r