summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2004-03-12 14:35:17 -0500
committerLen Brown <lenb@dhcppc3.>2004-03-12 14:35:17 -0500
commit954c9189851775caea1e98d767c20bcf2824ed88 (patch)
tree9351797e8af2da05386891515da266b5faa0f93d /include
parentae386697bf1c45ad8991a6e90665db448877df01 (diff)
[ACPI] ACPICA 20040311 from Bob Moore
Fixed a problem where errors occurring during the parse phase of control method execution did not abort cleanly. For example, objects created and installed in the namespace were not deleted. This caused all subsequent invocations of the method to return the AE_ALREADY_EXISTS exception. Implemented a mechanism to force a control method to "Serialized" execution if the method attempts to create namespace objects. (The root of the AE_ALREADY_EXISTS problem.) Implemented support for the predefined _OSI "internal" control method. Initial supported strings are "Linux", "Windows 2000", "Windows 2001", and "Windows 2001.1", and can be easily upgraded for new strings as necessary. This feature allows Linux to execute the fully tested, "Windows" code path through the ASL code Global Lock Support: Now allows multiple acquires and releases with any internal thread. Removed concept of "owning thread" for this special mutex. Fixed two functions that were inappropriately declaring large objects on the CPU stack: ps_parse_loop() and ns_evaluate_relative(). Reduces the stack usage during method execution considerably. Fixed a problem in the ACPI 2.0 FACS descriptor (actbl2.h) where the S4Bios_f field was incorrectly defined as UINT32 instead of UINT32_BIT. Fixed a problem where acpi_ev_gpe_detect() would fault if there were no GPEs defined on the machine. Implemented two runtime options: One to force all control method execution to "Serialized" to mimic Windows behavior, another to disable _OSI support if it causes problems on a given machine.
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acconfig.h6
-rw-r--r--include/acpi/acglobal.h11
-rw-r--r--include/acpi/acmacros.h3
-rw-r--r--include/acpi/acobject.h7
-rw-r--r--include/acpi/actypes.h5
-rw-r--r--include/acpi/acutils.h6
-rw-r--r--include/acpi/amlcode.h14
7 files changed, 36 insertions, 16 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 6a152b1478cf..324bdccdace1 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -64,7 +64,7 @@
/* Version string */
-#define ACPI_CA_VERSION 0x20040220
+#define ACPI_CA_VERSION 0x20040311
/* Maximum objects in the various object caches */
@@ -185,6 +185,10 @@
#define ACPI_SMBUS_BUFFER_SIZE 34
+/* Number of strings associated with the _OSI reserved method */
+
+#define ACPI_NUM_OSI_STRINGS 4
+
/******************************************************************************
*
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h
index 2af4139a0030..0c869e70dd23 100644
--- a/include/acpi/acglobal.h
+++ b/include/acpi/acglobal.h
@@ -79,6 +79,14 @@ extern u32 acpi_dbg_layer;
extern u32 acpi_gbl_nesting_level;
+/*****************************************************************************
+ *
+ * Runtime configuration
+ *
+ ****************************************************************************/
+
+ACPI_EXTERN u8 acpi_gbl_create_osi_method;
+ACPI_EXTERN u8 acpi_gbl_all_methods_serialized;
/*****************************************************************************
*
@@ -169,6 +177,7 @@ extern const char *acpi_gbl_sleep_state_names[ACPI_
extern const char *acpi_gbl_highest_dstate_names[4];
extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
+extern const char *acpi_gbl_valid_osi_strings[ACPI_NUM_OSI_STRINGS];
/*****************************************************************************
@@ -179,7 +188,7 @@ extern const char *acpi_gbl_region_types[ACPI_NUM_P
#define NUM_NS_TYPES ACPI_TYPE_INVALID+1
-#if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
+#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
#define NUM_PREDEFINED_NAMES 10
#else
#define NUM_PREDEFINED_NAMES 9
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index e1abf964bf3a..245bc0bc5734 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -681,7 +681,4 @@
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
-
-#define ACPI_GET_STACK_POINTER _asm {mov eax, ebx}
-
#endif /* ACMACROS_H */
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h
index 6caaf6ade256..51abddaf15a2 100644
--- a/include/acpi/acobject.h
+++ b/include/acpi/acobject.h
@@ -180,7 +180,11 @@ struct acpi_object_event
};
-#define INFINITE_CONCURRENCY 0xFF
+#define ACPI_INFINITE_CONCURRENCY 0xFF
+
+typedef
+acpi_status (*ACPI_INTERNAL_METHOD) (
+ struct acpi_walk_state *walk_state);
struct acpi_object_method
{
@@ -190,6 +194,7 @@ struct acpi_object_method
u32 aml_length;
void *semaphore;
u8 *aml_start;
+ ACPI_INTERNAL_METHOD implementation;
u8 concurrency;
u8 thread_count;
acpi_owner_id owning_id;
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 369b43a344d3..9cbb7565a9d7 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -349,7 +349,6 @@ typedef u64 acpi_integer;
/*
* Power state values
*/
-
#define ACPI_STATE_UNKNOWN (u8) 0xFF
#define ACPI_STATE_S0 (u8) 0
@@ -393,7 +392,6 @@ typedef u64 acpi_integer;
#define ACPI_NOTIFY_BUS_MODE_MISMATCH (u8) 6
#define ACPI_NOTIFY_POWER_FAULT (u8) 7
-
/*
* Table types. These values are passed to the table related APIs
*/
@@ -409,7 +407,6 @@ typedef u32 acpi_table_type;
#define ACPI_TABLE_MAX 6
#define NUM_ACPI_TABLE_TYPES (ACPI_TABLE_MAX+1)
-
/*
* Types associated with ACPI names and objects. The first group of
* values (up to ACPI_TYPE_EXTERNAL_MAX) correspond to the definition
@@ -794,7 +791,7 @@ acpi_status (*acpi_init_handler) (
#define ACPI_INIT_DEVICE_INI 1
-/* Address Spaces (Operation Regions */
+/* Address Spaces (For Operation Regions) */
typedef
acpi_status (*acpi_adr_space_handler) (
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h
index 1979e93ba857..bdce731d0677 100644
--- a/include/acpi/acutils.h
+++ b/include/acpi/acutils.h
@@ -52,7 +52,6 @@ acpi_status (*acpi_pkg_callback) (
union acpi_generic_state *state,
void *context);
-
acpi_status
acpi_ut_walk_package_tree (
union acpi_operand_object *source_object,
@@ -60,7 +59,6 @@ acpi_ut_walk_package_tree (
acpi_pkg_callback walk_callback,
void *context);
-
struct acpi_pkg_info
{
u8 *free_space;
@@ -476,6 +474,10 @@ acpi_ut_delete_internal_object_list (
acpi_status
+acpi_ut_osi_implementation (
+ struct acpi_walk_state *walk_state);
+
+acpi_status
acpi_ut_evaluate_object (
struct acpi_namespace_node *prefix_node,
char *path,
diff --git a/include/acpi/amlcode.h b/include/acpi/amlcode.h
index 512071acbcc6..0344b94c863d 100644
--- a/include/acpi/amlcode.h
+++ b/include/acpi/amlcode.h
@@ -496,11 +496,17 @@ typedef enum
} AML_ACCESS_ATTRIBUTE;
-/* bit fields in method_flags byte */
+/* Bit fields in method_flags byte */
-#define METHOD_FLAGS_ARG_COUNT 0x07
-#define METHOD_FLAGS_SERIALIZED 0x08
-#define METHOD_FLAGS_SYNCH_LEVEL 0xF0
+#define AML_METHOD_ARG_COUNT 0x07
+#define AML_METHOD_SERIALIZED 0x08
+#define AML_METHOD_SYNCH_LEVEL 0xF0
+
+/* METHOD_FLAGS_ARG_COUNT is not used internally, define additional flags */
+
+#define AML_METHOD_INTERNAL_ONLY 0x01
+#define AML_METHOD_RESERVED1 0x02
+#define AML_METHOD_RESERVED2 0x04
#endif /* __AMLCODE_H__ */