]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2007, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | AcpiTable.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | ACPI Table Protocol from the UEFI 2.1 specification.\r | |
19 | \r | |
20 | This protocol may be used to install or remove an ACPI table from a platform.\r | |
21 | \r | |
22 | --*/\r | |
23 | \r | |
24 | #ifndef __ACPI_TABLE_H__\r | |
25 | #define __ACPI_TABLE_H__\r | |
26 | \r | |
27 | #include "Acpi.h"\r | |
28 | \r | |
29 | //\r | |
30 | // Global ID for the Acpi Table Protocol\r | |
31 | //\r | |
32 | #define EFI_ACPI_TABLE_PROTOCOL_GUID \\r | |
33 | { \\r | |
34 | 0xffe06bdd, 0x6107, 0x46a6, 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c \\r | |
35 | }\r | |
36 | \r | |
37 | EFI_FORWARD_DECLARATION (EFI_ACPI_TABLE_PROTOCOL);\r | |
38 | \r | |
39 | #define UEFI_ACPI_TABLE_SIGNATURE EFI_SIGNATURE_32 ('U', 'E', 'F', 'I')\r | |
40 | \r | |
41 | #pragma pack(1)\r | |
42 | \r | |
43 | typedef struct {\r | |
44 | EFI_ACPI_DESCRIPTION_HEADER Header;\r | |
45 | EFI_GUID Identifier;\r | |
46 | UINT16 DataOffset;\r | |
47 | } EFI_ACPI_TABLE;\r | |
48 | \r | |
49 | #pragma pack()\r | |
50 | \r | |
51 | typedef\r | |
52 | EFI_STATUS\r | |
53 | (EFIAPI *EFI_ACPI_TABLE_INSTALL_ACPI_TABLE) (\r | |
54 | IN EFI_ACPI_TABLE_PROTOCOL *This,\r | |
55 | IN VOID *AcpiTableBuffer,\r | |
56 | IN UINTN AcpiTableBufferSize,\r | |
57 | OUT UINTN *TableKey\r | |
58 | )\r | |
59 | /*++\r | |
60 | \r | |
61 | Routine Description:\r | |
62 | Installs an ACPI table into the RSDT/XSDT.\r | |
63 | \r | |
64 | Arguments:\r | |
65 | This - Protocol instance pointer.\r | |
66 | AcpiTableBuffer - A pointer to a buffer containing the ACPI table to be installed.\r | |
67 | AcpiTableBufferSize - Specifies the size, in bytes, of the AcpiTableBuffer buffer.\r | |
68 | TableKey - Reurns a key to refer to the ACPI table.\r | |
69 | \r | |
70 | Returns:\r | |
71 | EFI_SUCCESS - The table was successfully inserted.\r | |
72 | EFI_INVALID_PARAMETER - Either AcpiTableBuffer is NULL, TableKey is NULL, or AcpiTableBufferSize \r | |
73 | and the size field embedded in the ACPI table pointed to by AcpiTableBuffer\r | |
74 | are not in sync.\r | |
75 | EFI_OUT_OF_RESOURCES - Insufficient resources exist to complete the request.\r | |
76 | \r | |
77 | --*/\r | |
78 | ;\r | |
79 | \r | |
80 | typedef\r | |
81 | EFI_STATUS\r | |
82 | (EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE) (\r | |
83 | IN EFI_ACPI_TABLE_PROTOCOL *This,\r | |
84 | IN UINTN TableKey\r | |
85 | )\r | |
86 | /*++\r | |
87 | \r | |
88 | Routine Description:\r | |
89 | Removes an ACPI table from the RSDT/XSDT.\r | |
90 | \r | |
91 | Arguments:\r | |
92 | This - Protocol instance pointer.\r | |
93 | TableKey - Specifies the table to uninstall. The key was returned from InstallAcpiTable().\r | |
94 | \r | |
95 | Returns:\r | |
96 | EFI_SUCCESS - The table was successfully uninstalled.\r | |
97 | EFI_NOT_FOUND - TableKey does not refer to a valid key for a table entry.\r | |
98 | \r | |
99 | --*/\r | |
100 | ;\r | |
101 | \r | |
102 | //\r | |
103 | // Interface structure for the ACPI Table Protocol\r | |
104 | //\r | |
105 | typedef struct _EFI_ACPI_TABLE_PROTOCOL {\r | |
106 | EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable;\r | |
107 | EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;\r | |
108 | } EFI_ACPI_TABLE_PROTOCOL;\r | |
109 | \r | |
110 | extern EFI_GUID gEfiAcpiTableProtocolGuid;\r | |
111 | \r | |
112 | #endif\r |