]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/AcpiTable.h
Code Scrub for Protocol and Ppi Definition
[mirror_edk2.git] / MdePkg / Include / Protocol / AcpiTable.h
1 /** @file
2 The file provides the protocol to install or remove an ACPI
3 table from a platform.
4
5 Copyright (c) 2006 - 2008, Intel Corporation
6 All rights reserved. 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
10
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.
13
14 **/
15
16 #ifndef __ACPI_TABLE_H___
17 #define __ACPI_TABLE_H___
18
19 #define EFI_ACPI_TABLE_PROTOCOL_GUID \
20 { 0xffe06bdd, 0x6107, 0x46a6, { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c }}
21
22
23 typedef struct _EFI_ACPI_TABLE_PROTOCOL EFI_ACPI_TABLE_PROTOCOL;
24
25 /**
26
27 The InstallAcpiTable() function allows a caller to install an
28 ACPI table. When successful, the table will be linked by the
29 RSDT/XSDT. AcpiTableBuffer specifies the table to be installed.
30 InstallAcpiTable() will make a copy of the table and insert the
31 copy into the RSDT/XSDT. InstallAcpiTable() must insert the new
32 table at the end of the RSDT/XSDT. To prevent namespace
33 collision, ACPI tables may be created using UEFI ACPI table
34 format. See Appendix O. On successful output, TableKey is
35 initialized with a unique key. Its value may be used in a
36 subsequent call to UninstallAcpiTable to remove an ACPI table.
37 If an EFI application is running at the time of this call, the
38 relevant EFI_CONFIGURATION_TABLE pointer to the RSDT is no
39 longer considered valid.
40
41
42 @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.
43
44 @param AcpiTableBuffer A pointer to a buffer containing the
45 ACPI table to be installed.
46
47 @param AcpiTableBufferSize Specifies the size, in bytes, of
48 the AcpiTableBuffer buffer.
49
50
51 @param TableKey Returns a key to refer to the ACPI table.
52
53 @retval EFI_SUCCESS The table was successfully inserted
54
55 @retval EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL,
56 TableKey is NULL, or
57 AcpiTableBufferSize and the size
58 field embedded in the ACPI table
59 pointed to by AcpiTableBuffer
60 are not in sync.
61
62 @retval EFI_OUT_OF_RESOURCES Insufficient resources exist to
63 complete the request.
64
65 **/
66 typedef
67 EFI_STATUS
68 (EFIAPI *EFI_ACPI_TABLE_INSTALL_ACPI_TABLE)(
69 IN CONST EFI_ACPI_TABLE_PROTOCOL *This,
70 IN CONST VOID *AcpiTableBuffer,
71 IN UINTN AcpiTableBufferSize,
72 OUT UINTN *TableKey
73 );
74
75
76 /**
77
78 The UninstallAcpiTable() function allows a caller to remove an
79 ACPI table. The routine will remove its reference from the
80 RSDT/XSDT. A table is referenced by the TableKey parameter
81 returned from a prior call to InstallAcpiTable(). If an EFI
82 application is running at the time of this call, the relevant
83 EFI_CONFIGURATION_TABLE pointer to the RSDT is no longer
84 considered valid.
85
86 @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.
87
88 @param TableKey Specifies the table to uninstall. The key was
89 returned from InstallAcpiTable().
90
91 @retval EFI_SUCCESS The table was successfully inserted
92
93 @retval EFI_NOT_FOUND TableKey does not refer to a valid key
94 for a table entry.
95
96 @retval EFI_OUT_OF_RESOURCES Insufficient resources exist to
97 complete the request.
98
99 **/
100 typedef
101 EFI_STATUS
102 (EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE)(
103 IN CONST EFI_ACPI_TABLE_PROTOCOL *This,
104 IN UINTN TableKey
105 );
106
107 /**
108 @par Protocol Description:
109 The EFI_ACPI_TABLE_PROTOCOL provides the ability for a component
110 to install and uninstall ACPI tables from a platform.
111
112
113 @param InstallAcpiTable Installs an ACPI table into the system.
114
115 @param UninstallAcpiTable Removes a previously installed ACPI
116 table from the system.
117
118 **/
119 struct _EFI_ACPI_TABLE_PROTOCOL {
120 EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable;
121 EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;
122 };
123
124 extern EFI_GUID gEfiAcpiTableProtocolGuid;
125
126 #endif
127