📄 acglobal.h
字号:
/****************************************************************************** * * Name: acglobal.h - Declarations for global variables * *****************************************************************************//* * Copyright (C) 2000 - 2005, R. Byron Moore * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions, and the following disclaimer, * without modification. * 2. Redistributions in binary form must reproduce at minimum a disclaimer * substantially similar to the "NO WARRANTY" disclaimer below * ("Disclaimer") and any redistribution must be conditioned upon * including a substantially similar Disclaimer requirement for further * binary redistribution. * 3. Neither the names of the above-listed copyright holders nor the names * of any contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * Alternatively, this software may be distributed under the terms of the * GNU General Public License ("GPL") version 2 as published by the Free * Software Foundation. * * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. */#ifndef __ACGLOBAL_H__#define __ACGLOBAL_H__/* * Ensure that the globals are actually defined and initialized only once. * * The use of these macros allows a single list of globals (here) in order * to simplify maintenance of the code. */#ifdef DEFINE_ACPI_GLOBALS#define ACPI_EXTERN#define ACPI_INIT_GLOBAL(a,b) a=b#else#define ACPI_EXTERN extern#define ACPI_INIT_GLOBAL(a,b) a#endif/* * Keep local copies of these FADT-based registers. NOTE: These globals * are first in this file for alignment reasons on 64-bit systems. */ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable;ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable;/***************************************************************************** * * Debug support * ****************************************************************************//* Runtime configuration of debug print levels */extern u32 acpi_dbg_level;extern u32 acpi_dbg_layer;/* Procedure nesting level for debug output */extern u32 acpi_gbl_nesting_level;/***************************************************************************** * * Runtime configuration (static defaults that can be overriden at runtime) * ****************************************************************************//* * Enable "slack" in the AML interpreter? Default is FALSE, and the * interpreter strictly follows the ACPI specification. Setting to TRUE * allows the interpreter to forgive certain bad AML constructs. Currently: * 1) Allow "implicit return" of last value in a control method * 2) Allow access beyond end of operation region * 3) Allow access to uninitialized locals/args (auto-init to integer 0) * 4) Allow ANY object type to be a source operand for the Store() operator */ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_enable_interpreter_slack, FALSE);/* * Automatically serialize ALL control methods? Default is FALSE, meaning * to use the Serialized/not_serialized method flags on a per method basis. * Only change this if the ASL code is poorly written and cannot handle * reentrancy even though methods are marked "not_serialized". */ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_all_methods_serialized, FALSE);/* * Create the predefined _OSI method in the namespace? Default is TRUE * because ACPI CA is fully compatible with other ACPI implementations. * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior. */ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_create_osi_method, TRUE);/* * Disable wakeup GPEs during runtime? Default is TRUE because WAKE and * RUNTIME GPEs should never be shared, and WAKE GPEs should typically only * be enabled just before going to sleep. */ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_leave_wake_gpes_disabled, TRUE);/***************************************************************************** * * ACPI Table globals * ****************************************************************************//* * Table pointers. * Although these pointers are somewhat redundant with the global acpi_table, * they are convenient because they are typed pointers. * * These tables are single-table only; meaning that there can be at most one * of each in the system. Each global points to the actual table. */ACPI_EXTERN u32 acpi_gbl_table_flags;ACPI_EXTERN u32 acpi_gbl_rsdt_table_count;ACPI_EXTERN struct rsdp_descriptor *acpi_gbl_RSDP;ACPI_EXTERN XSDT_DESCRIPTOR *acpi_gbl_XSDT;ACPI_EXTERN FADT_DESCRIPTOR *acpi_gbl_FADT;ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT;ACPI_EXTERN FACS_DESCRIPTOR *acpi_gbl_FACS;ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS;/* * Since there may be multiple SSDTs and PSDTS, a single pointer is not * sufficient; Therefore, there isn't one! *//* * Handle both ACPI 1.0 and ACPI 2.0 Integer widths * If we are running a method that exists in a 32-bit ACPI table. * Use only 32 bits of the Integer for conversion. */ACPI_EXTERN u8 acpi_gbl_integer_bit_width;ACPI_EXTERN u8 acpi_gbl_integer_byte_width;ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;/* * ACPI Table info arrays */extern struct acpi_table_list acpi_gbl_table_lists[NUM_ACPI_TABLE_TYPES];extern struct acpi_table_support acpi_gbl_table_data[NUM_ACPI_TABLE_TYPES];/* * Predefined mutex objects. This array contains the * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs. * (The table maps local handles to the real OS handles) */ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[NUM_MUTEX];/***************************************************************************** * * Miscellaneous globals
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -