2 ACPI Table Protocol Driver
4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #include "AcpiTable.h"
21 // Handle to install ACPI Table Protocol
23 EFI_HANDLE mHandle
= NULL
;
26 Entry point of the ACPI table driver.
27 Creates and initializes an instance of the ACPI Table
28 Protocol and installs it on a new handle.
30 @param ImageHandle A handle for the image that is initializing this driver.
31 @param SystemTable A pointer to the EFI system table.
33 @return EFI_SUCCESS Driver initialized successfully.
34 @return EFI_LOAD_ERROR Failed to Initialize or has been loaded.
35 @return EFI_OUT_OF_RESOURCES Could not allocate needed resources.
40 InitializeAcpiTableDxe (
41 IN EFI_HANDLE ImageHandle
,
42 IN EFI_SYSTEM_TABLE
*SystemTable
46 EFI_ACPI_TABLE_INSTANCE
*PrivateData
;
49 // Initialize our protocol
51 PrivateData
= AllocateZeroPool (sizeof (EFI_ACPI_TABLE_INSTANCE
));
53 PrivateData
->Signature
= EFI_ACPI_TABLE_SIGNATURE
;
56 // Call all constructors per produced protocols
58 Status
= AcpiTableAcpiTableConstructor (PrivateData
);
59 if (EFI_ERROR (Status
)) {
60 gBS
->FreePool (PrivateData
);
61 return EFI_LOAD_ERROR
;
65 // Install ACPI Table protocol
67 Status
= gBS
->InstallMultipleProtocolInterfaces (
69 &gEfiAcpiTableProtocolGuid
,
70 &PrivateData
->AcpiTableProtocol
,
73 ASSERT_EFI_ERROR (Status
);