Michael D Kinney 9cd9bdc620 DynamicTablesPkg: Replace BSD License with BSD+Patent License
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2019-04-09 10:57:57 -07:00

85 lines
2.3 KiB
C

/** @file
Dynamic Table Factory Dxe
Copyright (c) 2017 - 2018, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Library/DebugLib.h>
#include <Library/PcdLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/AcpiTable.h>
// Module specific include files.
#include <AcpiTableGenerator.h>
#include <ConfigurationManagerObject.h>
#include <ConfigurationManagerHelper.h>
#include <DeviceTreeTableGenerator.h>
#include <Library/TableHelperLib.h>
#include <Protocol/ConfigurationManagerProtocol.h>
#include <Protocol/DynamicTableFactoryProtocol.h>
#include <SmbiosTableGenerator.h>
#include "DynamicTableFactory.h"
/** The Dynamic Table Factory protocol structure that holds the
list of registered ACPI and SMBIOS table generators.
*/
EDKII_DYNAMIC_TABLE_FACTORY_INFO TableFactoryInfo;
/** A structure describing the Dynamic Table Factory protocol.
*/
STATIC
CONST
EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL DynamicTableFactoryProtocol = {
CREATE_REVISION (1, 0),
GetAcpiTableGenerator,
RegisterAcpiTableGenerator,
DeregisterAcpiTableGenerator,
GetSmbiosTableGenerator,
RegisterSmbiosTableGenerator,
DeregisterSmbiosTableGenerator,
GetDtTableGenerator,
RegisterDtTableGenerator,
DeregisterDtTableGenerator,
&TableFactoryInfo
};
/** Entrypoint for Dynamic Table Factory Dxe.
@param ImageHandle
@param SystemTable
@retval EFI_SUCCESS Success.
@retval EFI_OUT_OF_RESOURCES Memory allocation failed.
@retval EFI_NOT_FOUND Required interface/object was not found.
@retval EFI_INVALID_PARAMETER Some parameter is incorrect/invalid.
**/
EFI_STATUS
EFIAPI
DynamicTableFactoryDxeInitialize (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE * CONST SystemTable
)
{
EFI_STATUS Status;
Status = gBS->InstallProtocolInterface (
&ImageHandle,
&gEdkiiDynamicTableFactoryProtocolGuid,
EFI_NATIVE_INTERFACE,
(VOID*)&DynamicTableFactoryProtocol
);
if (EFI_ERROR (Status)) {
DEBUG ((
DEBUG_ERROR,
"ERROR: Failed to install the Dynamic Table Factory Protocol." \
" Status = %r\n",
Status
));
}
return Status;
}