summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg/Include/Library
diff options
context:
space:
mode:
authorSami Mujawar <sami.mujawar@arm.com>2018-12-15 12:02:25 +0000
committerSami Mujawar <sami.mujawar@arm.com>2019-02-19 10:37:30 +0000
commit7130bceff29ec52b0e673d4f61a9681ff5d71c67 (patch)
treea6a9de5652a6071987cbeb33d27a3c477dd6f715 /DynamicTablesPkg/Include/Library
parentc642023894f24c0b71d66f55cceb38b849ffc6bd (diff)
downloadedk2-7130bceff29ec52b0e673d4f61a9681ff5d71c67.tar.gz
edk2-7130bceff29ec52b0e673d4f61a9681ff5d71c67.tar.bz2
edk2-7130bceff29ec52b0e673d4f61a9681ff5d71c67.zip
DynamicTablesPkg: Table Helper Library
A helper library that implements common functionality for use by table generators. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <alexei.fedorov@arm.com>
Diffstat (limited to 'DynamicTablesPkg/Include/Library')
-rw-r--r--DynamicTablesPkg/Include/Library/TableHelperLib.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/DynamicTablesPkg/Include/Library/TableHelperLib.h b/DynamicTablesPkg/Include/Library/TableHelperLib.h
new file mode 100644
index 0000000000..3c4e1d23d2
--- /dev/null
+++ b/DynamicTablesPkg/Include/Library/TableHelperLib.h
@@ -0,0 +1,68 @@
+/** @file
+
+ Copyright (c) 2017 - 2019, ARM Limited. All rights reserved.
+
+ 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.
+
+**/
+
+#ifndef TABLE_HELPER_LIB_H_
+#define TABLE_HELPER_LIB_H_
+
+/** The GetCgfMgrInfo function gets the CM_STD_OBJ_CONFIGURATION_MANAGER_INFO
+ object from the Configuration Manager.
+
+ @param [in] CfgMgrProtocol Pointer to the Configuration Manager protocol
+ interface.
+ @param [out] CfgMfrInfo Pointer to the Configuration Manager Info
+ object structure.
+
+ @retval EFI_SUCCESS The object is returned.
+ @retval EFI_INVALID_PARAMETER The Object ID is invalid.
+ @retval EFI_NOT_FOUND The requested Object is not found.
+ @retval EFI_BAD_BUFFER_SIZE The size returned by the Configuration
+ Manager is less than the Object size.
+**/
+EFI_STATUS
+EFIAPI
+GetCgfMgrInfo (
+ IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtocol,
+ OUT CM_STD_OBJ_CONFIGURATION_MANAGER_INFO ** CfgMfrInfo
+ );
+
+/** The AddAcpiHeader function updates the ACPI header structure. It uses the
+ ACPI table Generator and the Configuration Manager protocol to obtain the
+ information required for constructing the header.
+
+ @param [in] CfgMgrProtocol Pointer to the Configuration Manager
+ protocol interface.
+ @param [in] Generator Pointer to the ACPI table Generator.
+ @param [in,out] AcpiHeader Pointer to the ACPI table header to be
+ updated.
+ @param [in] Revision Revision of the ACPI table.
+ @param [in] Length Length of the ACPI table.
+
+ @retval EFI_SUCCESS The ACPI table is updated successfully.
+ @retval EFI_INVALID_PARAMETER A parameter is invalid.
+ @retval EFI_NOT_FOUND The required object information is not found.
+ @retval EFI_BAD_BUFFER_SIZE The size returned by the Configuration
+ Manager is less than the Object size for the
+ requested object.
+**/
+EFI_STATUS
+EFIAPI
+AddAcpiHeader (
+ IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtocol,
+ IN CONST ACPI_TABLE_GENERATOR * CONST Generator,
+ IN OUT EFI_ACPI_DESCRIPTION_HEADER * CONST AcpiHeader,
+ IN CONST UINT32 Revision,
+ IN CONST UINT32 Length
+ );
+
+#endif // TABLE_HELPER_LIB_H_