2 Dynamic Table Factory Dxe
4 Copyright (c) 2017 - 2018, ARM Limited. All rights reserved.
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include <Library/DebugLib.h>
17 #include <Library/PcdLib.h>
18 #include <Library/UefiBootServicesTableLib.h>
19 #include <Protocol/AcpiTable.h>
21 // Module specific include files.
22 #include <AcpiTableGenerator.h>
23 #include <ConfigurationManagerObject.h>
24 #include <ConfigurationManagerHelper.h>
25 #include <DeviceTreeTableGenerator.h>
26 #include <Library/TableHelperLib.h>
27 #include <Protocol/ConfigurationManagerProtocol.h>
28 #include <Protocol/DynamicTableFactoryProtocol.h>
29 #include <SmbiosTableGenerator.h>
31 #include "DynamicTableFactory.h"
33 /** The Dynamic Table Factory protocol structure that holds the
34 list of registered ACPI and SMBIOS table generators.
36 EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo
;
38 /** A structure describing the Dynamic Table Factory protocol.
42 EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL DynamicTableFactoryProtocol
= {
43 CREATE_REVISION (1, 0),
44 GetAcpiTableGenerator
,
45 RegisterAcpiTableGenerator
,
46 DeregisterAcpiTableGenerator
,
47 GetSmbiosTableGenerator
,
48 RegisterSmbiosTableGenerator
,
49 DeregisterSmbiosTableGenerator
,
51 RegisterDtTableGenerator
,
52 DeregisterDtTableGenerator
,
56 /** Entrypoint for Dynamic Table Factory Dxe.
61 @retval EFI_SUCCESS Success.
62 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
63 @retval EFI_NOT_FOUND Required interface/object was not found.
64 @retval EFI_INVALID_PARAMETER Some parameter is incorrect/invalid.
68 DynamicTableFactoryDxeInitialize (
69 IN EFI_HANDLE ImageHandle
,
70 IN EFI_SYSTEM_TABLE
* CONST SystemTable
75 Status
= gBS
->InstallProtocolInterface (
77 &gEdkiiDynamicTableFactoryProtocolGuid
,
79 (VOID
*)&DynamicTableFactoryProtocol
81 if (EFI_ERROR (Status
)) {
84 "ERROR: Failed to install the Dynamic Table Factory Protocol." \