EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.c

Go to the documentation of this file.
00001 
00015 //
00016 // Includes
00017 //
00018 #include "AcpiTable.h"
00019 
00020 //
00021 // Handle to install ACPI Table Protocol
00022 //
00023 EFI_HANDLE    mHandle = NULL;
00024 GLOBAL_REMOVE_IF_UNREFERENCED EFI_ACPI_TABLE_INSTANCE   *mPrivateData = NULL;
00025 
00039 EFI_STATUS
00040 EFIAPI
00041 InitializeAcpiTableDxe (
00042   IN EFI_HANDLE           ImageHandle,
00043   IN EFI_SYSTEM_TABLE     *SystemTable
00044   )
00045 {
00046   EFI_STATUS                Status;
00047   EFI_ACPI_TABLE_INSTANCE   *PrivateData;
00048 
00049   //
00050   // Initialize our protocol
00051   //
00052   PrivateData = AllocateZeroPool (sizeof (EFI_ACPI_TABLE_INSTANCE));
00053   ASSERT (PrivateData);
00054   PrivateData->Signature = EFI_ACPI_TABLE_SIGNATURE;
00055 
00056   //
00057   // Call all constructors per produced protocols
00058   //
00059   Status = AcpiTableAcpiTableConstructor (PrivateData);
00060   if (EFI_ERROR (Status)) {
00061     gBS->FreePool (PrivateData);
00062     return EFI_LOAD_ERROR;
00063   }
00064 
00065   //
00066   // Install ACPI Table protocol
00067   //
00068   if (FeaturePcdGet (PcdInstallAcpiSdtProtocol)) {
00069     mPrivateData = PrivateData;
00070     Status = gBS->InstallMultipleProtocolInterfaces (
00071                     &mHandle,
00072                     &gEfiAcpiTableProtocolGuid,
00073                     &PrivateData->AcpiTableProtocol,
00074                     &gEfiAcpiSdtProtocolGuid,
00075                     &mPrivateData->AcpiSdtProtocol,
00076                     NULL
00077                     );
00078   } else {
00079     Status = gBS->InstallMultipleProtocolInterfaces (
00080                     &mHandle,
00081                     &gEfiAcpiTableProtocolGuid,
00082                     &PrivateData->AcpiTableProtocol,
00083                     NULL
00084                     );
00085   }
00086   ASSERT_EFI_ERROR (Status);
00087 
00088   return Status;
00089 }
00090 
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines