Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
26a6239c
Commit
26a6239c
authored
Aug 28, 2002
by
Andy Grover
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPI interpreter update
parent
f647e3df
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
124 additions
and
64 deletions
+124
-64
drivers/acpi/dispatcher/dsopcode.c
drivers/acpi/dispatcher/dsopcode.c
+2
-2
drivers/acpi/dispatcher/dswload.c
drivers/acpi/dispatcher/dswload.c
+65
-10
drivers/acpi/events/evevent.c
drivers/acpi/events/evevent.c
+2
-1
drivers/acpi/events/evmisc.c
drivers/acpi/events/evmisc.c
+33
-30
drivers/acpi/include/acconfig.h
drivers/acpi/include/acconfig.h
+2
-2
drivers/acpi/include/acglobal.h
drivers/acpi/include/acglobal.h
+2
-1
drivers/acpi/include/aclocal.h
drivers/acpi/include/aclocal.h
+2
-2
drivers/acpi/include/acparser.h
drivers/acpi/include/acparser.h
+2
-1
drivers/acpi/include/actbl2.h
drivers/acpi/include/actbl2.h
+3
-3
drivers/acpi/include/platform/aclinux.h
drivers/acpi/include/platform/aclinux.h
+2
-1
drivers/acpi/utilities/utglobal.c
drivers/acpi/utilities/utglobal.c
+9
-11
No files found.
drivers/acpi/dispatcher/dsopcode.c
View file @
26a6239c
...
...
@@ -2,7 +2,7 @@
*
* Module Name: dsopcode - Dispatcher Op Region support and handling of
* "control" opcodes
* $Revision: 8
1
$
* $Revision: 8
2
$
*
*****************************************************************************/
...
...
@@ -93,7 +93,7 @@ acpi_ds_execute_arguments (
return_ACPI_STATUS
(
status
);
}
walk_state
->
parse_flags
=
0
;
walk_state
->
parse_flags
=
ACPI_PARSE_DEFERRED_OP
;
/* Pass1: Parse the entire declaration */
...
...
drivers/acpi/dispatcher/dswload.c
View file @
26a6239c
/******************************************************************************
*
* Module Name: dswload - Dispatcher namespace load callbacks
* $Revision: 7
0
$
* $Revision: 7
1
$
*
*****************************************************************************/
...
...
@@ -109,22 +109,27 @@ acpi_ds_load1_begin_op (
acpi_status
status
;
acpi_object_type
object_type
;
NATIVE_CHAR
*
path
;
u32
flags
;
ACPI_FUNCTION_NAME
(
"Ds_load1_begin_op"
);
op
=
walk_state
->
op
;
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Op=%p State=%p
\n
"
,
op
,
walk_state
));
if
(
op
&&
(
op
->
common
.
aml_opcode
==
AML_INT_NAMEDFIELD_OP
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Op=%p State=%p
\n
"
,
op
,
walk_state
));
}
/* We are only interested in opcodes that have an associated name */
if
(
op
)
{
if
(
!
(
walk_state
->
op_info
->
flags
&
AML_NAMED
))
{
#if 0
if ((walk_state->op_info->class == AML_CLASS_EXECUTE) ||
(walk_state->op_info->class == AML_CLASS_CONTROL)) {
acpi_os_printf ("\n\n***EXECUTABLE OPCODE %s***\n\n", walk_state->op_info->name);
*out_op = op;
return (AE_CTRL_SKIP);
}
#endif
*
out_op
=
op
;
return
(
AE_OK
);
}
...
...
@@ -144,7 +149,31 @@ acpi_ds_load1_begin_op (
object_type
=
walk_state
->
op_info
->
object_type
;
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"State=%p Op=%p Type=%X
\n
"
,
walk_state
,
op
,
object_type
));
"State=%p Op=%p [%s] "
,
walk_state
,
op
,
acpi_ut_get_type_name
(
object_type
)));
/*
* Setup the search flags.
*
* Since we are entering a name into the namespace, we do not want to
* enable the search-to-root upsearch.
*
* There are only two conditions where it is acceptable that the name
* already exists:
* 1) the Scope() operator can reopen a scoping object that was
* previously defined (Scope, Method, Device, etc.)
* 2) Whenever we are parsing a deferred opcode (Op_region, Buffer,
* Buffer_field, or Package), the name of the object is already
* in the namespace.
*/
flags
=
ACPI_NS_NO_UPSEARCH
;
if
((
walk_state
->
opcode
!=
AML_SCOPE_OP
)
&&
(
!
(
walk_state
->
parse_flags
&
ACPI_PARSE_DEFERRED_OP
)))
{
flags
|=
ACPI_NS_ERROR_IF_FOUND
;
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_DISPATCH
,
"Cannot already exist
\n
"
));
}
else
{
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_DISPATCH
,
"Both Find or Create allowed
\n
"
));
}
/*
* Enter the named type into the internal namespace. We enter the name
...
...
@@ -152,12 +181,38 @@ acpi_ds_load1_begin_op (
* arguments to the opcode must be created as we go back up the parse tree later.
*/
status
=
acpi_ns_lookup
(
walk_state
->
scope_info
,
path
,
object_type
,
ACPI_IMODE_LOAD_PASS1
,
ACPI_NS_NO_UPSEARCH
,
walk_state
,
&
(
node
));
ACPI_IMODE_LOAD_PASS1
,
flags
,
walk_state
,
&
(
node
));
if
(
ACPI_FAILURE
(
status
))
{
return
(
status
);
}
/*
* For the scope op, we must check to make sure that the target is
* one of the opcodes that actually opens a scope
*/
if
(
walk_state
->
opcode
==
AML_SCOPE_OP
)
{
switch
(
node
->
type
)
{
case
ACPI_TYPE_ANY
:
/* Scope nodes are untyped (ANY) */
case
ACPI_TYPE_DEVICE
:
case
ACPI_TYPE_METHOD
:
case
ACPI_TYPE_POWER
:
case
ACPI_TYPE_PROCESSOR
:
case
ACPI_TYPE_THERMAL
:
/* These are acceptable types */
break
;
default:
/* All other types are an error */
ACPI_REPORT_ERROR
((
"Invalid type (%s) for target of Scope operator [%4.4s]
\n
"
,
acpi_ut_get_type_name
(
node
->
type
),
path
));
return
(
AE_AML_OPERAND_TYPE
);
}
}
if
(
!
op
)
{
/* Create a new op */
...
...
@@ -214,10 +269,10 @@ acpi_ds_load1_end_op (
ACPI_FUNCTION_NAME
(
"Ds_load1_end_op"
);
op
=
walk_state
->
op
;
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Op=%p State=%p
\n
"
,
op
,
walk_state
));
/* We are only interested in opcodes that have an associated name */
if
(
!
(
walk_state
->
op_info
->
flags
&
(
AML_NAMED
|
AML_FIELD
)))
{
...
...
drivers/acpi/events/evevent.c
View file @
26a6239c
/******************************************************************************
*
* Module Name: evevent - Fixed and General Purpose Even handling and dispatch
* $Revision: 9
0
$
* $Revision: 9
1
$
*
*****************************************************************************/
...
...
@@ -137,6 +137,7 @@ acpi_ev_handler_initialize (
return_ACPI_STATUS
(
status
);
}
acpi_gbl_events_initialized
=
TRUE
;
return_ACPI_STATUS
(
status
);
}
...
...
drivers/acpi/events/evmisc.c
View file @
26a6239c
/******************************************************************************
*
* Module Name: evmisc - Miscellaneous event manager support functions
* $Revision: 5
6
$
* $Revision: 5
7
$
*
*****************************************************************************/
...
...
@@ -547,7 +547,7 @@ acpi_ev_release_global_lock (void)
*
* RETURN: none
*
* DESCRIPTION: free memory allocated for table storage.
* DESCRIPTION:
Disable events and
free memory allocated for table storage.
*
******************************************************************************/
...
...
@@ -560,39 +560,42 @@ acpi_ev_terminate (void)
ACPI_FUNCTION_TRACE
(
"Ev_terminate"
);
/*
* Disable all event-related functionality.
* In all cases, on error, print a message but obviously we don't abort.
*/
/*
* Disable all fixed events
*/
for
(
i
=
0
;
i
<
ACPI_NUM_FIXED_EVENTS
;
i
++
)
{
status
=
acpi_disable_event
(
i
,
ACPI_EVENT_FIXED
,
0
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Failed to disable fixed event %d.
\n
"
,
i
));
}
}
if
(
acpi_gbl_events_initialized
)
{
/*
* Disable all event-related functionality.
* In all cases, on error, print a message but obviously we don't abort.
*/
/*
* Disable all GPEs
*/
for
(
i
=
0
;
i
<
acpi_gbl_gpe_number_max
;
i
++
)
{
if
(
acpi_ev_get_gpe_number_index
(
i
)
!=
ACPI_GPE_INVALID
)
{
status
=
acpi_hw_disable_gpe
(
i
);
/*
* Disable all fixed events
*/
for
(
i
=
0
;
i
<
ACPI_NUM_FIXED_EVENTS
;
i
++
)
{
status
=
acpi_disable_event
(
i
,
ACPI_EVENT_FIXED
,
0
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"
Failed to disable GPE %d.
\n
"
,
i
));
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"
Could not disable fixed event %d
\n
"
,
i
));
}
}
}
/*
* Remove SCI handler
*/
status
=
acpi_ev_remove_sci_handler
();
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Unable to remove SCI handler.
\n
"
));
/*
* Disable all GPEs
*/
for
(
i
=
0
;
i
<
acpi_gbl_gpe_number_max
;
i
++
)
{
if
(
acpi_ev_get_gpe_number_index
(
i
)
!=
ACPI_GPE_INVALID
)
{
status
=
acpi_hw_disable_gpe
(
i
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Could not disable GPE %d
\n
"
,
i
));
}
}
}
/*
* Remove SCI handler
*/
status
=
acpi_ev_remove_sci_handler
();
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Could not remove SCI handler
\n
"
));
}
}
/*
...
...
@@ -601,7 +604,7 @@ acpi_ev_terminate (void)
if
(
acpi_gbl_original_mode
==
ACPI_SYS_MODE_LEGACY
)
{
status
=
acpi_disable
();
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_WARN
,
"Acpi_disable failed
.
\n
"
));
ACPI_DEBUG_PRINT
((
ACPI_DB_WARN
,
"Acpi_disable failed
\n
"
));
}
}
...
...
drivers/acpi/include/acconfig.h
View file @
26a6239c
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
* $Revision: 1
09
$
* $Revision: 1
10
$
*
*****************************************************************************/
...
...
@@ -54,7 +54,7 @@
/* Version string */
#define ACPI_CA_VERSION 0x200208
15
#define ACPI_CA_VERSION 0x200208
29
/* Version of ACPI supported */
...
...
drivers/acpi/include/acglobal.h
View file @
26a6239c
/******************************************************************************
*
* Name: acglobal.h - Declarations for global variables
* $Revision: 13
0
$
* $Revision: 13
1
$
*
*****************************************************************************/
...
...
@@ -136,6 +136,7 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_acquired;
ACPI_EXTERN
u8
acpi_gbl_step_to_next_call
;
ACPI_EXTERN
u8
acpi_gbl_acpi_hardware_present
;
ACPI_EXTERN
u8
acpi_gbl_global_lock_present
;
ACPI_EXTERN
u8
acpi_gbl_events_initialized
;
extern
u8
acpi_gbl_shutdown
;
extern
u32
acpi_gbl_startup_flags
;
...
...
drivers/acpi/include/aclocal.h
View file @
26a6239c
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
* $Revision: 17
5
$
* $Revision: 17
6
$
*
*****************************************************************************/
...
...
@@ -667,8 +667,8 @@ typedef struct acpi_parseobj_asl
u32
aml_subtree_length
;
u32
final_aml_length
;
u32
final_aml_offset
;
u32
compile_flags
;
u16
parse_opcode
;
u16
compile_flags
;
u8
aml_opcode_length
;
u8
aml_pkg_len_bytes
;
u8
extra
;
...
...
drivers/acpi/include/acparser.h
View file @
26a6239c
/******************************************************************************
*
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
* $Revision: 6
1
$
* $Revision: 6
2
$
*
*****************************************************************************/
...
...
@@ -44,6 +44,7 @@
#define ACPI_PARSE_EXECUTE 0x0030
#define ACPI_PARSE_MODE_MASK 0x0030
#define ACPI_PARSE_DEFERRED_OP 0x0100
/* Parser external interfaces */
...
...
drivers/acpi/include/actbl2.h
View file @
26a6239c
/******************************************************************************
*
* Name: actbl2.h - ACPI Specification Revision 2.0 Tables
* $Revision: 2
7
$
* $Revision: 2
8
$
*
*****************************************************************************/
...
...
@@ -139,8 +139,8 @@ typedef struct
u16
plvl3_lat
;
/* Worst case HW latency to enter/exit C3 state */
u16
flush_size
;
/* Number of flush strides that need to be read */
u16
flush_stride
;
/* Processor's memory cache line width, in bytes */
u8
duty_offset
;
/* Processors duty cycle index in processor's P_CNT reg*/
u8
duty_width
;
/* Processors duty cycle value bit width in P_CNT register.*/
u8
duty_offset
;
/* Processor
'
s duty cycle index in processor's P_CNT reg*/
u8
duty_width
;
/* Processor
'
s duty cycle value bit width in P_CNT register.*/
u8
day_alrm
;
/* Index to day-of-month alarm in RTC CMOS RAM */
u8
mon_alrm
;
/* Index to month-of-year alarm in RTC CMOS RAM */
u8
century
;
/* Index to century in RTC CMOS RAM */
...
...
drivers/acpi/include/platform/aclinux.h
View file @
26a6239c
/******************************************************************************
*
* Name: aclinux.h - OS specific defines, etc.
* $Revision: 2
6
$
* $Revision: 2
7
$
*
*****************************************************************************/
...
...
@@ -51,6 +51,7 @@
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <unistd.h>
#if defined(__ia64__) || defined(__x86_64__)
#define ACPI_MACHINE_WIDTH 64
...
...
drivers/acpi/utilities/utglobal.c
View file @
26a6239c
/******************************************************************************
*
* Module Name: utglobal - Global variables for the ACPI subsystem
* $Revision: 1
68
$
* $Revision: 1
70
$
*
*****************************************************************************/
...
...
@@ -166,10 +166,10 @@ const NATIVE_CHAR *acpi_gbl_db_sleep_states[ACPI_NUM_SLEEP_STATES] = {
/*
*
Names built-in to the interpreter
*
Predefined ACPI Names (Built-in to the Interpreter)
*
* Initial values are currently supported only for types String and Number.
*
To avoid type punning, b
oth are specified as strings in this table.
*
B
oth are specified as strings in this table.
*
* NOTES:
* 1) _SB_ is defined to be a device to allow _SB_/_INI to be run
...
...
@@ -177,11 +177,11 @@ const NATIVE_CHAR *acpi_gbl_db_sleep_states[ACPI_NUM_SLEEP_STATES] = {
*/
const
acpi_predefined_names
acpi_gbl_pre_defined_names
[]
=
{
{
"_GPE"
,
INTERNAL_TYPE_
DEF_ANY
,
NULL
},
{
"_PR_"
,
INTERNAL_TYPE_
DEF_ANY
,
NULL
},
{
{
"_GPE"
,
INTERNAL_TYPE_
SCOPE
,
NULL
},
{
"_PR_"
,
INTERNAL_TYPE_
SCOPE
,
NULL
},
{
"_SB_"
,
ACPI_TYPE_DEVICE
,
NULL
},
{
"_SI_"
,
INTERNAL_TYPE_
DEF_ANY
,
NULL
},
{
"_TZ_"
,
INTERNAL_TYPE_
DEF_ANY
,
NULL
},
{
"_SI_"
,
INTERNAL_TYPE_
SCOPE
,
NULL
},
{
"_TZ_"
,
INTERNAL_TYPE_
SCOPE
,
NULL
},
{
"_REV"
,
ACPI_TYPE_INTEGER
,
"2"
},
{
"_OS_"
,
ACPI_TYPE_STRING
,
ACPI_OS_NAME
},
{
"_GL_"
,
ACPI_TYPE_MUTEX
,
"0"
},
...
...
@@ -195,9 +195,7 @@ const acpi_predefined_names acpi_gbl_pre_defined_names[] =
/*
* Properties of the ACPI Object Types, both internal and external.
*
* Elements of Acpi_ns_properties are bit significant
* and the table is indexed by values of acpi_object_type
* The table is indexed by values of acpi_object_type
*/
const
u8
acpi_gbl_ns_properties
[]
=
...
...
@@ -530,7 +528,6 @@ acpi_ut_get_object_type_name (
/*
* Strings and procedures used for debug only
*
*/
...
...
@@ -763,6 +760,7 @@ acpi_ut_init_globals (
acpi_gbl_gpe_register_info
=
NULL
;
acpi_gbl_gpe_number_info
=
NULL
;
acpi_gbl_events_initialized
=
FALSE
;
/* Namespace */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment