You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[ACPI] ACPICA 20050729 from Bob Moore
Implemented support to ignore an attempt to install/load a particular ACPI table more than once. Apparently there exists BIOS code that repeatedly attempts to load the same SSDT upon certain events. Thanks to Venkatesh Pallipadi. Restructured the main interface to the AML parser in order to correctly handle all exceptional conditions. This will prevent leakage of the OwnerId resource and should eliminate the AE_OWNER_ID_LIMIT exceptions seen on some machines. Thanks to Alexey Starikovskiy. Support for "module level code" has been disabled in this version due to a number of issues that have appeared on various machines. The support can be enabled by defining ACPI_ENABLE_MODULE_LEVEL_CODE during subsystem compilation. When the issues are fully resolved, the code will be enabled by default again. Modified the internal functions for debug print support to define the FunctionName parameter as a (const char *) for compatibility with compiler built-in macros such as __FUNCTION__, etc. Linted the entire ACPICA source tree for both 32-bit and 64-bit. Signed-off-by: Robert Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
|
||||
/* Version string */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20050708
|
||||
#define ACPI_CA_VERSION 0x20050729
|
||||
|
||||
/*
|
||||
* OS name, used for the _OS object. The _OS object is essentially obsolete,
|
||||
|
||||
@@ -236,7 +236,7 @@ acpi_ds_method_data_init (
|
||||
*/
|
||||
acpi_status
|
||||
acpi_ds_parse_method (
|
||||
acpi_handle obj_handle);
|
||||
struct acpi_namespace_node *node);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_call_control_method (
|
||||
@@ -391,7 +391,7 @@ acpi_ds_init_aml_walk (
|
||||
u8 *aml_start,
|
||||
u32 aml_length,
|
||||
struct acpi_parameter_info *info,
|
||||
u32 pass_number);
|
||||
u8 pass_number);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_obj_stack_pop_and_delete (
|
||||
|
||||
@@ -505,8 +505,10 @@
|
||||
* The Name parameter should be the procedure name as a quoted string.
|
||||
* This is declared as a local string ("my_function_name") so that it can
|
||||
* be also used by the function exit macros below.
|
||||
* Note: (const char) is used to be compatible with the debug interfaces
|
||||
* and macros such as __FUNCTION__.
|
||||
*/
|
||||
#define ACPI_FUNCTION_NAME(name) char *_acpi_function_name = name;
|
||||
#define ACPI_FUNCTION_NAME(name) const char *_acpi_function_name = name;
|
||||
|
||||
#else
|
||||
/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
|
||||
|
||||
@@ -78,6 +78,11 @@
|
||||
#define ACPI_NS_ROOT_PATH "\\"
|
||||
#define ACPI_NS_SYSTEM_BUS "_SB_"
|
||||
|
||||
/*! [Begin] no source code translation (not handled by acpisrc) */
|
||||
#define ACPI_FUNCTION_PREFIX1 'ipcA'
|
||||
#define ACPI_FUNCTION_PREFIX2 'ipca'
|
||||
/*! [End] no source code translation !*/
|
||||
|
||||
|
||||
#endif /* __ACNAMES_H__ */
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ acpi_ns_parse_table (
|
||||
|
||||
acpi_status
|
||||
acpi_ns_one_complete_parse (
|
||||
u32 pass_number,
|
||||
u8 pass_number,
|
||||
struct acpi_table_desc *table_desc);
|
||||
|
||||
|
||||
|
||||
@@ -77,12 +77,7 @@
|
||||
* psxface - Parser external interfaces
|
||||
*/
|
||||
acpi_status
|
||||
acpi_psx_load_table (
|
||||
u8 *pcode_addr,
|
||||
u32 pcode_length);
|
||||
|
||||
acpi_status
|
||||
acpi_psx_execute (
|
||||
acpi_ps_execute_method (
|
||||
struct acpi_parameter_info *info);
|
||||
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@ struct acpi_device_walk_info
|
||||
struct acpi_walk_info
|
||||
{
|
||||
u32 debug_level;
|
||||
u32 count;
|
||||
acpi_owner_id owner_id;
|
||||
u8 display_type;
|
||||
};
|
||||
@@ -209,8 +210,10 @@ union acpi_aml_operands
|
||||
struct acpi_parameter_info
|
||||
{
|
||||
struct acpi_namespace_node *node;
|
||||
union acpi_operand_object *obj_desc;
|
||||
union acpi_operand_object **parameters;
|
||||
union acpi_operand_object *return_object;
|
||||
u8 pass_number;
|
||||
u8 parameter_type;
|
||||
u8 return_object_type;
|
||||
};
|
||||
|
||||
@@ -178,11 +178,15 @@ acpi_tb_validate_rsdp (
|
||||
* tbutils - common table utilities
|
||||
*/
|
||||
acpi_status
|
||||
acpi_tb_is_table_installed (
|
||||
struct acpi_table_desc *new_table_desc);
|
||||
|
||||
acpi_status
|
||||
acpi_tb_verify_table_checksum (
|
||||
struct acpi_table_header *table_header);
|
||||
|
||||
u8
|
||||
acpi_tb_checksum (
|
||||
acpi_tb_generate_checksum (
|
||||
void *buffer,
|
||||
u32 length);
|
||||
|
||||
|
||||
+13
-13
@@ -302,14 +302,14 @@ acpi_ut_track_stack_ptr (
|
||||
void
|
||||
acpi_ut_trace (
|
||||
u32 line_number,
|
||||
char *function_name,
|
||||
const char *function_name,
|
||||
char *module_name,
|
||||
u32 component_id);
|
||||
|
||||
void
|
||||
acpi_ut_trace_ptr (
|
||||
u32 line_number,
|
||||
char *function_name,
|
||||
const char *function_name,
|
||||
char *module_name,
|
||||
u32 component_id,
|
||||
void *pointer);
|
||||
@@ -317,7 +317,7 @@ acpi_ut_trace_ptr (
|
||||
void
|
||||
acpi_ut_trace_u32 (
|
||||
u32 line_number,
|
||||
char *function_name,
|
||||
const char *function_name,
|
||||
char *module_name,
|
||||
u32 component_id,
|
||||
u32 integer);
|
||||
@@ -325,7 +325,7 @@ acpi_ut_trace_u32 (
|
||||
void
|
||||
acpi_ut_trace_str (
|
||||
u32 line_number,
|
||||
char *function_name,
|
||||
const char *function_name,
|
||||
char *module_name,
|
||||
u32 component_id,
|
||||
char *string);
|
||||
@@ -333,14 +333,14 @@ acpi_ut_trace_str (
|
||||
void
|
||||
acpi_ut_exit (
|
||||
u32 line_number,
|
||||
char *function_name,
|
||||
const char *function_name,
|
||||
char *module_name,
|
||||
u32 component_id);
|
||||
|
||||
void
|
||||
acpi_ut_status_exit (
|
||||
u32 line_number,
|
||||
char *function_name,
|
||||
const char *function_name,
|
||||
char *module_name,
|
||||
u32 component_id,
|
||||
acpi_status status);
|
||||
@@ -348,7 +348,7 @@ acpi_ut_status_exit (
|
||||
void
|
||||
acpi_ut_value_exit (
|
||||
u32 line_number,
|
||||
char *function_name,
|
||||
const char *function_name,
|
||||
char *module_name,
|
||||
u32 component_id,
|
||||
acpi_integer value);
|
||||
@@ -356,7 +356,7 @@ acpi_ut_value_exit (
|
||||
void
|
||||
acpi_ut_ptr_exit (
|
||||
u32 line_number,
|
||||
char *function_name,
|
||||
const char *function_name,
|
||||
char *module_name,
|
||||
u32 component_id,
|
||||
u8 *ptr);
|
||||
@@ -390,7 +390,7 @@ void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_ut_debug_print (
|
||||
u32 requested_debug_level,
|
||||
u32 line_number,
|
||||
char *function_name,
|
||||
const char *function_name,
|
||||
char *module_name,
|
||||
u32 component_id,
|
||||
char *format,
|
||||
@@ -400,7 +400,7 @@ void ACPI_INTERNAL_VAR_XFACE
|
||||
acpi_ut_debug_print_raw (
|
||||
u32 requested_debug_level,
|
||||
u32 line_number,
|
||||
char *function_name,
|
||||
const char *function_name,
|
||||
char *module_name,
|
||||
u32 component_id,
|
||||
char *format,
|
||||
@@ -598,9 +598,9 @@ acpi_status
|
||||
acpi_ut_allocate_owner_id (
|
||||
acpi_owner_id *owner_id);
|
||||
|
||||
acpi_status
|
||||
void
|
||||
acpi_ut_release_owner_id (
|
||||
acpi_owner_id owner_id);
|
||||
acpi_owner_id *owner_id);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_walk_package_tree (
|
||||
@@ -609,7 +609,7 @@ acpi_ut_walk_package_tree (
|
||||
acpi_pkg_callback walk_callback,
|
||||
void *context);
|
||||
|
||||
char *
|
||||
void
|
||||
acpi_ut_strupr (
|
||||
char *src_string);
|
||||
|
||||
|
||||
@@ -241,15 +241,15 @@
|
||||
#define ACPI_MEMCPY(d,s,n) (void) memcpy((d), (s), (acpi_size)(n))
|
||||
#define ACPI_MEMSET(d,s,n) (void) memset((d), (s), (acpi_size)(n))
|
||||
|
||||
#define ACPI_TOUPPER toupper
|
||||
#define ACPI_TOLOWER tolower
|
||||
#define ACPI_IS_XDIGIT isxdigit
|
||||
#define ACPI_IS_DIGIT isdigit
|
||||
#define ACPI_IS_SPACE isspace
|
||||
#define ACPI_IS_UPPER isupper
|
||||
#define ACPI_IS_PRINT isprint
|
||||
#define ACPI_IS_ALPHA isalpha
|
||||
#define ACPI_IS_ASCII isascii
|
||||
#define ACPI_TOUPPER(i) toupper((int) (i))
|
||||
#define ACPI_TOLOWER(i) tolower((int) (i))
|
||||
#define ACPI_IS_XDIGIT(i) isxdigit((int) (i))
|
||||
#define ACPI_IS_DIGIT(i) isdigit((int) (i))
|
||||
#define ACPI_IS_SPACE(i) isspace((int) (i))
|
||||
#define ACPI_IS_UPPER(i) isupper((int) (i))
|
||||
#define ACPI_IS_PRINT(i) isprint((int) (i))
|
||||
#define ACPI_IS_ALPHA(i) isalpha((int) (i))
|
||||
#define ACPI_IS_ASCII(i) isascii((int) (i))
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
/* Function name is used for debug output. Non-ANSI, compiler-dependent */
|
||||
|
||||
#define ACPI_GET_FUNCTION_NAME (char *) __FUNCTION__
|
||||
#define ACPI_GET_FUNCTION_NAME __FUNCTION__
|
||||
|
||||
/* This macro is used to tag functions as "printf-like" because
|
||||
* some compilers (like GCC) can catch printf format string problems.
|
||||
|
||||
Reference in New Issue
Block a user