]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / Acpi / AcpiTableDxe / AcpiTable.c
CommitLineData
5f55c700 1/** @file\r
2 ACPI Table Protocol Driver\r
3\r
e5eed7d3
HT
4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
5f55c700 6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15//\r
16// Includes\r
17//\r
18#include "AcpiTable.h"\r
19\r
20//\r
21// Handle to install ACPI Table Protocol\r
22//\r
23EFI_HANDLE mHandle = NULL;\r
24\r
25/**\r
26 Entry point of the ACPI table driver.\r
27 Creates and initializes an instance of the ACPI Table\r
28 Protocol and installs it on a new handle.\r
29\r
30 @param ImageHandle A handle for the image that is initializing this driver.\r
31 @param SystemTable A pointer to the EFI system table.\r
32\r
33 @return EFI_SUCCESS Driver initialized successfully.\r
34 @return EFI_LOAD_ERROR Failed to Initialize or has been loaded.\r
35 @return EFI_OUT_OF_RESOURCES Could not allocate needed resources.\r
36\r
37**/\r
38EFI_STATUS\r
39EFIAPI\r
40InitializeAcpiTableDxe (\r
41 IN EFI_HANDLE ImageHandle,\r
42 IN EFI_SYSTEM_TABLE *SystemTable\r
43 )\r
44{\r
45 EFI_STATUS Status;\r
46 EFI_ACPI_TABLE_INSTANCE *PrivateData;\r
47\r
48 //\r
49 // Initialize our protocol\r
50 //\r
51 PrivateData = AllocateZeroPool (sizeof (EFI_ACPI_TABLE_INSTANCE));\r
52 ASSERT (PrivateData);\r
53 PrivateData->Signature = EFI_ACPI_TABLE_SIGNATURE;\r
54\r
55 //\r
56 // Call all constructors per produced protocols\r
57 //\r
58 Status = AcpiTableAcpiTableConstructor (PrivateData);\r
59 if (EFI_ERROR (Status)) {\r
60 gBS->FreePool (PrivateData);\r
61 return EFI_LOAD_ERROR;\r
62 }\r
63\r
64 //\r
65 // Install ACPI Table protocol\r
66 //\r
67 Status = gBS->InstallMultipleProtocolInterfaces (\r
68 &mHandle,\r
69 &gEfiAcpiTableProtocolGuid,\r
70 &PrivateData->AcpiTableProtocol,\r
71 NULL\r
72 );\r
73 ASSERT_EFI_ERROR (Status);\r
74\r
75 return Status;\r
76}\r
77\r