2 Dynamic Table Factory Dxe
4 Copyright (c) 2017 - 2018, ARM Limited. All rights reserved.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include <Library/DebugLib.h>
11 #include <Library/PcdLib.h>
12 #include <Library/UefiBootServicesTableLib.h>
13 #include <Protocol/AcpiTable.h>
15 // Module specific include files.
16 #include <AcpiTableGenerator.h>
17 #include <ConfigurationManagerObject.h>
18 #include <ConfigurationManagerHelper.h>
19 #include <DeviceTreeTableGenerator.h>
20 #include <Library/TableHelperLib.h>
21 #include <Protocol/ConfigurationManagerProtocol.h>
22 #include <Protocol/DynamicTableFactoryProtocol.h>
23 #include <SmbiosTableGenerator.h>
25 #include "DynamicTableFactory.h"
27 /** The Dynamic Table Factory protocol structure that holds the
28 list of registered ACPI and SMBIOS table generators.
30 EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo
;
32 /** A structure describing the Dynamic Table Factory protocol.
36 EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL DynamicTableFactoryProtocol
= {
37 CREATE_REVISION (1, 0),
38 GetAcpiTableGenerator
,
39 RegisterAcpiTableGenerator
,
40 DeregisterAcpiTableGenerator
,
41 GetSmbiosTableGenerator
,
42 RegisterSmbiosTableGenerator
,
43 DeregisterSmbiosTableGenerator
,
45 RegisterDtTableGenerator
,
46 DeregisterDtTableGenerator
,
50 /** Entrypoint for Dynamic Table Factory Dxe.
55 @retval EFI_SUCCESS Success.
56 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
57 @retval EFI_NOT_FOUND Required interface/object was not found.
58 @retval EFI_INVALID_PARAMETER Some parameter is incorrect/invalid.
62 DynamicTableFactoryDxeInitialize (
63 IN EFI_HANDLE ImageHandle
,
64 IN EFI_SYSTEM_TABLE
* CONST SystemTable
69 Status
= gBS
->InstallProtocolInterface (
71 &gEdkiiDynamicTableFactoryProtocolGuid
,
73 (VOID
*)&DynamicTableFactoryProtocol
75 if (EFI_ERROR (Status
)) {
78 "ERROR: Failed to install the Dynamic Table Factory Protocol." \