1 /*++
2 
3   Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
4 
5 
6   This program and the accompanying materials are licensed and made available under
7 
8   the terms and conditions of the BSD License that accompanies this distribution.
9 
10   The full text of the license may be found at
11 
12   http://opensource.org/licenses/bsd-license.php.
13 
14 
15 
16   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
17 
18   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 
20 
21 
22 
23 Module Name:
24 
25   AcpiPlatformHooksLib.h
26 
27 Abstract:
28 
29   This is an implementation of the ACPI platform driver.  Requirements for
30   this driver are defined in the Tiano ACPI External Product Specification,
31   revision 0.3.6.
32 
33 --*/
34 
35 #ifndef _ACPI_PLATFORM_HOOKS_LIB_H_
36 #define _ACPI_PLATFORM_HOOKS_LIB_H_
37 
38 //
39 // Statements that include other header files.
40 //
41 #include <IndustryStandard/Acpi.h>
42 
43 /**
44   Returns the ACPI table version that the platform wants.
45 
46   @param[in]  None
47 
48   @retval  EFI_ACPI_TABLE_VERSION_NONE  if ACPI is to be disabled.
49   @retval  EFI_ACPI_TABLE_VERSION_1_0B  if 1.0b.
50   @retval  EFI_ACPI_TABLE_VERSION_2_00  if 2.00.
51 **/
52 EFI_ACPI_TABLE_VERSION
53 AcpiPlatformHooksGetAcpiTableVersion (
54   VOID
55   );
56 
57 /**
58   Returns the OEMID, OEM Table ID, OEM Revision.
59 
60   @param[in]  None
61 
62   @retval  OemId        OEM ID string for ACPI tables, maximum 6 ASCII characters.
63                         This is an OEM-supplied string that identifies the OEM.
64   @retval  OemTableId   An OEM-supplied string that the OEM uses to identify
65                         the particular data table. This field is particularly useful
66                         when defining a definition block to distinguish definition block
67                         functions. The OEM assigns each dissimilar table a new OEM Table ID.
68   @retval  OemRevision  An OEM-supplied revision number for ACPI tables.
69                         Larger numbers are assumed to be newer revisions.
70 
71 **/
72 EFI_STATUS
73 AcpiPlatformHooksGetOemFields (
74   OUT UINT8   *OemId,
75   OUT UINT64  *OemTableId,
76   OUT UINT32  *OemRevision
77   );
78 
79  /**
80   Called for every ACPI table found in the BIOS flash.
81   Returns whether a table is active or not. Inactive tables
82   are not published in the ACPI table list. This hook can be
83   used to implement optional SSDT tables or enabling/disabling
84   specific functionality (e.g. SPCR table) based on a setup
85   switch or platform preference. In case of optional SSDT tables,
86   the platform flash will include all the SSDT tables but will
87   return EFI_SUCCESS only for those tables that need to be
88   published.
89   This hook can also be used to update the table data. The header
90   is updated by the common code. For example, if a platform wants
91   to use an SSDT table to export some platform settings to the
92   ACPI code, it needs to update the data inside that SSDT based
93   on platform preferences in this hook.
94 
95   @param[in]  None
96 
97   @retval  EFI_SUCCESS      if the table is active.
98   @retval  EFI_UNSUPPORTED  if the table is not active.
99 **/
100 EFI_STATUS
101 AcpiPlatformHooksIsActiveTable (
102   IN OUT EFI_ACPI_COMMON_HEADER     *Table
103   );
104 
105 #endif
106