summaryrefslogtreecommitdiffstats
path: root/PrmPkg
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2020-06-08 16:32:34 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-04-05 00:42:38 +0000
commit0b469caff6ba9553def05b95f12078e2ad86bcff (patch)
tree79dfce44900c02331d9f620044f59fe20e757573 /PrmPkg
parent0797989c5dba1157ed09586f6026af6c05df78d5 (diff)
downloadedk2-0b469caff6ba9553def05b95f12078e2ad86bcff.tar.gz
edk2-0b469caff6ba9553def05b95f12078e2ad86bcff.tar.bz2
edk2-0b469caff6ba9553def05b95f12078e2ad86bcff.zip
PrmPkg/PrmContextBuffer.h: Add ACPI parameter support structures
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>
Diffstat (limited to 'PrmPkg')
-rw-r--r--PrmPkg/Include/PrmContextBuffer.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/PrmPkg/Include/PrmContextBuffer.h b/PrmPkg/Include/PrmContextBuffer.h
index 8f8144545e..8694801017 100644
--- a/PrmPkg/Include/PrmContextBuffer.h
+++ b/PrmPkg/Include/PrmContextBuffer.h
@@ -20,6 +20,18 @@
#pragma pack(push, 1)
//
+// Associates an ACPI parameter buffer with a particular PRM handler in
+// a PRM module.
+//
+// If either the GUID or address are zero then neither value is used to
+// copy the ACPI parameter buffer address to the PRMT ACPI table.
+//
+typedef struct {
+ EFI_GUID HandlerGuid;
+ UINT64 AcpiParameterBufferAddress;
+} ACPI_PARAMETER_BUFFER_DESCRIPTOR;
+
+//
// This is the context buffer structure that is passed to a PRM handler.
//
// At OS runtime, the OS will allocate and populate this structure and
@@ -124,6 +136,35 @@ typedef struct
/// This pointer may be NULL if runtime memory ranges are not needed.
///
PRM_RUNTIME_MMIO_RANGES *RuntimeMmioRanges;
+
+ ///
+ /// The number of ACPI parameter buffer descriptors in the array
+ /// AcpiParameterBufferDescriptors
+ ///
+ UINTN AcpiParameterBufferDescriptorCount;
+
+ ///
+ /// A pointer to an array of ACPI parameter buffer descriptors. PRM module
+ /// configuration code uses this structure to associate a specific PRM
+ /// handler with an ACPI parameter buffer.
+ ///
+ /// An ACPI parameter buffer is a parameter buffer allocated by the PRM
+ /// module configuration code to be used by ACPI as a parameter buffer
+ /// to the associated PRM handler at OS runtime.
+ ///
+ /// This buffer is not required if:
+ /// 1. A parameter buffer is not used by a PRM handler at all
+ /// 2. A parameter buffer is used but the PRM handler is never invoked
+ /// from ACPI (it is directly called by an OS device driver for example)
+ ///
+ /// In case #2 above, the direct PRM handler is responsible for allocating
+ /// a parameter buffer and passing that buffer to the PRM handler.
+ ///
+ /// A PRM module only needs to provide an ACPI_PARAMETER_BUFFER_DESCRIPTOR
+ /// for each PRM handler that actually uses an ACPI parameter buffer. If
+ /// no handlers use an ACPI parameter buffer this pointer should be NULL.
+ ///
+ ACPI_PARAMETER_BUFFER_DESCRIPTOR *AcpiParameterBufferDescriptors;
} PRM_MODULE_CONTEXT_BUFFERS;
#pragma pack(pop)