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