⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utglobal.c

📁 内核linux2.4.20,可跟rtlinux3.2打补丁 组成实时linux系统,编译内核
💻 C
📖 第 1 页 / 共 2 页
字号:
	/* 25 */ "Resource_fld",	/* 26 */ "Region_fld_dfn",	/* 27 */ "Bank_fld_dfn",	/* 28 */ "Index_fld_dfn",	/* 29 */ "If",	/* 30 */ "Else",	/* 31 */ "While",	/* 32 */ "Scope",	/* 33 */ "Def_any",	/* 34 */ "Extra",	/* 35 */ "Invalid"};/***************************************************************************** * * FUNCTION:    Acpi_ut_get_type_name * * PARAMETERS:  None. * * RETURN:      Status * * DESCRIPTION: Translate a Type ID into a name string (Debug only) * ****************************************************************************/NATIVE_CHAR *acpi_ut_get_type_name (	u32                     type){	if (type > INTERNAL_TYPE_INVALID)	{		return ((NATIVE_CHAR *) acpi_gbl_bad_type);	}	return ((NATIVE_CHAR *) acpi_gbl_ns_type_names[type]);}/* Region type decoding */const NATIVE_CHAR *acpi_gbl_region_types[NUM_REGION_TYPES] ={	"System_memory",	"System_iO",	"PCIConfig",	"Embedded_control",	"SMBus",	"CMOS",	"PCIBar_target",};/***************************************************************************** * * FUNCTION:    Acpi_ut_get_region_name * * PARAMETERS:  None. * * RETURN:      Status * * DESCRIPTION: Translate a Space ID into a name string (Debug only) * ****************************************************************************/NATIVE_CHAR *acpi_ut_get_region_name (	u8                      space_id){	if (space_id >= USER_REGION_BEGIN)	{		return ("User_defined_region");	}	else if (space_id >= NUM_REGION_TYPES)	{		return ("Invalid_space_iD");	}	return ((NATIVE_CHAR *) acpi_gbl_region_types[space_id]);}/* Data used in keeping track of fields */const NATIVE_CHAR *acpi_gbl_FEnames[NUM_FIELD_NAMES] ={	"skip",	"?access?"};              /* FE = Field Element */const NATIVE_CHAR *acpi_gbl_match_ops[NUM_MATCH_OPS] ={	"Error",	"MTR",	"MEQ",	"MLE",	"MLT",	"MGE",	"MGT"};/* Access type decoding */const NATIVE_CHAR *acpi_gbl_access_types[NUM_ACCESS_TYPES] ={	"Any_acc",	"Byte_acc",	"Word_acc",	"DWord_acc",	"Block_acc",	"SMBSend_recv_acc",	"SMBQuick_acc"};/* Update rule decoding */const NATIVE_CHAR *acpi_gbl_update_rules[NUM_UPDATE_RULES] ={	"Preserve",	"Write_as_ones",	"Write_as_zeros"};#endif/***************************************************************************** * * FUNCTION:    Acpi_ut_valid_object_type * * PARAMETERS:  None. * * RETURN:      TRUE if valid object type * * DESCRIPTION: Validate an object type * ****************************************************************************/u8acpi_ut_valid_object_type (	u32                     type){	if (type > ACPI_TYPE_MAX)	{		if ((type < INTERNAL_TYPE_BEGIN) ||			(type > INTERNAL_TYPE_MAX))		{			return (FALSE);		}	}	return (TRUE);}/**************************************************************************** * * FUNCTION:    Acpi_ut_allocate_owner_id * * PARAMETERS:  Id_type         - Type of ID (method or table) * * DESCRIPTION: Allocate a table or method owner id * ***************************************************************************/acpi_owner_idacpi_ut_allocate_owner_id (	u32                     id_type){	acpi_owner_id           owner_id = 0xFFFF;	FUNCTION_TRACE ("Ut_allocate_owner_id");	acpi_ut_acquire_mutex (ACPI_MTX_CACHES);	switch (id_type)	{	case OWNER_TYPE_TABLE:		owner_id = acpi_gbl_next_table_owner_id;		acpi_gbl_next_table_owner_id++;		if (acpi_gbl_next_table_owner_id == FIRST_METHOD_ID)		{			acpi_gbl_next_table_owner_id = FIRST_TABLE_ID;		}		break;	case OWNER_TYPE_METHOD:		owner_id = acpi_gbl_next_method_owner_id;		acpi_gbl_next_method_owner_id++;		if (acpi_gbl_next_method_owner_id == FIRST_TABLE_ID)		{			acpi_gbl_next_method_owner_id = FIRST_METHOD_ID;		}		break;	}	acpi_ut_release_mutex (ACPI_MTX_CACHES);	return_VALUE (owner_id);}/**************************************************************************** * * FUNCTION:    Acpi_ut_init_globals * * PARAMETERS:  none * * DESCRIPTION: Init library globals.  All globals that require specific *              initialization should be initialized here! * ***************************************************************************/voidacpi_ut_init_globals (	void){	u32                     i;	FUNCTION_TRACE ("Ut_init_globals");	/* Memory allocation and cache lists */	MEMSET (acpi_gbl_memory_lists, 0, sizeof (ACPI_MEMORY_LIST) * ACPI_NUM_MEM_LISTS);	acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].link_offset      = (u16) (NATIVE_UINT) &(((acpi_generic_state *) NULL)->common.next);	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].link_offset     = (u16) (NATIVE_UINT) &(((acpi_parse_object *) NULL)->next);	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].link_offset = (u16) (NATIVE_UINT) &(((acpi_parse2_object *) NULL)->next);	acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].link_offset    = (u16) (NATIVE_UINT) &(((acpi_operand_object *) NULL)->cache.next);	acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].link_offset       = (u16) (NATIVE_UINT) &(((acpi_walk_state *) NULL)->next);	acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].object_size     = sizeof (acpi_namespace_node);	acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].object_size      = sizeof (acpi_generic_state);	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].object_size     = sizeof (acpi_parse_object);	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].object_size = sizeof (acpi_parse2_object);	acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].object_size    = sizeof (acpi_operand_object);	acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].object_size       = sizeof (acpi_walk_state);	acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].max_cache_depth  = MAX_STATE_CACHE_DEPTH;	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].max_cache_depth = MAX_PARSE_CACHE_DEPTH;	acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].max_cache_depth = MAX_EXTPARSE_CACHE_DEPTH;	acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].max_cache_depth = MAX_OBJECT_CACHE_DEPTH;	acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].max_cache_depth   = MAX_WALK_CACHE_DEPTH;	ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_GLOBAL].list_name    = "Global Memory Allocation");	ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].list_name    = "Namespace Nodes");	ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].list_name     = "State Object Cache");	ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].list_name    = "Parse Node Cache");	ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].list_name = "Extended Parse Node Cache");	ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].list_name   = "Operand Object Cache");	ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].list_name      = "Tree Walk Node Cache");	/* ACPI table structure */	for (i = 0; i < NUM_ACPI_TABLES; i++)	{		acpi_gbl_acpi_tables[i].prev        = &acpi_gbl_acpi_tables[i];		acpi_gbl_acpi_tables[i].next        = &acpi_gbl_acpi_tables[i];		acpi_gbl_acpi_tables[i].pointer     = NULL;		acpi_gbl_acpi_tables[i].length      = 0;		acpi_gbl_acpi_tables[i].allocation  = ACPI_MEM_NOT_ALLOCATED;		acpi_gbl_acpi_tables[i].count       = 0;	}	/* Address Space handler array */	for (i = 0; i < ACPI_NUM_ADDRESS_SPACES; i++)	{		acpi_gbl_address_spaces[i].handler  = NULL;		acpi_gbl_address_spaces[i].context  = NULL;	}	/* Mutex locked flags */	for (i = 0; i < NUM_MTX; i++)	{		acpi_gbl_acpi_mutex_info[i].mutex   = NULL;		acpi_gbl_acpi_mutex_info[i].owner_id = ACPI_MUTEX_NOT_ACQUIRED;		acpi_gbl_acpi_mutex_info[i].use_count = 0;	}	/* Global notify handlers */	acpi_gbl_sys_notify.handler         = NULL;	acpi_gbl_drv_notify.handler         = NULL;	/* Global "typed" ACPI table pointers */	acpi_gbl_RSDP                       = NULL;	acpi_gbl_XSDT                       = NULL;	acpi_gbl_FACS                       = NULL;	acpi_gbl_FADT                       = NULL;	acpi_gbl_DSDT                       = NULL;	/* Global Lock support */	acpi_gbl_global_lock_acquired       = FALSE;	acpi_gbl_global_lock_thread_count   = 0;	/* Miscellaneous variables */	acpi_gbl_system_flags               = 0;	acpi_gbl_startup_flags              = 0;	acpi_gbl_rsdp_original_location     = 0;	acpi_gbl_cm_single_step             = FALSE;	acpi_gbl_db_terminate_threads       = FALSE;	acpi_gbl_shutdown                   = FALSE;	acpi_gbl_ns_lookup_count            = 0;	acpi_gbl_ps_find_count              = 0;	acpi_gbl_acpi_hardware_present      = TRUE;	acpi_gbl_next_table_owner_id        = FIRST_TABLE_ID;	acpi_gbl_next_method_owner_id       = FIRST_METHOD_ID;	acpi_gbl_debugger_configuration     = DEBUGGER_THREADING;	/* Hardware oriented */	acpi_gbl_gpe0enable_register_save   = NULL;	acpi_gbl_gpe1_enable_register_save  = NULL;	acpi_gbl_original_mode              = SYS_MODE_UNKNOWN;   /*  original ACPI/legacy mode   */	acpi_gbl_gpe_registers              = NULL;	acpi_gbl_gpe_info                   = NULL;	/* Namespace */	acpi_gbl_root_node                  = NULL;	acpi_gbl_root_node_struct.name      = ACPI_ROOT_NAME;	acpi_gbl_root_node_struct.data_type = ACPI_DESC_TYPE_NAMED;	acpi_gbl_root_node_struct.type      = ACPI_TYPE_ANY;	acpi_gbl_root_node_struct.child     = NULL;	acpi_gbl_root_node_struct.peer      = NULL;	acpi_gbl_root_node_struct.object    = NULL;	acpi_gbl_root_node_struct.flags     = ANOBJ_END_OF_PEER_LIST;#ifdef ACPI_DEBUG	acpi_gbl_lowest_stack_pointer       = ACPI_UINT32_MAX;#endif	return_VOID;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -