1 /******************************************************************************
2  *
3  * Name: acglobal.h - Declarations for global variables
4  *
5  *****************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2007, R. Byron Moore
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  *    notice, this list of conditions, and the following disclaimer,
16  *    without modification.
17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18  *    substantially similar to the "NO WARRANTY" disclaimer below
19  *    ("Disclaimer") and any redistribution must be conditioned upon
20  *    including a substantially similar Disclaimer requirement for further
21  *    binary redistribution.
22  * 3. Neither the names of the above-listed copyright holders nor the names
23  *    of any contributors may be used to endorse or promote products derived
24  *    from this software without specific prior written permission.
25  *
26  * Alternatively, this software may be distributed under the terms of the
27  * GNU General Public License ("GPL") version 2 as published by the Free
28  * Software Foundation.
29  *
30  * NO WARRANTY
31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41  * POSSIBILITY OF SUCH DAMAGES.
42  */
43 
44 #ifndef __ACGLOBAL_H__
45 #define __ACGLOBAL_H__
46 
47 /*
48  * Ensure that the globals are actually defined and initialized only once.
49  *
50  * The use of these macros allows a single list of globals (here) in order
51  * to simplify maintenance of the code.
52  */
53 #ifdef DEFINE_ACPI_GLOBALS
54 #define ACPI_EXTERN
55 #define ACPI_INIT_GLOBAL(a,b) a=b
56 #else
57 #define ACPI_EXTERN extern
58 #define ACPI_INIT_GLOBAL(a,b) a
59 #endif
60 
61 /*****************************************************************************
62  *
63  * ACPI Table globals
64  *
65  ****************************************************************************/
66 
67 /*
68  * acpi_gbl_root_table_list is the master list of ACPI tables found in the
69  * RSDT/XSDT.
70  *
71  * acpi_gbl_FADT is a local copy of the FADT, converted to a common format.
72  */
73 ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list;
74 ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT;
75 
76 /* These addresses are calculated from FADT address values */
77 
78 ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable;
79 ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable;
80 
81 /*
82  * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
83  * that the ACPI hardware is no longer required. A flag in the FADT indicates
84  * a reduced HW machine, and that flag is duplicated here for convenience.
85  */
86 ACPI_EXTERN u8 acpi_gbl_reduced_hardware;
87 
88 /*****************************************************************************
89  *
90  * Miscellaneous globals
91  *
92  ****************************************************************************/
93 
94 #ifndef DEFINE_ACPI_GLOBALS
95 
96 extern char const *acpi_gbl_exception_names_env[];
97 extern char const *acpi_gbl_exception_names_pgm[];
98 extern char const *acpi_gbl_exception_names_tbl[];
99 extern char const *acpi_gbl_exception_names_aml[];
100 extern char const *acpi_gbl_exception_names_ctrl[];
101 
102 #endif
103 
104 /*****************************************************************************
105  *
106  * Hardware globals
107  *
108  ****************************************************************************/
109 
110 extern struct acpi_bit_register_info
111     acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
112 
113 #endif				/* __ACGLOBAL_H__ */
114