MdePkg:
[mirror_edk2.git] / OldMdePkg / Include / Protocol / AcpiTable.h
1 /** @file
2 This protocol may be used to install or remove an ACPI table from a platform.
3
4 Copyright (c) 2007, Intel Corporation
5 All rights reserved. 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
9
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.
12
13 Module Name: AcpiTable.h
14
15 @par Revision Reference:
16 ACPI Table Protocol from the UEFI 2.1 specification.
17
18 **/
19
20 #ifndef __ACPI_TABLE_H__
21 #define __ACPI_TABLE_H__
22
23 //
24 // Global ID for the Acpi Table Protocol
25 //
26 #define EFI_ACPI_TABLE_PROTOCOL_GUID \
27 { \
28 0xffe06bdd, 0x6107, 0x46a6, {0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c} \
29 }
30
31 typedef struct _EFI_ACPI_TABLE_PROTOCOL EFI_ACPI_TABLE_PROTOCOL;
32
33 #define UEFI_ACPI_TABLE_SIGNATURE EFI_SIGNATURE_32 ('U', 'E', 'F', 'I')
34
35 /**
36 Installs an ACPI table into the RSDT/XSDT.
37
38 @param This Protocol instance pointer.
39 @param AcpiTableBuffer A pointer to a buffer containing the ACPI table
40 to be installed.
41 @param AcpiTableBufferSize Specifies the size, in bytes, of the
42 AcpiTableBuffer buffer.
43 @param TableKey Reurns a key to refer to the ACPI table.
44
45 @retval EFI_SUCCESS The table was successfully inserted.
46 @retval EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL, TableKey is
47 NULL, or AcpiTableBufferSize and the size field
48 embedded in the ACPI table pointed to by
49 AcpiTableBuffer are not in sync.
50 @retval EFI_OUT_OF_RESOURCES Insufficient resources exist to complete the
51 request.
52
53 **/
54 typedef
55 EFI_STATUS
56 (EFIAPI *EFI_ACPI_TABLE_INSTALL_ACPI_TABLE) (
57 IN EFI_ACPI_TABLE_PROTOCOL *This,
58 IN VOID *AcpiTableBuffer,
59 IN UINTN AcpiTableBufferSize,
60 OUT UINTN *TableKey
61 )
62 ;
63
64 /**
65 Removes an ACPI table from the RSDT/XSDT.
66
67 @param This Protocol instance pointer.
68 @param TableKey Specifies the table to uninstall. The key was
69 returned from InstallAcpiTable().
70
71 @retval EFI_SUCCESS The table was successfully uninstalled.
72 @retval EFI_NOT_FOUND TableKey does not refer to a valid key for a
73 table entry.
74
75 **/
76 typedef
77 EFI_STATUS
78 (EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE) (
79 IN EFI_ACPI_TABLE_PROTOCOL *This,
80 IN UINTN TableKey
81 )
82 ;
83
84 //
85 // Interface structure for the ACPI Table Protocol
86 //
87 struct _EFI_ACPI_TABLE_PROTOCOL {
88 EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable;
89 EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;
90 };
91
92 //
93 // Extern the GUID for protocol users.
94 //
95 extern EFI_GUID gEfiAcpiTableProtocolGuid;
96
97 #endif