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
Kirill Smelkov
linux
Commits
26cffe4a
Commit
26cffe4a
authored
Jul 25, 2002
by
Andy Grover
Browse files
Options
Browse Files
Download
Plain Diff
resolve merge of Dom's patch
parents
cc6baa4f
dda0273d
Changes
50
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
1882 additions
and
1496 deletions
+1882
-1496
drivers/acpi/ac.c
drivers/acpi/ac.c
+8
-8
drivers/acpi/battery.c
drivers/acpi/battery.c
+8
-8
drivers/acpi/bus.c
drivers/acpi/bus.c
+5
-5
drivers/acpi/button.c
drivers/acpi/button.c
+8
-8
drivers/acpi/debugger/dbcmds.c
drivers/acpi/debugger/dbcmds.c
+3
-2
drivers/acpi/debugger/dbfileio.c
drivers/acpi/debugger/dbfileio.c
+9
-7
drivers/acpi/debugger/dbxface.c
drivers/acpi/debugger/dbxface.c
+3
-3
drivers/acpi/dispatcher/dsobject.c
drivers/acpi/dispatcher/dsobject.c
+200
-194
drivers/acpi/dispatcher/dsutils.c
drivers/acpi/dispatcher/dsutils.c
+43
-40
drivers/acpi/dispatcher/dswload.c
drivers/acpi/dispatcher/dswload.c
+18
-2
drivers/acpi/dispatcher/dswstate.c
drivers/acpi/dispatcher/dswstate.c
+2
-4
drivers/acpi/ec.c
drivers/acpi/ec.c
+13
-13
drivers/acpi/executer/excreate.c
drivers/acpi/executer/excreate.c
+3
-1
drivers/acpi/executer/exdump.c
drivers/acpi/executer/exdump.c
+3
-3
drivers/acpi/executer/exoparg1.c
drivers/acpi/executer/exoparg1.c
+6
-18
drivers/acpi/executer/exutils.c
drivers/acpi/executer/exutils.c
+32
-29
drivers/acpi/fan.c
drivers/acpi/fan.c
+8
-8
drivers/acpi/include/acconfig.h
drivers/acpi/include/acconfig.h
+11
-2
drivers/acpi/include/acdebug.h
drivers/acpi/include/acdebug.h
+5
-43
drivers/acpi/include/acdisasm.h
drivers/acpi/include/acdisasm.h
+362
-0
drivers/acpi/include/acglobal.h
drivers/acpi/include/acglobal.h
+9
-5
drivers/acpi/include/aclocal.h
drivers/acpi/include/aclocal.h
+23
-7
drivers/acpi/include/acmacros.h
drivers/acpi/include/acmacros.h
+4
-7
drivers/acpi/include/acnamesp.h
drivers/acpi/include/acnamesp.h
+2
-2
drivers/acpi/include/acpiosxf.h
drivers/acpi/include/acpiosxf.h
+4
-4
drivers/acpi/include/acutils.h
drivers/acpi/include/acutils.h
+4
-1
drivers/acpi/include/amlcode.h
drivers/acpi/include/amlcode.h
+1
-10
drivers/acpi/include/amlresrc.h
drivers/acpi/include/amlresrc.h
+12
-25
drivers/acpi/include/platform/acenv.h
drivers/acpi/include/platform/acenv.h
+12
-5
drivers/acpi/namespace/nsdump.c
drivers/acpi/namespace/nsdump.c
+1
-88
drivers/acpi/namespace/nsdumpdv.c
drivers/acpi/namespace/nsdumpdv.c
+124
-0
drivers/acpi/namespace/nsload.c
drivers/acpi/namespace/nsload.c
+56
-54
drivers/acpi/namespace/nsxfeval.c
drivers/acpi/namespace/nsxfeval.c
+719
-0
drivers/acpi/namespace/nsxfobj.c
drivers/acpi/namespace/nsxfobj.c
+40
-725
drivers/acpi/parser/psargs.c
drivers/acpi/parser/psargs.c
+22
-16
drivers/acpi/parser/psopcode.c
drivers/acpi/parser/psopcode.c
+2
-2
drivers/acpi/parser/psparse.c
drivers/acpi/parser/psparse.c
+2
-2
drivers/acpi/parser/psutils.c
drivers/acpi/parser/psutils.c
+2
-2
drivers/acpi/pci_irq.c
drivers/acpi/pci_irq.c
+1
-1
drivers/acpi/pci_link.c
drivers/acpi/pci_link.c
+8
-8
drivers/acpi/pci_root.c
drivers/acpi/pci_root.c
+8
-8
drivers/acpi/power.c
drivers/acpi/power.c
+8
-8
drivers/acpi/processor.c
drivers/acpi/processor.c
+8
-8
drivers/acpi/resources/rsio.c
drivers/acpi/resources/rsio.c
+10
-13
drivers/acpi/resources/rsirq.c
drivers/acpi/resources/rsirq.c
+8
-11
drivers/acpi/system.c
drivers/acpi/system.c
+18
-18
drivers/acpi/tables.c
drivers/acpi/tables.c
+10
-0
drivers/acpi/tables/tbrsdt.c
drivers/acpi/tables/tbrsdt.c
+1
-7
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+8
-8
drivers/acpi/utilities/utglobal.c
drivers/acpi/utilities/utglobal.c
+5
-53
No files found.
drivers/acpi/ac.c
View file @
26cffe4a
/*
/*
* acpi_ac.c - ACPI AC Adapter Driver ($Revision: 2
6
$)
* acpi_ac.c - ACPI AC Adapter Driver ($Revision: 2
7
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
@@ -47,12 +47,12 @@ int acpi_ac_add (struct acpi_device *device);
...
@@ -47,12 +47,12 @@ int acpi_ac_add (struct acpi_device *device);
int
acpi_ac_remove
(
struct
acpi_device
*
device
,
int
type
);
int
acpi_ac_remove
(
struct
acpi_device
*
device
,
int
type
);
static
struct
acpi_driver
acpi_ac_driver
=
{
static
struct
acpi_driver
acpi_ac_driver
=
{
name:
ACPI_AC_DRIVER_NAME
,
.
name
=
ACPI_AC_DRIVER_NAME
,
class:
ACPI_AC_CLASS
,
.
class
=
ACPI_AC_CLASS
,
ids:
ACPI_AC_HID
,
.
ids
=
ACPI_AC_HID
,
ops:
{
.
ops
=
{
add:
acpi_ac_add
,
.
add
=
acpi_ac_add
,
remove:
acpi_ac_remove
,
.
remove
=
acpi_ac_remove
,
},
},
};
};
...
...
drivers/acpi/battery.c
View file @
26cffe4a
/*
/*
* acpi_battery.c - ACPI Battery Driver ($Revision: 3
6
$)
* acpi_battery.c - ACPI Battery Driver ($Revision: 3
7
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
@@ -52,12 +52,12 @@ static int acpi_battery_add (struct acpi_device *device);
...
@@ -52,12 +52,12 @@ static int acpi_battery_add (struct acpi_device *device);
static
int
acpi_battery_remove
(
struct
acpi_device
*
device
,
int
type
);
static
int
acpi_battery_remove
(
struct
acpi_device
*
device
,
int
type
);
static
struct
acpi_driver
acpi_battery_driver
=
{
static
struct
acpi_driver
acpi_battery_driver
=
{
name:
ACPI_BATTERY_DRIVER_NAME
,
.
name
=
ACPI_BATTERY_DRIVER_NAME
,
class:
ACPI_BATTERY_CLASS
,
.
class
=
ACPI_BATTERY_CLASS
,
ids:
ACPI_BATTERY_HID
,
.
ids
=
ACPI_BATTERY_HID
,
ops:
{
.
ops
=
{
add:
acpi_battery_add
,
.
add
=
acpi_battery_add
,
remove:
acpi_battery_remove
,
.
remove
=
acpi_battery_remove
,
},
},
};
};
...
...
drivers/acpi/bus.c
View file @
26cffe4a
/*
/*
* acpi_bus.c - ACPI Bus Driver ($Revision:
79
$)
* acpi_bus.c - ACPI Bus Driver ($Revision:
80
$)
*
*
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
*
*
...
@@ -97,10 +97,10 @@ static int acpi_device_suspend(struct device *dev, u32 state, u32 stage);
...
@@ -97,10 +97,10 @@ static int acpi_device_suspend(struct device *dev, u32 state, u32 stage);
static
int
acpi_device_resume
(
struct
device
*
dev
,
u32
stage
);
static
int
acpi_device_resume
(
struct
device
*
dev
,
u32
stage
);
static
struct
device_driver
acpi_bus_driver
=
{
static
struct
device_driver
acpi_bus_driver
=
{
probe:
acpi_device_probe
,
.
probe
=
acpi_device_probe
,
remove:
acpi_device_remove
,
.
remove
=
acpi_device_remove
,
suspend:
acpi_device_suspend
,
.
suspend
=
acpi_device_suspend
,
resume:
acpi_device_resume
,
.
resume
=
acpi_device_resume
,
};
};
...
...
drivers/acpi/button.c
View file @
26cffe4a
/*
/*
* acpi_button.c - ACPI Button Driver ($Revision:
29
$)
* acpi_button.c - ACPI Button Driver ($Revision:
30
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
@@ -47,12 +47,12 @@ int acpi_button_add (struct acpi_device *device);
...
@@ -47,12 +47,12 @@ int acpi_button_add (struct acpi_device *device);
int
acpi_button_remove
(
struct
acpi_device
*
device
,
int
type
);
int
acpi_button_remove
(
struct
acpi_device
*
device
,
int
type
);
static
struct
acpi_driver
acpi_button_driver
=
{
static
struct
acpi_driver
acpi_button_driver
=
{
name:
ACPI_BUTTON_DRIVER_NAME
,
.
name
=
ACPI_BUTTON_DRIVER_NAME
,
class:
ACPI_BUTTON_CLASS
,
.
class
=
ACPI_BUTTON_CLASS
,
ids:
"ACPI_FPB,ACPI_FSB,PNP0C0D,PNP0C0C,PNP0C0E"
,
.
ids
=
"ACPI_FPB,ACPI_FSB,PNP0C0D,PNP0C0C,PNP0C0E"
,
ops:
{
.
ops
=
{
add:
acpi_button_add
,
.
add
=
acpi_button_add
,
remove:
acpi_button_remove
,
.
remove
=
acpi_button_remove
,
},
},
};
};
...
...
drivers/acpi/debugger/dbcmds.c
View file @
26cffe4a
/*******************************************************************************
/*******************************************************************************
*
*
* Module Name: dbcmds - debug commands and output routines
* Module Name: dbcmds - debug commands and output routines
* $Revision: 8
4
$
* $Revision: 8
5
$
*
*
******************************************************************************/
******************************************************************************/
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "acevents.h"
#include "acevents.h"
#include "acdebug.h"
#include "acdebug.h"
#include "acresrc.h"
#include "acresrc.h"
#include "acdisasm.h"
#ifdef ENABLE_DEBUGGER
#ifdef ENABLE_DEBUGGER
...
@@ -342,7 +343,7 @@ acpi_db_disassemble_aml (
...
@@ -342,7 +343,7 @@ acpi_db_disassemble_aml (
num_statements
=
ACPI_STRTOUL
(
statements
,
NULL
,
0
);
num_statements
=
ACPI_STRTOUL
(
statements
,
NULL
,
0
);
}
}
acpi_d
b_display_op
(
NULL
,
op
,
num_statements
);
acpi_d
m_disassemble
(
NULL
,
op
,
num_statements
);
}
}
...
...
drivers/acpi/debugger/dbfileio.c
View file @
26cffe4a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
*
*
* Module Name: dbfileio - Debugger file I/O commands. These can't usually
* Module Name: dbfileio - Debugger file I/O commands. These can't usually
* be used when running the debugger in Ring 0 (Kernel mode)
* be used when running the debugger in Ring 0 (Kernel mode)
* $Revision: 6
4
$
* $Revision: 6
7
$
*
*
******************************************************************************/
******************************************************************************/
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include "acnamesp.h"
#include "acnamesp.h"
#include "actables.h"
#include "actables.h"
#if
def ENABLE_DEBUGGER
#if
(defined ENABLE_DEBUGGER || defined ACPI_DISASSEMBLER)
#define _COMPONENT ACPI_DEBUGGER
#define _COMPONENT ACPI_DEBUGGER
ACPI_MODULE_NAME
(
"dbfileio"
)
ACPI_MODULE_NAME
(
"dbfileio"
)
...
@@ -86,6 +86,7 @@ acpi_db_match_argument (
...
@@ -86,6 +86,7 @@ acpi_db_match_argument (
}
}
#ifdef ENABLE_DEBUGGER
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: Acpi_db_close_debug_file
* FUNCTION: Acpi_db_close_debug_file
...
@@ -148,6 +149,7 @@ acpi_db_open_debug_file (
...
@@ -148,6 +149,7 @@ acpi_db_open_debug_file (
#endif
#endif
}
}
#endif
#ifdef ACPI_APPLICATION
#ifdef ACPI_APPLICATION
...
@@ -190,7 +192,7 @@ acpi_db_load_table(
...
@@ -190,7 +192,7 @@ acpi_db_load_table(
status
=
acpi_tb_validate_table_header
(
&
table_header
);
status
=
acpi_tb_validate_table_header
(
&
table_header
);
if
((
ACPI_FAILURE
(
status
))
||
if
((
ACPI_FAILURE
(
status
))
||
(
table_header
.
length
>
524288
))
/* 1/2
Mbyte should be enough */
{
(
table_header
.
length
>
0x800000
))
/* 8
Mbyte should be enough */
{
acpi_os_printf
(
"Table header is invalid!
\n
"
);
acpi_os_printf
(
"Table header is invalid!
\n
"
);
return
(
AE_ERROR
);
return
(
AE_ERROR
);
}
}
...
@@ -296,7 +298,7 @@ ae_local_load_table (
...
@@ -296,7 +298,7 @@ ae_local_load_table (
}
}
#if
ndef PARSER_ONLY
#if
(!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
status
=
acpi_ns_load_table
(
table_info
.
installed_desc
,
acpi_gbl_root_node
);
status
=
acpi_ns_load_table
(
table_info
.
installed_desc
,
acpi_gbl_root_node
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
/* Uninstall table and free the buffer */
/* Uninstall table and free the buffer */
...
@@ -330,7 +332,7 @@ acpi_db_get_acpi_table (
...
@@ -330,7 +332,7 @@ acpi_db_get_acpi_table (
/* Get the entire file */
/* Get the entire file */
acpi_os_printf
(
"Loading Acpi table from file %s
\n
"
,
filename
);
fprintf
(
stderr
,
"Loading Acpi table from file %s
\n
"
,
filename
);
status
=
acpi_db_load_table
(
fp
,
&
acpi_gbl_db_table_ptr
,
&
table_length
);
status
=
acpi_db_load_table
(
fp
,
&
acpi_gbl_db_table_ptr
,
&
table_length
);
fclose
(
fp
);
fclose
(
fp
);
...
@@ -383,8 +385,8 @@ acpi_db_load_acpi_table (
...
@@ -383,8 +385,8 @@ acpi_db_load_acpi_table (
return
(
status
);
return
(
status
);
}
}
acpi_os_printf
(
"%4.4s at %p
successfully installed and loaded
\n
"
,
fprintf
(
stderr
,
"Acpi table [%4.4s]
successfully installed and loaded
\n
"
,
acpi_gbl_db_table_ptr
->
signature
,
acpi_gbl_db_table_ptr
);
acpi_gbl_db_table_ptr
->
signature
);
acpi_gbl_acpi_hardware_present
=
FALSE
;
acpi_gbl_acpi_hardware_present
=
FALSE
;
...
...
drivers/acpi/debugger/dbxface.c
View file @
26cffe4a
/*******************************************************************************
/*******************************************************************************
*
*
* Module Name: dbxface - AML Debugger external interfaces
* Module Name: dbxface - AML Debugger external interfaces
* $Revision:
59
$
* $Revision:
61
$
*
*
******************************************************************************/
******************************************************************************/
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "acpi.h"
#include "acpi.h"
#include "amlcode.h"
#include "amlcode.h"
#include "acdebug.h"
#include "acdebug.h"
#include "acdisasm.h"
#ifdef ENABLE_DEBUGGER
#ifdef ENABLE_DEBUGGER
...
@@ -164,7 +165,7 @@ acpi_db_single_step (
...
@@ -164,7 +165,7 @@ acpi_db_single_step (
/* Now we can display it */
/* Now we can display it */
acpi_d
b_display_op
(
walk_state
,
display_op
,
ACPI_UINT32_MAX
);
acpi_d
m_disassemble
(
walk_state
,
display_op
,
ACPI_UINT32_MAX
);
if
((
op
->
common
.
aml_opcode
==
AML_IF_OP
)
||
if
((
op
->
common
.
aml_opcode
==
AML_IF_OP
)
||
(
op
->
common
.
aml_opcode
==
AML_WHILE_OP
))
{
(
op
->
common
.
aml_opcode
==
AML_WHILE_OP
))
{
...
@@ -351,7 +352,6 @@ acpi_db_initialize (void)
...
@@ -351,7 +352,6 @@ acpi_db_initialize (void)
}
}
if
(
!
acpi_gbl_db_opt_verbose
)
{
if
(
!
acpi_gbl_db_opt_verbose
)
{
acpi_gbl_db_disasm_indent
=
" "
;
acpi_gbl_db_opt_disasm
=
TRUE
;
acpi_gbl_db_opt_disasm
=
TRUE
;
acpi_gbl_db_opt_stats
=
FALSE
;
acpi_gbl_db_opt_stats
=
FALSE
;
}
}
...
...
drivers/acpi/dispatcher/dsobject.c
View file @
26cffe4a
This diff is collapsed.
Click to expand it.
drivers/acpi/dispatcher/dsutils.c
View file @
26cffe4a
/*******************************************************************************
/*******************************************************************************
*
*
* Module Name: dsutils - Dispatcher utilities
* Module Name: dsutils - Dispatcher utilities
* $Revision: 9
3
$
* $Revision: 9
4
$
*
*
******************************************************************************/
******************************************************************************/
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#define _COMPONENT ACPI_DISPATCHER
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME
(
"dsutils"
)
ACPI_MODULE_NAME
(
"dsutils"
)
#ifndef ACPI_NO_METHOD_EXECUTION
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -235,6 +236,47 @@ acpi_ds_delete_result_if_not_used (
...
@@ -235,6 +236,47 @@ acpi_ds_delete_result_if_not_used (
}
}
/*******************************************************************************
*
* FUNCTION: Acpi_ds_resolve_operands
*
* PARAMETERS: Walk_state - Current walk state with operands on stack
*
* RETURN: Status
*
* DESCRIPTION: Resolve all operands to their values. Used to prepare
* arguments to a control method invocation (a call from one
* method to another.)
*
******************************************************************************/
acpi_status
acpi_ds_resolve_operands
(
acpi_walk_state
*
walk_state
)
{
u32
i
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE_PTR
(
"Ds_resolve_operands"
,
walk_state
);
/*
* Attempt to resolve each of the valid operands
* Method arguments are passed by value, not by reference
*/
for
(
i
=
0
;
i
<
walk_state
->
num_operands
;
i
++
)
{
status
=
acpi_ex_resolve_to_value
(
&
walk_state
->
operands
[
i
],
walk_state
);
if
(
ACPI_FAILURE
(
status
))
{
break
;
}
}
return_ACPI_STATUS
(
status
);
}
#endif
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: Acpi_ds_create_operand
* FUNCTION: Acpi_ds_create_operand
...
@@ -515,42 +557,3 @@ acpi_ds_create_operands (
...
@@ -515,42 +557,3 @@ acpi_ds_create_operands (
}
}
/*******************************************************************************
*
* FUNCTION: Acpi_ds_resolve_operands
*
* PARAMETERS: Walk_state - Current walk state with operands on stack
*
* RETURN: Status
*
* DESCRIPTION: Resolve all operands to their values. Used to prepare
* arguments to a control method invocation (a call from one
* method to another.)
*
******************************************************************************/
acpi_status
acpi_ds_resolve_operands
(
acpi_walk_state
*
walk_state
)
{
u32
i
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE_PTR
(
"Ds_resolve_operands"
,
walk_state
);
/*
* Attempt to resolve each of the valid operands
* Method arguments are passed by value, not by reference
*/
for
(
i
=
0
;
i
<
walk_state
->
num_operands
;
i
++
)
{
status
=
acpi_ex_resolve_to_value
(
&
walk_state
->
operands
[
i
],
walk_state
);
if
(
ACPI_FAILURE
(
status
))
{
break
;
}
}
return_ACPI_STATUS
(
status
);
}
drivers/acpi/dispatcher/dswload.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: dswload - Dispatcher namespace load callbacks
* Module Name: dswload - Dispatcher namespace load callbacks
* $Revision: 6
7
$
* $Revision: 6
9
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -70,9 +70,11 @@ acpi_ds_init_callbacks (
...
@@ -70,9 +70,11 @@ acpi_ds_init_callbacks (
break
;
break
;
case
3
:
case
3
:
#ifndef ACPI_NO_METHOD_EXECUTION
walk_state
->
parse_flags
|=
ACPI_PARSE_EXECUTE
|
ACPI_PARSE_DELETE_TREE
;
walk_state
->
parse_flags
|=
ACPI_PARSE_EXECUTE
|
ACPI_PARSE_DELETE_TREE
;
walk_state
->
descending_callback
=
acpi_ds_exec_begin_op
;
walk_state
->
descending_callback
=
acpi_ds_exec_begin_op
;
walk_state
->
ascending_callback
=
acpi_ds_exec_end_op
;
walk_state
->
ascending_callback
=
acpi_ds_exec_end_op
;
#endif
break
;
break
;
default:
default:
...
@@ -169,6 +171,11 @@ acpi_ds_load1_begin_op (
...
@@ -169,6 +171,11 @@ acpi_ds_load1_begin_op (
op
->
named
.
name
=
node
->
name
.
integer
;
op
->
named
.
name
=
node
->
name
.
integer
;
#if (defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY))
op
->
named
.
path
=
(
u8
*
)
path
;
#endif
/*
/*
* Put the Node in the "op" object that the parser uses, so we
* Put the Node in the "op" object that the parser uses, so we
* can get it again quickly when this scope is closed
* can get it again quickly when this scope is closed
...
@@ -221,6 +228,7 @@ acpi_ds_load1_end_op (
...
@@ -221,6 +228,7 @@ acpi_ds_load1_end_op (
object_type
=
walk_state
->
op_info
->
object_type
;
object_type
=
walk_state
->
op_info
->
object_type
;
#ifndef ACPI_NO_METHOD_EXECUTION
if
(
walk_state
->
op_info
->
flags
&
AML_FIELD
)
{
if
(
walk_state
->
op_info
->
flags
&
AML_FIELD
)
{
if
(
walk_state
->
opcode
==
AML_FIELD_OP
||
if
(
walk_state
->
opcode
==
AML_FIELD_OP
||
walk_state
->
opcode
==
AML_BANK_FIELD_OP
||
walk_state
->
opcode
==
AML_BANK_FIELD_OP
||
...
@@ -238,6 +246,7 @@ acpi_ds_load1_end_op (
...
@@ -238,6 +246,7 @@ acpi_ds_load1_end_op (
return
(
status
);
return
(
status
);
}
}
}
}
#endif
if
(
op
->
common
.
aml_opcode
==
AML_NAME_OP
)
{
if
(
op
->
common
.
aml_opcode
==
AML_NAME_OP
)
{
/* For Name opcode, get the object type from the argument */
/* For Name opcode, get the object type from the argument */
...
@@ -430,7 +439,9 @@ acpi_ds_load2_end_op (
...
@@ -430,7 +439,9 @@ acpi_ds_load2_end_op (
acpi_namespace_node
*
node
;
acpi_namespace_node
*
node
;
acpi_parse_object
*
arg
;
acpi_parse_object
*
arg
;
acpi_namespace_node
*
new_node
;
acpi_namespace_node
*
new_node
;
#ifndef ACPI_NO_METHOD_EXECUTION
u32
i
;
u32
i
;
#endif
ACPI_FUNCTION_NAME
(
"Ds_load2_end_op"
);
ACPI_FUNCTION_NAME
(
"Ds_load2_end_op"
);
...
@@ -478,6 +489,7 @@ acpi_ds_load2_end_op (
...
@@ -478,6 +489,7 @@ acpi_ds_load2_end_op (
}
}
}
}
/*
/*
* Named operations are as follows:
* Named operations are as follows:
*
*
...
@@ -515,6 +527,8 @@ acpi_ds_load2_end_op (
...
@@ -515,6 +527,8 @@ acpi_ds_load2_end_op (
arg
=
op
->
common
.
value
.
arg
;
arg
=
op
->
common
.
value
.
arg
;
switch
(
walk_state
->
op_info
->
type
)
{
switch
(
walk_state
->
op_info
->
type
)
{
#ifndef ACPI_NO_METHOD_EXECUTION
case
AML_TYPE_CREATE_FIELD
:
case
AML_TYPE_CREATE_FIELD
:
/*
/*
...
@@ -604,7 +618,7 @@ acpi_ds_load2_end_op (
...
@@ -604,7 +618,7 @@ acpi_ds_load2_end_op (
}
}
break
;
break
;
#endif
/* ACPI_NO_METHOD_EXECUTION */
case
AML_TYPE_NAMED_COMPLEX
:
case
AML_TYPE_NAMED_COMPLEX
:
...
@@ -629,6 +643,7 @@ acpi_ds_load2_end_op (
...
@@ -629,6 +643,7 @@ acpi_ds_load2_end_op (
break
;
break
;
#ifndef ACPI_NO_METHOD_EXECUTION
case
AML_REGION_OP
:
case
AML_REGION_OP
:
/*
/*
* The Op_region is not fully parsed at this time. Only valid argument is the Space_id.
* The Op_region is not fully parsed at this time. Only valid argument is the Space_id.
...
@@ -656,6 +671,7 @@ acpi_ds_load2_end_op (
...
@@ -656,6 +671,7 @@ acpi_ds_load2_end_op (
status
=
acpi_ds_create_node
(
walk_state
,
node
,
op
);
status
=
acpi_ds_create_node
(
walk_state
,
node
,
op
);
break
;
break
;
#endif
/* ACPI_NO_METHOD_EXECUTION */
default:
default:
...
...
drivers/acpi/dispatcher/dswstate.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: dswstate - Dispatcher parse tree walk management routines
* Module Name: dswstate - Dispatcher parse tree walk management routines
* $Revision: 6
5
$
* $Revision: 6
7
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -837,7 +837,7 @@ acpi_ds_create_walk_state (
...
@@ -837,7 +837,7 @@ acpi_ds_create_walk_state (
/* Init the method args/local */
/* Init the method args/local */
#if
ndef _ACPI_ASL_COMPILER
#if
(!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
acpi_ds_method_data_init
(
walk_state
);
acpi_ds_method_data_init
(
walk_state
);
#endif
#endif
...
@@ -858,7 +858,6 @@ acpi_ds_create_walk_state (
...
@@ -858,7 +858,6 @@ acpi_ds_create_walk_state (
}
}
#ifndef _ACPI_ASL_COMPILER
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: Acpi_ds_init_aml_walk
* FUNCTION: Acpi_ds_init_aml_walk
...
@@ -943,7 +942,6 @@ acpi_ds_init_aml_walk (
...
@@ -943,7 +942,6 @@ acpi_ds_init_aml_walk (
status
=
acpi_ds_init_callbacks
(
walk_state
,
pass_number
);
status
=
acpi_ds_init_callbacks
(
walk_state
,
pass_number
);
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
#endif
/*******************************************************************************
/*******************************************************************************
...
...
drivers/acpi/ec.c
View file @
26cffe4a
/*
/*
* acpi_ec.c - ACPI Embedded Controller Driver ($Revision: 3
5
$)
* acpi_ec.c - ACPI Embedded Controller Driver ($Revision: 3
8
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
@@ -62,14 +62,14 @@ static int acpi_ec_start (struct acpi_device *device);
...
@@ -62,14 +62,14 @@ static int acpi_ec_start (struct acpi_device *device);
static
int
acpi_ec_stop
(
struct
acpi_device
*
device
,
int
type
);
static
int
acpi_ec_stop
(
struct
acpi_device
*
device
,
int
type
);
static
struct
acpi_driver
acpi_ec_driver
=
{
static
struct
acpi_driver
acpi_ec_driver
=
{
name:
ACPI_EC_DRIVER_NAME
,
.
name
=
ACPI_EC_DRIVER_NAME
,
class:
ACPI_EC_CLASS
,
.
class
=
ACPI_EC_CLASS
,
ids:
ACPI_EC_HID
,
.
ids
=
ACPI_EC_HID
,
ops:
{
.
ops
=
{
add:
acpi_ec_add
,
.
add
=
acpi_ec_add
,
remove:
acpi_ec_remove
,
.
remove
=
acpi_ec_remove
,
start:
acpi_ec_start
,
.
start
=
acpi_ec_start
,
stop:
acpi_ec_stop
,
.
stop
=
acpi_ec_stop
,
},
},
};
};
...
@@ -398,7 +398,7 @@ acpi_ec_space_handler (
...
@@ -398,7 +398,7 @@ acpi_ec_space_handler (
{
{
int
result
=
0
;
int
result
=
0
;
struct
acpi_ec
*
ec
=
NULL
;
struct
acpi_ec
*
ec
=
NULL
;
u32
t
mp
=
0
;
u32
te
mp
=
0
;
ACPI_FUNCTION_TRACE
(
"acpi_ec_space_handler"
);
ACPI_FUNCTION_TRACE
(
"acpi_ec_space_handler"
);
...
@@ -409,8 +409,8 @@ acpi_ec_space_handler (
...
@@ -409,8 +409,8 @@ acpi_ec_space_handler (
switch
(
function
)
{
switch
(
function
)
{
case
ACPI_READ
:
case
ACPI_READ
:
result
=
acpi_ec_read
(
ec
,
(
u8
)
address
,
&
tmp
);
result
=
acpi_ec_read
(
ec
,
(
u8
)
address
,
&
t
e
mp
);
*
value
=
(
acpi_integer
)
tmp
;
*
value
=
(
acpi_integer
)
t
e
mp
;
break
;
break
;
case
ACPI_WRITE
:
case
ACPI_WRITE
:
result
=
acpi_ec_write
(
ec
,
(
u8
)
address
,
(
u8
)
*
value
);
result
=
acpi_ec_write
(
ec
,
(
u8
)
address
,
(
u8
)
*
value
);
...
...
drivers/acpi/executer/excreate.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: excreate - Named object creation
* Module Name: excreate - Named object creation
* $Revision: 9
2
$
* $Revision: 9
3
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
ACPI_MODULE_NAME
(
"excreate"
)
ACPI_MODULE_NAME
(
"excreate"
)
#ifndef ACPI_NO_METHOD_EXECUTION
/*****************************************************************************
/*****************************************************************************
*
*
* FUNCTION: Acpi_ex_create_alias
* FUNCTION: Acpi_ex_create_alias
...
@@ -490,6 +491,7 @@ acpi_ex_create_power_resource (
...
@@ -490,6 +491,7 @@ acpi_ex_create_power_resource (
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
#endif
/*****************************************************************************
/*****************************************************************************
*
*
...
...
drivers/acpi/executer/exdump.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: exdump - Interpreter debug output routines
* Module Name: exdump - Interpreter debug output routines
* $Revision: 15
6
$
* $Revision: 15
7
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -575,14 +575,14 @@ acpi_ex_dump_object_descriptor (
...
@@ -575,14 +575,14 @@ acpi_ex_dump_object_descriptor (
{
{
if
(
!
((
ACPI_LV_OBJECTS
&
acpi_dbg_level
)
&&
(
_COMPONENT
&
acpi_dbg_layer
)))
if
(
!
((
ACPI_LV_OBJECTS
&
acpi_dbg_level
)
&&
(
_COMPONENT
&
acpi_dbg_layer
)))
{
{
return
;
return
_VOID
;
}
}
}
}
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
obj_desc
)
!=
ACPI_DESC_TYPE_OPERAND
)
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
obj_desc
)
!=
ACPI_DESC_TYPE_OPERAND
)
{
{
acpi_os_printf
(
"Ex_dump_object_descriptor: %p is not a valid ACPI object
\n
"
,
obj_desc
);
acpi_os_printf
(
"Ex_dump_object_descriptor: %p is not a valid ACPI object
\n
"
,
obj_desc
);
return
;
return
_VOID
;
}
}
/* Common Fields */
/* Common Fields */
...
...
drivers/acpi/executer/exoparg1.c
View file @
26cffe4a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
/******************************************************************************
/******************************************************************************
*
*
* Module Name: exoparg1 - AML execution - opcodes with 1 argument
* Module Name: exoparg1 - AML execution - opcodes with 1 argument
* $Revision: 14
0
$
* $Revision: 14
1
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -804,16 +804,7 @@ acpi_ex_opcode_1A_0T_1R (
...
@@ -804,16 +804,7 @@ acpi_ex_opcode_1A_0T_1R (
switch
(
operand
[
0
]
->
reference
.
target_type
)
{
switch
(
operand
[
0
]
->
reference
.
target_type
)
{
case
ACPI_TYPE_BUFFER_FIELD
:
case
ACPI_TYPE_BUFFER_FIELD
:
/* Ensure that the Buffer arguments are evaluated */
temp_desc
=
operand
[
0
]
->
reference
.
object
;
temp_desc
=
operand
[
0
]
->
reference
.
object
;
#if 0
status = acpi_ds_get_buffer_arguments (temp_desc);
if (ACPI_FAILURE (status)) {
goto cleanup;
}
#endif
/*
/*
* Create a new object that contains one element of the
* Create a new object that contains one element of the
...
@@ -841,14 +832,6 @@ acpi_ex_opcode_1A_0T_1R (
...
@@ -841,14 +832,6 @@ acpi_ex_opcode_1A_0T_1R (
case
ACPI_TYPE_PACKAGE
:
case
ACPI_TYPE_PACKAGE
:
#if 0
/* Ensure that the Package arguments are evaluated */
status = acpi_ds_get_package_arguments (operand[0]->reference.object);
if (ACPI_FAILURE (status)) {
goto cleanup;
}
#endif
/*
/*
* Return the referenced element of the package. We must add
* Return the referenced element of the package. We must add
* another reference to the referenced object, however.
* another reference to the referenced object, however.
...
@@ -884,6 +867,11 @@ acpi_ex_opcode_1A_0T_1R (
...
@@ -884,6 +867,11 @@ acpi_ex_opcode_1A_0T_1R (
return_desc
=
operand
[
0
]
->
reference
.
object
;
return_desc
=
operand
[
0
]
->
reference
.
object
;
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
return_desc
)
==
ACPI_DESC_TYPE_NAMED
)
{
return_desc
=
acpi_ns_get_attached_object
((
acpi_namespace_node
*
)
return_desc
);
}
/* Add another reference to the object! */
/* Add another reference to the object! */
acpi_ut_add_reference
(
return_desc
);
acpi_ut_add_reference
(
return_desc
);
...
...
drivers/acpi/executer/exutils.c
View file @
26cffe4a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
/******************************************************************************
/******************************************************************************
*
*
* Module Name: exutils - interpreter/scanner utilities
* Module Name: exutils - interpreter/scanner utilities
* $Revision: 10
0
$
* $Revision: 10
2
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -50,6 +50,34 @@
...
@@ -50,6 +50,34 @@
ACPI_MODULE_NAME
(
"exutils"
)
ACPI_MODULE_NAME
(
"exutils"
)
/*******************************************************************************
*
* FUNCTION: Acpi_ex_validate_object_type
*
* PARAMETERS: Type Object type to validate
*
* DESCRIPTION: Determine if a type is a valid ACPI object type
*
******************************************************************************/
u8
acpi_ex_validate_object_type
(
acpi_object_type
type
)
{
ACPI_FUNCTION_ENTRY
();
if
((
type
>
ACPI_TYPE_MAX
&&
type
<
INTERNAL_TYPE_BEGIN
)
||
(
type
>
INTERNAL_TYPE_MAX
))
{
return
(
FALSE
);
}
return
(
TRUE
);
}
#ifndef ACPI_NO_METHOD_EXECUTION
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: Acpi_ex_enter_interpreter
* FUNCTION: Acpi_ex_enter_interpreter
...
@@ -116,33 +144,6 @@ acpi_ex_exit_interpreter (void)
...
@@ -116,33 +144,6 @@ acpi_ex_exit_interpreter (void)
}
}
/*******************************************************************************
*
* FUNCTION: Acpi_ex_validate_object_type
*
* PARAMETERS: Type Object type to validate
*
* DESCRIPTION: Determine if a type is a valid ACPI object type
*
******************************************************************************/
u8
acpi_ex_validate_object_type
(
acpi_object_type
type
)
{
ACPI_FUNCTION_ENTRY
();
if
((
type
>
ACPI_TYPE_MAX
&&
type
<
INTERNAL_TYPE_BEGIN
)
||
(
type
>
INTERNAL_TYPE_MAX
))
{
return
(
FALSE
);
}
return
(
TRUE
);
}
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: Acpi_ex_truncate_for32bit_table
* FUNCTION: Acpi_ex_truncate_for32bit_table
...
@@ -263,6 +264,8 @@ acpi_ex_release_global_lock (
...
@@ -263,6 +264,8 @@ acpi_ex_release_global_lock (
ACPI_REPORT_ERROR
((
"Could not release ACPI Global Lock
\n
"
));
ACPI_REPORT_ERROR
((
"Could not release ACPI Global Lock
\n
"
));
}
}
}
}
return_VOID
;
}
}
...
@@ -378,4 +381,4 @@ acpi_ex_unsigned_integer_to_string (
...
@@ -378,4 +381,4 @@ acpi_ex_unsigned_integer_to_string (
}
}
}
}
#endif
drivers/acpi/fan.c
View file @
26cffe4a
/*
/*
* acpi_fan.c - ACPI Fan Driver ($Revision: 2
8
$)
* acpi_fan.c - ACPI Fan Driver ($Revision: 2
9
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
@@ -47,12 +47,12 @@ int acpi_fan_add (struct acpi_device *device);
...
@@ -47,12 +47,12 @@ int acpi_fan_add (struct acpi_device *device);
int
acpi_fan_remove
(
struct
acpi_device
*
device
,
int
type
);
int
acpi_fan_remove
(
struct
acpi_device
*
device
,
int
type
);
static
struct
acpi_driver
acpi_fan_driver
=
{
static
struct
acpi_driver
acpi_fan_driver
=
{
name:
ACPI_FAN_DRIVER_NAME
,
.
name
=
ACPI_FAN_DRIVER_NAME
,
class:
ACPI_FAN_CLASS
,
.
class
=
ACPI_FAN_CLASS
,
ids:
ACPI_FAN_HID
,
.
ids
=
ACPI_FAN_HID
,
ops:
{
.
ops
=
{
add:
acpi_fan_add
,
.
add
=
acpi_fan_add
,
remove:
acpi_fan_remove
,
.
remove
=
acpi_fan_remove
,
},
},
};
};
...
...
drivers/acpi/include/acconfig.h
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Name: acconfig.h - Global configuration constants
* Name: acconfig.h - Global configuration constants
* $Revision: 10
5
$
* $Revision: 10
7
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
/* Version string */
/* Version string */
#define ACPI_CA_VERSION 0x200207
02
#define ACPI_CA_VERSION 0x200207
25
/* Version of ACPI supported */
/* Version of ACPI supported */
...
@@ -152,6 +152,15 @@
...
@@ -152,6 +152,15 @@
#define ACPI_MAX_ADDRESS_SPACE 255
#define ACPI_MAX_ADDRESS_SPACE 255
/* Array sizes. Used for range checking also */
#define NUM_ACCESS_TYPES 6
#define NUM_UPDATE_RULES 3
#define NUM_LOCK_RULES 2
#define NUM_MATCH_OPS 6
#define NUM_OPCODES 256
#define NUM_FIELD_NAMES 2
/* RSDP checksums */
/* RSDP checksums */
#define ACPI_RSDP_CHECKSUM_LENGTH 20
#define ACPI_RSDP_CHECKSUM_LENGTH 20
...
...
drivers/acpi/include/acdebug.h
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Name: acdebug.h - ACPI/AML debugger
* Name: acdebug.h - ACPI/AML debugger
* $Revision: 6
2
$
* $Revision: 6
3
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#define ACPI_DEBUG_BUFFER_SIZE 4196
#define ACPI_DEBUG_BUFFER_SIZE 4196
typedef
struct
command_info
typedef
struct
command_info
{
{
NATIVE_CHAR
*
name
;
/* Command Name */
NATIVE_CHAR
*
name
;
/* Command Name */
...
@@ -185,47 +184,6 @@ acpi_db_walk_for_specific_objects (
...
@@ -185,47 +184,6 @@ acpi_db_walk_for_specific_objects (
void
**
return_value
);
void
**
return_value
);
/*
* dbdisasm - AML disassembler
*/
void
acpi_db_display_op
(
acpi_walk_state
*
walk_state
,
acpi_parse_object
*
origin
,
u32
num_opcodes
);
void
acpi_db_display_namestring
(
NATIVE_CHAR
*
name
);
void
acpi_db_display_path
(
acpi_parse_object
*
op
);
void
acpi_db_display_opcode
(
acpi_walk_state
*
walk_state
,
acpi_parse_object
*
op
);
void
acpi_db_decode_internal_object
(
acpi_operand_object
*
obj_desc
);
void
acpi_db_decode_node
(
acpi_namespace_node
*
node
);
u32
acpi_db_block_type
(
acpi_parse_object
*
op
);
acpi_status
acpi_ps_display_object_pathname
(
acpi_walk_state
*
walk_state
,
acpi_parse_object
*
op
);
/*
/*
* dbdisply - debug display commands
* dbdisply - debug display commands
*/
*/
...
@@ -282,6 +240,10 @@ void *
...
@@ -282,6 +240,10 @@ void *
acpi_db_get_pointer
(
acpi_db_get_pointer
(
void
*
target
);
void
*
target
);
void
acpi_db_decode_internal_object
(
acpi_operand_object
*
obj_desc
);
/*
/*
* dbexec - debugger control method execution
* dbexec - debugger control method execution
...
...
drivers/acpi/include/acdisasm.h
0 → 100644
View file @
26cffe4a
/******************************************************************************
*
* Name: acdisasm.h - AML disassembler
* $Revision: 2 $
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __ACDISASM_H__
#define __ACDISASM_H__
#include "amlresrc.h"
#define BLOCK_NONE 0
#define BLOCK_PAREN 1
#define BLOCK_BRACE 2
#define BLOCK_COMMA_LIST 4
extern
const
char
*
acpi_gbl_io_decode
[
2
];
extern
const
char
*
acpi_gbl_word_decode
[
4
];
extern
const
char
*
acpi_gbl_consume_decode
[
2
];
extern
const
char
*
acpi_gbl_min_decode
[
2
];
extern
const
char
*
acpi_gbl_max_decode
[
2
];
extern
const
char
*
acpi_gbl_DECdecode
[
2
];
extern
const
char
*
acpi_gbl_RNGdecode
[
4
];
extern
const
char
*
acpi_gbl_MEMdecode
[
4
];
extern
const
char
*
acpi_gbl_RWdecode
[
2
];
extern
const
char
*
acpi_gbl_irq_decode
[
2
];
extern
const
char
*
acpi_gbl_HEdecode
[
2
];
extern
const
char
*
acpi_gbl_LLdecode
[
2
];
extern
const
char
*
acpi_gbl_SHRdecode
[
2
];
extern
const
char
*
acpi_gbl_TYPdecode
[
4
];
extern
const
char
*
acpi_gbl_BMdecode
[
2
];
extern
const
char
*
acpi_gbl_SIZdecode
[
4
];
extern
const
NATIVE_CHAR
*
acpi_gbl_lock_rule
[
NUM_LOCK_RULES
];
extern
const
NATIVE_CHAR
*
acpi_gbl_access_types
[
NUM_ACCESS_TYPES
];
extern
const
NATIVE_CHAR
*
acpi_gbl_update_rules
[
NUM_UPDATE_RULES
];
extern
const
NATIVE_CHAR
*
acpi_gbl_match_ops
[
NUM_MATCH_OPS
];
typedef
struct
acpi_op_walk_info
{
u32
level
;
u32
bit_offset
;
}
ACPI_OP_WALK_INFO
;
typedef
acpi_status
(
*
ASL_WALK_CALLBACK
)
(
acpi_parse_object
*
op
,
u32
level
,
void
*
context
);
/*
* dmwalk
*/
void
acpi_dm_walk_parse_tree
(
acpi_parse_object
*
op
,
ASL_WALK_CALLBACK
descending_callback
,
ASL_WALK_CALLBACK
ascending_callback
,
void
*
context
);
acpi_status
acpi_dm_descending_op
(
acpi_parse_object
*
op
,
u32
level
,
void
*
context
);
acpi_status
acpi_dm_ascending_op
(
acpi_parse_object
*
op
,
u32
level
,
void
*
context
);
/*
* dmopcode
*/
void
acpi_dm_validate_name
(
char
*
name
,
acpi_parse_object
*
op
);
u32
acpi_dm_dump_name
(
char
*
name
);
void
acpi_dm_string
(
char
*
string
);
void
acpi_dm_unicode
(
acpi_parse_object
*
op
);
void
acpi_dm_disassemble
(
acpi_walk_state
*
walk_state
,
acpi_parse_object
*
origin
,
u32
num_opcodes
);
void
acpi_dm_namestring
(
NATIVE_CHAR
*
name
);
void
acpi_dm_display_path
(
acpi_parse_object
*
op
);
void
acpi_dm_disassemble_one_op
(
acpi_walk_state
*
walk_state
,
ACPI_OP_WALK_INFO
*
info
,
acpi_parse_object
*
op
);
void
acpi_dm_decode_internal_object
(
acpi_operand_object
*
obj_desc
);
void
acpi_dm_decode_node
(
acpi_namespace_node
*
node
);
u32
acpi_dm_block_type
(
acpi_parse_object
*
op
);
u32
acpi_dm_list_type
(
acpi_parse_object
*
op
);
acpi_status
acpi_ps_display_object_pathname
(
acpi_walk_state
*
walk_state
,
acpi_parse_object
*
op
);
void
acpi_dm_method_flags
(
acpi_parse_object
*
op
);
void
acpi_dm_field_flags
(
acpi_parse_object
*
op
);
void
acpi_dm_address_space
(
u8
space_id
);
void
acpi_dm_region_flags
(
acpi_parse_object
*
op
);
void
acpi_dm_match_op
(
acpi_parse_object
*
op
);
void
acpi_dm_match_keyword
(
acpi_parse_object
*
op
);
u8
acpi_dm_comma_if_list_member
(
acpi_parse_object
*
op
);
void
acpi_dm_comma_if_field_member
(
acpi_parse_object
*
op
);
/*
* dmbuffer
*/
void
acpi_is_eisa_id
(
acpi_parse_object
*
op
);
void
acpi_dm_eisa_id
(
u32
encoded_id
);
u8
acpi_dm_is_unicode_buffer
(
acpi_parse_object
*
op
);
u8
acpi_dm_is_string_buffer
(
acpi_parse_object
*
op
);
/*
* dmresrc
*/
void
acpi_dm_disasm_byte_list
(
u32
level
,
u8
*
byte_data
,
u32
byte_count
);
void
acpi_dm_byte_list
(
ACPI_OP_WALK_INFO
*
info
,
acpi_parse_object
*
op
);
void
acpi_dm_resource_descriptor
(
ACPI_OP_WALK_INFO
*
info
,
u8
*
byte_data
,
u32
byte_count
);
u8
acpi_dm_is_resource_descriptor
(
acpi_parse_object
*
op
);
void
acpi_dm_indent
(
u32
level
);
void
acpi_dm_bit_list
(
u16
mask
);
/*
* dmresrcl
*/
void
acpi_dm_io_flags
(
u8
flags
);
void
acpi_dm_memory_flags
(
u8
flags
,
u8
specific_flags
);
void
acpi_dm_word_descriptor
(
ASL_WORD_ADDRESS_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_dword_descriptor
(
ASL_DWORD_ADDRESS_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_qword_descriptor
(
ASL_QWORD_ADDRESS_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_memory24_descriptor
(
ASL_MEMORY_24_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_memory32_descriptor
(
ASL_MEMORY_32_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_fixed_mem32_descriptor
(
ASL_FIXED_MEMORY_32_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_generic_register_descriptor
(
ASL_GENERAL_REGISTER_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_interrupt_descriptor
(
ASL_EXTENDED_XRUPT_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_vendor_large_descriptor
(
ASL_LARGE_VENDOR_DESC
*
resource
,
u32
length
,
u32
level
);
/*
* dmresrcs
*/
void
acpi_dm_irq_descriptor
(
ASL_IRQ_FORMAT_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_dma_descriptor
(
ASL_DMA_FORMAT_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_io_descriptor
(
ASL_IO_PORT_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_fixed_io_descriptor
(
ASL_FIXED_IO_PORT_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_start_dependent_descriptor
(
ASL_START_DEPENDENT_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_end_dependent_descriptor
(
ASL_START_DEPENDENT_DESC
*
resource
,
u32
length
,
u32
level
);
void
acpi_dm_vendor_small_descriptor
(
ASL_SMALL_VENDOR_DESC
*
resource
,
u32
length
,
u32
level
);
#endif
/* __ACDISASM_H__ */
drivers/acpi/include/acglobal.h
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Name: acglobal.h - Declarations for global variables
* Name: acglobal.h - Declarations for global variables
* $Revision: 12
6
$
* $Revision: 12
8
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -142,6 +142,7 @@ extern u32 acpi_gbl_startup_flags;
...
@@ -142,6 +142,7 @@ extern u32 acpi_gbl_startup_flags;
extern
const
u8
acpi_gbl_decode_to8bit
[
8
];
extern
const
u8
acpi_gbl_decode_to8bit
[
8
];
extern
const
NATIVE_CHAR
*
acpi_gbl_db_sleep_states
[
ACPI_NUM_SLEEP_STATES
];
extern
const
NATIVE_CHAR
*
acpi_gbl_db_sleep_states
[
ACPI_NUM_SLEEP_STATES
];
extern
const
acpi_opcode_info
acpi_gbl_aml_op_info
[
AML_NUM_OPCODES
];
extern
const
acpi_opcode_info
acpi_gbl_aml_op_info
[
AML_NUM_OPCODES
];
extern
const
NATIVE_CHAR
*
acpi_gbl_region_types
[
ACPI_NUM_PREDEFINED_REGIONS
];
/*****************************************************************************
/*****************************************************************************
...
@@ -237,6 +238,12 @@ ACPI_EXTERN ACPI_GPE_INDEX_INFO *acpi_gbl_gpe_number_to_index;
...
@@ -237,6 +238,12 @@ ACPI_EXTERN ACPI_GPE_INDEX_INFO *acpi_gbl_gpe_number_to_index;
ACPI_EXTERN
u8
acpi_gbl_db_output_flags
;
ACPI_EXTERN
u8
acpi_gbl_db_output_flags
;
#ifdef ACPI_DISASSEMBLER
ACPI_EXTERN
u8
acpi_gbl_db_opt_disasm
;
ACPI_EXTERN
u8
acpi_gbl_db_opt_verbose
;
#endif
#ifdef ENABLE_DEBUGGER
#ifdef ENABLE_DEBUGGER
...
@@ -247,9 +254,7 @@ ACPI_EXTERN int optind;
...
@@ -247,9 +254,7 @@ ACPI_EXTERN int optind;
ACPI_EXTERN
NATIVE_CHAR
*
optarg
;
ACPI_EXTERN
NATIVE_CHAR
*
optarg
;
ACPI_EXTERN
u8
acpi_gbl_db_opt_tables
;
ACPI_EXTERN
u8
acpi_gbl_db_opt_tables
;
ACPI_EXTERN
u8
acpi_gbl_db_opt_disasm
;
ACPI_EXTERN
u8
acpi_gbl_db_opt_stats
;
ACPI_EXTERN
u8
acpi_gbl_db_opt_stats
;
ACPI_EXTERN
u8
acpi_gbl_db_opt_verbose
;
ACPI_EXTERN
u8
acpi_gbl_db_opt_ini_methods
;
ACPI_EXTERN
u8
acpi_gbl_db_opt_ini_methods
;
...
@@ -261,7 +266,6 @@ ACPI_EXTERN NATIVE_CHAR acpi_gbl_db_debug_filename[40];
...
@@ -261,7 +266,6 @@ ACPI_EXTERN NATIVE_CHAR acpi_gbl_db_debug_filename[40];
ACPI_EXTERN
u8
acpi_gbl_db_output_to_file
;
ACPI_EXTERN
u8
acpi_gbl_db_output_to_file
;
ACPI_EXTERN
NATIVE_CHAR
*
acpi_gbl_db_buffer
;
ACPI_EXTERN
NATIVE_CHAR
*
acpi_gbl_db_buffer
;
ACPI_EXTERN
NATIVE_CHAR
*
acpi_gbl_db_filename
;
ACPI_EXTERN
NATIVE_CHAR
*
acpi_gbl_db_filename
;
ACPI_EXTERN
NATIVE_CHAR
*
acpi_gbl_db_disasm_indent
;
ACPI_EXTERN
u32
acpi_gbl_db_debug_level
;
ACPI_EXTERN
u32
acpi_gbl_db_debug_level
;
ACPI_EXTERN
u32
acpi_gbl_db_console_debug_level
;
ACPI_EXTERN
u32
acpi_gbl_db_console_debug_level
;
ACPI_EXTERN
acpi_table_header
*
acpi_gbl_db_table_ptr
;
ACPI_EXTERN
acpi_table_header
*
acpi_gbl_db_table_ptr
;
...
...
drivers/acpi/include/aclocal.h
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
* Name: aclocal.h - Internal data types used across the ACPI subsystem
* $Revision: 1
68
$
* $Revision: 1
72
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -567,8 +567,8 @@ acpi_status (*ACPI_EXECUTE_OP) (
...
@@ -567,8 +567,8 @@ acpi_status (*ACPI_EXECUTE_OP) (
*/
*/
typedef
struct
acpi_opcode_info
typedef
struct
acpi_opcode_info
{
{
#ifdef
_OPCODE_NAMES
#ifdef
ACPI_DISASSEMBLER
NATIVE_CHAR
*
name
;
/* Opcode name (debug only) */
NATIVE_CHAR
*
name
;
/* Opcode name (d
isassembler/d
ebug only) */
#endif
#endif
u32
parse_args
;
/* Grammar/Parse time arguments */
u32
parse_args
;
/* Grammar/Parse time arguments */
u32
runtime_args
;
/* Interpret time arguments */
u32
runtime_args
;
/* Interpret time arguments */
...
@@ -603,15 +603,23 @@ typedef union acpi_parse_val
...
@@ -603,15 +603,23 @@ typedef union acpi_parse_val
u32 aml_offset;
/* offset of declaration in AML */
\
u32 aml_offset;
/* offset of declaration in AML */
\
union acpi_parse_obj *parent;
/* parent op */
\
union acpi_parse_obj *parent;
/* parent op */
\
union acpi_parse_obj *next;
/* next op */
\
union acpi_parse_obj *next;
/* next op */
\
ACPI_DEBUG_ONLY_MEMBERS (\
ACPI_DISASM_ONLY_MEMBERS (\
u8 disasm_flags;
/* Used during AML disassembly */
\
u8 disasm_opcode;
/* Subtype used for disassembly */
\
NATIVE_CHAR aml_op_name[16])
/* op name (debug only) */
\
NATIVE_CHAR aml_op_name[16])
/* op name (debug only) */
\
/* NON-DEBUG members below: */
\
/* NON-DEBUG members below: */
\
acpi_namespace_node *node;
/* for use by interpreter */
\
acpi_namespace_node *node;
/* for use by interpreter */
\
acpi_parse_value value;
/* Value or args associated with the opcode */
\
acpi_parse_value value;
/* Value or args associated with the opcode */
\
#define ACPI_DASM_BUFFER 0x00
#define ACPI_DASM_RESOURCE 0x01
#define ACPI_DASM_STRING 0x02
#define ACPI_DASM_UNICODE 0x03
#define ACPI_DASM_EISAID 0x04
#define ACPI_DASM_MATCHOP 0x05
/*
/*
* generic operation (
eg.
If, While, Store)
* generic operation (
for example:
If, While, Store)
*/
*/
typedef
struct
acpi_parseobj_common
typedef
struct
acpi_parseobj_common
{
{
...
@@ -626,6 +634,7 @@ typedef struct acpi_parseobj_common
...
@@ -626,6 +634,7 @@ typedef struct acpi_parseobj_common
typedef
struct
acpi_parseobj_named
typedef
struct
acpi_parseobj_named
{
{
ACPI_PARSE_COMMON
ACPI_PARSE_COMMON
u8
*
path
;
u8
*
data
;
/* AML body or bytelist data */
u8
*
data
;
/* AML body or bytelist data */
u32
length
;
/* AML length */
u32
length
;
/* AML length */
u32
name
;
/* 4-byte name or zero if no name */
u32
name
;
/* 4-byte name or zero if no name */
...
@@ -653,15 +662,15 @@ typedef struct acpi_parseobj_asl
...
@@ -653,15 +662,15 @@ typedef struct acpi_parseobj_asl
u32
logical_byte_offset
;
u32
logical_byte_offset
;
u32
end_line
;
u32
end_line
;
u32
end_logical_line
;
u32
end_logical_line
;
u16
parse_opcode
;
u32
acpi_btype
;
u32
acpi_btype
;
u32
aml_length
;
u32
aml_length
;
u32
aml_subtree_length
;
u32
aml_subtree_length
;
u32
final_aml_length
;
u32
final_aml_length
;
u32
final_aml_offset
;
u32
final_aml_offset
;
u16
parse_opcode
;
u16
compile_flags
;
u8
aml_opcode_length
;
u8
aml_opcode_length
;
u8
aml_pkg_len_bytes
;
u8
aml_pkg_len_bytes
;
u16
compile_flags
;
u8
extra
;
u8
extra
;
char
parse_op_name
[
12
];
char
parse_op_name
[
12
];
...
@@ -705,6 +714,13 @@ typedef struct acpi_parse_state
...
@@ -705,6 +714,13 @@ typedef struct acpi_parse_state
#define ACPI_PARSEOP_BYTELIST 0x08
#define ACPI_PARSEOP_BYTELIST 0x08
#define ACPI_PARSEOP_IN_CACHE 0x80
#define ACPI_PARSEOP_IN_CACHE 0x80
/* Parse object Disasm_flags */
#define ACPI_PARSEOP_IGNORE 0x01
#define ACPI_PARSEOP_PARAMLIST 0x02
#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
#define ACPI_PARSEOP_SPECIAL 0x10
/*****************************************************************************
/*****************************************************************************
*
*
...
...
drivers/acpi/include/acmacros.h
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Name: acmacros.h - C macros for the entire subsystem.
* Name: acmacros.h - C macros for the entire subsystem.
* $Revision: 12
4
$
* $Revision: 12
5
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -287,10 +287,12 @@
...
@@ -287,10 +287,12 @@
/*
/*
* Macros for the master AML opcode table
* Macros for the master AML opcode table
*/
*/
#if
defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
#if
def ACPI_DISASSEMBLER
#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags) {name,Pargs,Iargs,flags,obj_type,class,type}
#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags) {name,Pargs,Iargs,flags,obj_type,class,type}
#define ACPI_DISASM_ONLY_MEMBERS(a) a;
#else
#else
#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags) {Pargs,Iargs,flags,obj_type,class,type}
#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags) {Pargs,Iargs,flags,obj_type,class,type}
#define ACPI_DISASM_ONLY_MEMBERS(a)
#endif
#endif
#define ARG_TYPE_WIDTH 5
#define ARG_TYPE_WIDTH 5
...
@@ -435,7 +437,6 @@
...
@@ -435,7 +437,6 @@
#define ACPI_DEBUG_DEFINE(a) a;
#define ACPI_DEBUG_DEFINE(a) a;
#define ACPI_DEBUG_ONLY_MEMBERS(a) a;
#define ACPI_DEBUG_ONLY_MEMBERS(a) a;
#define _OPCODE_NAMES
#define _VERBOSE_STRUCTURES
#define _VERBOSE_STRUCTURES
...
@@ -515,10 +516,6 @@
...
@@ -515,10 +516,6 @@
#define return_VALUE(s) return(s)
#define return_VALUE(s) return(s)
#define return_PTR(s) return(s)
#define return_PTR(s) return(s)
#ifdef ENABLE_DEBUGGER
#define _OPCODE_NAMES
#endif
#endif
#endif
/*
/*
...
...
drivers/acpi/include/acnamesp.h
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
* $Revision: 12
5
$
* $Revision: 12
6
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
/* Definitions of the predefined namespace names */
/* Definitions of the predefined namespace names */
#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F
/* Unknown name is "????" */
#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F
/* Unknown name is "????" */
#define ACPI_ROOT_NAME (u32) 0x
2F202020
/* Root name is "/
" */
#define ACPI_ROOT_NAME (u32) 0x
5F5F5F5C
/* Root name is "\___
" */
#define ACPI_SYS_BUS_NAME (u32) 0x5F53425F
/* Sys bus name is "_SB_" */
#define ACPI_SYS_BUS_NAME (u32) 0x5F53425F
/* Sys bus name is "_SB_" */
#define ACPI_NS_ROOT_PATH "\\"
#define ACPI_NS_ROOT_PATH "\\"
...
...
drivers/acpi/include/acpiosxf.h
View file @
26cffe4a
...
@@ -204,7 +204,6 @@ acpi_os_read_port (
...
@@ -204,7 +204,6 @@ acpi_os_read_port (
void
*
value
,
void
*
value
,
u32
width
);
u32
width
);
acpi_status
acpi_status
acpi_os_write_port
(
acpi_os_write_port
(
ACPI_IO_ADDRESS
address
,
ACPI_IO_ADDRESS
address
,
...
@@ -222,7 +221,6 @@ acpi_os_read_memory (
...
@@ -222,7 +221,6 @@ acpi_os_read_memory (
void
*
value
,
void
*
value
,
u32
width
);
u32
width
);
acpi_status
acpi_status
acpi_os_write_memory
(
acpi_os_write_memory
(
ACPI_PHYSICAL_ADDRESS
address
,
ACPI_PHYSICAL_ADDRESS
address
,
...
@@ -241,7 +239,6 @@ acpi_os_read_pci_configuration (
...
@@ -241,7 +239,6 @@ acpi_os_read_pci_configuration (
void
*
value
,
void
*
value
,
u32
width
);
u32
width
);
acpi_status
acpi_status
acpi_os_write_pci_configuration
(
acpi_os_write_pci_configuration
(
acpi_pci_id
*
pci_id
,
acpi_pci_id
*
pci_id
,
...
@@ -259,7 +256,6 @@ acpi_os_readable (
...
@@ -259,7 +256,6 @@ acpi_os_readable (
void
*
pointer
,
void
*
pointer
,
u32
length
);
u32
length
);
u8
u8
acpi_os_writable
(
acpi_os_writable
(
void
*
pointer
,
void
*
pointer
,
...
@@ -288,6 +284,10 @@ acpi_os_vprintf (
...
@@ -288,6 +284,10 @@ acpi_os_vprintf (
const
NATIVE_CHAR
*
format
,
const
NATIVE_CHAR
*
format
,
va_list
args
);
va_list
args
);
void
acpi_os_redirect_output
(
void
*
destination
);
/*
/*
* Debug input
* Debug input
...
...
drivers/acpi/include/acutils.h
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
* Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
* $Revision: 14
0
$
* $Revision: 14
2
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -224,6 +224,9 @@ extern const u8 _acpi_ctype[];
...
@@ -224,6 +224,9 @@ extern const u8 _acpi_ctype[];
#define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
#define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
#define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
#define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
#define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
#define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
#define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU))
#define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
#define ACPI_IS_ASCII(c) ((c) < 0x80)
#endif
/* ACPI_USE_SYSTEM_CLIBRARY */
#endif
/* ACPI_USE_SYSTEM_CLIBRARY */
...
...
drivers/acpi/include/amlcode.h
View file @
26cffe4a
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* Name: amlcode.h - Definitions for AML, as included in "definition blocks"
* Name: amlcode.h - Definitions for AML, as included in "definition blocks"
* Declarations and definitions contained herein are derived
* Declarations and definitions contained herein are derived
* directly from the ACPI specification.
* directly from the ACPI specification.
* $Revision: 6
8
$
* $Revision: 6
9
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -474,13 +474,4 @@ typedef enum
...
@@ -474,13 +474,4 @@ typedef enum
#define METHOD_FLAGS_SYNCH_LEVEL 0xF0
#define METHOD_FLAGS_SYNCH_LEVEL 0xF0
/* Array sizes. Used for range checking also */
#define NUM_ACCESS_TYPES 6
#define NUM_UPDATE_RULES 3
#define NUM_MATCH_OPS 7
#define NUM_OPCODES 256
#define NUM_FIELD_NAMES 2
#endif
/* __AMLCODE_H__ */
#endif
/* __AMLCODE_H__ */
drivers/acpi/include/amlresrc.h
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: a
slresource.h - AS
L resource descriptors
* Module Name: a
mlresrc.h - AM
L resource descriptors
* $Revision:
19
$
* $Revision:
20
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
*/
*/
#ifndef __A
SLRESOURCE
_H
#ifndef __A
MLRESRC
_H
#define __A
SLRESOURCE
_H
#define __A
MLRESRC
_H
#define ASL_RESNAME_ADDRESS "_ADR"
#define ASL_RESNAME_ADDRESS "_ADR"
...
@@ -80,11 +80,13 @@ typedef struct asl_resource_node
...
@@ -80,11 +80,13 @@ typedef struct asl_resource_node
/*
/*
* Resource descriptors defined in the ACPI specification
* Resource descriptors defined in the ACPI specification.
*
* Alignment must be BYTE because these descriptors
* are used to overlay the AML byte stream.
*/
*/
#pragma pack(1)
#pragma pack(1)
typedef
struct
asl_irq_format_desc
typedef
struct
asl_irq_format_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -94,7 +96,6 @@ typedef struct asl_irq_format_desc
...
@@ -94,7 +96,6 @@ typedef struct asl_irq_format_desc
}
ASL_IRQ_FORMAT_DESC
;
}
ASL_IRQ_FORMAT_DESC
;
#pragma pack(1)
typedef
struct
asl_irq_noflags_desc
typedef
struct
asl_irq_noflags_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -103,7 +104,6 @@ typedef struct asl_irq_noflags_desc
...
@@ -103,7 +104,6 @@ typedef struct asl_irq_noflags_desc
}
ASL_IRQ_NOFLAGS_DESC
;
}
ASL_IRQ_NOFLAGS_DESC
;
#pragma pack(1)
typedef
struct
asl_dma_format_desc
typedef
struct
asl_dma_format_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -113,7 +113,6 @@ typedef struct asl_dma_format_desc
...
@@ -113,7 +113,6 @@ typedef struct asl_dma_format_desc
}
ASL_DMA_FORMAT_DESC
;
}
ASL_DMA_FORMAT_DESC
;
#pragma pack(1)
typedef
struct
asl_start_dependent_desc
typedef
struct
asl_start_dependent_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -122,7 +121,6 @@ typedef struct asl_start_dependent_desc
...
@@ -122,7 +121,6 @@ typedef struct asl_start_dependent_desc
}
ASL_START_DEPENDENT_DESC
;
}
ASL_START_DEPENDENT_DESC
;
#pragma pack(1)
typedef
struct
asl_start_dependent_noprio_desc
typedef
struct
asl_start_dependent_noprio_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -130,7 +128,6 @@ typedef struct asl_start_dependent_noprio_desc
...
@@ -130,7 +128,6 @@ typedef struct asl_start_dependent_noprio_desc
}
ASL_START_DEPENDENT_NOPRIO_DESC
;
}
ASL_START_DEPENDENT_NOPRIO_DESC
;
#pragma pack(1)
typedef
struct
asl_end_dependent_desc
typedef
struct
asl_end_dependent_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -138,7 +135,6 @@ typedef struct asl_end_dependent_desc
...
@@ -138,7 +135,6 @@ typedef struct asl_end_dependent_desc
}
ASL_END_DEPENDENT_DESC
;
}
ASL_END_DEPENDENT_DESC
;
#pragma pack(1)
typedef
struct
asl_io_port_desc
typedef
struct
asl_io_port_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -151,7 +147,6 @@ typedef struct asl_io_port_desc
...
@@ -151,7 +147,6 @@ typedef struct asl_io_port_desc
}
ASL_IO_PORT_DESC
;
}
ASL_IO_PORT_DESC
;
#pragma pack(1)
typedef
struct
asl_fixed_io_port_desc
typedef
struct
asl_fixed_io_port_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -161,7 +156,6 @@ typedef struct asl_fixed_io_port_desc
...
@@ -161,7 +156,6 @@ typedef struct asl_fixed_io_port_desc
}
ASL_FIXED_IO_PORT_DESC
;
}
ASL_FIXED_IO_PORT_DESC
;
#pragma pack(1)
typedef
struct
asl_small_vendor_desc
typedef
struct
asl_small_vendor_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -170,7 +164,6 @@ typedef struct asl_small_vendor_desc
...
@@ -170,7 +164,6 @@ typedef struct asl_small_vendor_desc
}
ASL_SMALL_VENDOR_DESC
;
}
ASL_SMALL_VENDOR_DESC
;
#pragma pack(1)
typedef
struct
asl_end_tag_desc
typedef
struct
asl_end_tag_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -181,7 +174,6 @@ typedef struct asl_end_tag_desc
...
@@ -181,7 +174,6 @@ typedef struct asl_end_tag_desc
/* LARGE descriptors */
/* LARGE descriptors */
#pragma pack(1)
typedef
struct
asl_memory_24_desc
typedef
struct
asl_memory_24_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -195,7 +187,6 @@ typedef struct asl_memory_24_desc
...
@@ -195,7 +187,6 @@ typedef struct asl_memory_24_desc
}
ASL_MEMORY_24_DESC
;
}
ASL_MEMORY_24_DESC
;
#pragma pack(1)
typedef
struct
asl_large_vendor_desc
typedef
struct
asl_large_vendor_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -205,7 +196,6 @@ typedef struct asl_large_vendor_desc
...
@@ -205,7 +196,6 @@ typedef struct asl_large_vendor_desc
}
ASL_LARGE_VENDOR_DESC
;
}
ASL_LARGE_VENDOR_DESC
;
#pragma pack(1)
typedef
struct
asl_memory_32_desc
typedef
struct
asl_memory_32_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -219,7 +209,6 @@ typedef struct asl_memory_32_desc
...
@@ -219,7 +209,6 @@ typedef struct asl_memory_32_desc
}
ASL_MEMORY_32_DESC
;
}
ASL_MEMORY_32_DESC
;
#pragma pack(1)
typedef
struct
asl_fixed_memory_32_desc
typedef
struct
asl_fixed_memory_32_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -231,7 +220,6 @@ typedef struct asl_fixed_memory_32_desc
...
@@ -231,7 +220,6 @@ typedef struct asl_fixed_memory_32_desc
}
ASL_FIXED_MEMORY_32_DESC
;
}
ASL_FIXED_MEMORY_32_DESC
;
#pragma pack(1)
typedef
struct
asl_qword_address_desc
typedef
struct
asl_qword_address_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -249,7 +237,6 @@ typedef struct asl_qword_address_desc
...
@@ -249,7 +237,6 @@ typedef struct asl_qword_address_desc
}
ASL_QWORD_ADDRESS_DESC
;
}
ASL_QWORD_ADDRESS_DESC
;
#pragma pack(1)
typedef
struct
asl_dword_address_desc
typedef
struct
asl_dword_address_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -267,7 +254,6 @@ typedef struct asl_dword_address_desc
...
@@ -267,7 +254,6 @@ typedef struct asl_dword_address_desc
}
ASL_DWORD_ADDRESS_DESC
;
}
ASL_DWORD_ADDRESS_DESC
;
#pragma pack(1)
typedef
struct
asl_word_address_desc
typedef
struct
asl_word_address_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -285,7 +271,6 @@ typedef struct asl_word_address_desc
...
@@ -285,7 +271,6 @@ typedef struct asl_word_address_desc
}
ASL_WORD_ADDRESS_DESC
;
}
ASL_WORD_ADDRESS_DESC
;
#pragma pack(1)
typedef
struct
asl_extended_xrupt_desc
typedef
struct
asl_extended_xrupt_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -298,7 +283,6 @@ typedef struct asl_extended_xrupt_desc
...
@@ -298,7 +283,6 @@ typedef struct asl_extended_xrupt_desc
}
ASL_EXTENDED_XRUPT_DESC
;
}
ASL_EXTENDED_XRUPT_DESC
;
#pragma pack(1)
typedef
struct
asl_general_register_desc
typedef
struct
asl_general_register_desc
{
{
u8
descriptor_type
;
u8
descriptor_type
;
...
@@ -311,6 +295,9 @@ typedef struct asl_general_register_desc
...
@@ -311,6 +295,9 @@ typedef struct asl_general_register_desc
}
ASL_GENERAL_REGISTER_DESC
;
}
ASL_GENERAL_REGISTER_DESC
;
/* restore default alignment */
#pragma pack()
/* Union of all resource descriptors, sow we can allocate the worst case */
/* Union of all resource descriptors, sow we can allocate the worst case */
...
...
drivers/acpi/include/platform/acenv.h
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Name: acenv.h - Generation environment specific items
* Name: acenv.h - Generation environment specific items
* $Revision: 9
5
$
* $Revision: 9
9
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -32,11 +32,13 @@
...
@@ -32,11 +32,13 @@
*/
*/
#ifdef _ACPI_DUMP_APP
#ifdef _ACPI_DUMP_APP
#ifndef MSDOS
#define ACPI_DEBUG
#define ACPI_DEBUG
#endif
#define ACPI_APPLICATION
#define ACPI_APPLICATION
#define ENABLE_DEBUGGER
#define ACPI_DISASSEMBLER
#define ACPI_NO_METHOD_EXECUTION
#define ACPI_USE_SYSTEM_CLIBRARY
#define ACPI_USE_SYSTEM_CLIBRARY
#define PARSER_ONLY
#endif
#endif
#ifdef _ACPI_EXEC_APP
#ifdef _ACPI_EXEC_APP
...
@@ -45,13 +47,15 @@
...
@@ -45,13 +47,15 @@
#define ACPI_DEBUG
#define ACPI_DEBUG
#define ACPI_APPLICATION
#define ACPI_APPLICATION
#define ENABLE_DEBUGGER
#define ENABLE_DEBUGGER
#define ACPI_DISASSEMBLER
#define ACPI_USE_SYSTEM_CLIBRARY
#define ACPI_USE_SYSTEM_CLIBRARY
#endif
#endif
#ifdef _ACPI_ASL_COMPILER
#ifdef _ACPI_ASL_COMPILER
#define ACPI_DEBUG
#define ACPI_DEBUG
#define ACPI_APPLICATION
#define ACPI_APPLICATION
/* #define ENABLE_DEBUGGER */
#define ACPI_DISASSEMBLER
#define ACPI_CONSTANT_EVAL_ONLY
#define ACPI_USE_SYSTEM_CLIBRARY
#define ACPI_USE_SYSTEM_CLIBRARY
#endif
#endif
...
@@ -183,7 +187,6 @@
...
@@ -183,7 +187,6 @@
/*
/*
* Use the standard C library headers.
* Use the standard C library headers.
* We want to keep these to a minimum.
* We want to keep these to a minimum.
*
*/
*/
#ifdef ACPI_USE_STANDARD_HEADERS
#ifdef ACPI_USE_STANDARD_HEADERS
...
@@ -213,12 +216,16 @@
...
@@ -213,12 +216,16 @@
#define ACPI_STRTOUL(d,s,n) strtoul((d), (s), (ACPI_SIZE)(n))
#define ACPI_STRTOUL(d,s,n) strtoul((d), (s), (ACPI_SIZE)(n))
#define ACPI_MEMCPY(d,s,n) (void) memcpy((d), (s), (ACPI_SIZE)(n))
#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_MEMSET(d,s,n) (void) memset((d), (s), (ACPI_SIZE)(n))
#define ACPI_TOUPPER toupper
#define ACPI_TOUPPER toupper
#define ACPI_TOLOWER tolower
#define ACPI_TOLOWER tolower
#define ACPI_IS_XDIGIT isxdigit
#define ACPI_IS_XDIGIT isxdigit
#define ACPI_IS_DIGIT isdigit
#define ACPI_IS_DIGIT isdigit
#define ACPI_IS_SPACE isspace
#define ACPI_IS_SPACE isspace
#define ACPI_IS_UPPER isupper
#define ACPI_IS_UPPER isupper
#define ACPI_IS_PRINT isprint
#define ACPI_IS_ALPHA isalpha
#define ACPI_IS_ASCII isascii
/******************************************************************************
/******************************************************************************
*
*
...
...
drivers/acpi/namespace/nsdump.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: nsdump - table dumping routines for debug
* Module Name: nsdump - table dumping routines for debug
* $Revision: 13
6
$
* $Revision: 13
7
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -619,93 +619,6 @@ acpi_ns_dump_objects (
...
@@ -619,93 +619,6 @@ acpi_ns_dump_objects (
}
}
#ifndef _ACPI_ASL_COMPILER
/*******************************************************************************
*
* FUNCTION: Acpi_ns_dump_one_device
*
* PARAMETERS: Handle - Node to be dumped
* Level - Nesting level of the handle
* Context - Passed into Walk_namespace
*
* DESCRIPTION: Dump a single Node that represents a device
* This procedure is a User_function called by Acpi_ns_walk_namespace.
*
******************************************************************************/
acpi_status
acpi_ns_dump_one_device
(
acpi_handle
obj_handle
,
u32
level
,
void
*
context
,
void
**
return_value
)
{
acpi_device_info
info
;
acpi_status
status
;
u32
i
;
ACPI_FUNCTION_NAME
(
"Ns_dump_one_device"
);
status
=
acpi_ns_dump_one_object
(
obj_handle
,
level
,
context
,
return_value
);
status
=
acpi_get_object_info
(
obj_handle
,
&
info
);
if
(
ACPI_SUCCESS
(
status
))
{
for
(
i
=
0
;
i
<
level
;
i
++
)
{
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_TABLES
,
" "
));
}
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_TABLES
,
" HID: %s, ADR: %8.8X%8.8X, Status: %X
\n
"
,
info
.
hardware_id
,
ACPI_HIDWORD
(
info
.
address
),
ACPI_LODWORD
(
info
.
address
),
info
.
current_status
));
}
return
(
status
);
}
/*******************************************************************************
*
* FUNCTION: Acpi_ns_dump_root_devices
*
* PARAMETERS: None
*
* DESCRIPTION: Dump all objects of type "device"
*
******************************************************************************/
void
acpi_ns_dump_root_devices
(
void
)
{
acpi_handle
sys_bus_handle
;
acpi_status
status
;
ACPI_FUNCTION_NAME
(
"Ns_dump_root_devices"
);
/* Only dump the table if tracing is enabled */
if
(
!
(
ACPI_LV_TABLES
&
acpi_dbg_level
))
{
return
;
}
status
=
acpi_get_handle
(
0
,
ACPI_NS_SYSTEM_BUS
,
&
sys_bus_handle
);
if
(
ACPI_FAILURE
(
status
))
{
return
;
}
ACPI_DEBUG_PRINT
((
ACPI_DB_TABLES
,
"Display of all devices in the namespace:
\n
"
));
status
=
acpi_ns_walk_namespace
(
ACPI_TYPE_DEVICE
,
sys_bus_handle
,
ACPI_UINT32_MAX
,
ACPI_NS_WALK_NO_UNLOCK
,
acpi_ns_dump_one_device
,
NULL
,
NULL
);
}
#endif
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: Acpi_ns_dump_tables
* FUNCTION: Acpi_ns_dump_tables
...
...
drivers/acpi/namespace/nsdumpdv.c
0 → 100644
View file @
26cffe4a
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
* $Revision: 1 $
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "acpi.h"
#include "acnamesp.h"
#include "acparser.h"
#define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME
(
"nsdumpdv"
)
#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
/*******************************************************************************
*
* FUNCTION: Acpi_ns_dump_one_device
*
* PARAMETERS: Handle - Node to be dumped
* Level - Nesting level of the handle
* Context - Passed into Walk_namespace
*
* DESCRIPTION: Dump a single Node that represents a device
* This procedure is a User_function called by Acpi_ns_walk_namespace.
*
******************************************************************************/
acpi_status
acpi_ns_dump_one_device
(
acpi_handle
obj_handle
,
u32
level
,
void
*
context
,
void
**
return_value
)
{
acpi_device_info
info
;
acpi_status
status
;
u32
i
;
ACPI_FUNCTION_NAME
(
"Ns_dump_one_device"
);
status
=
acpi_ns_dump_one_object
(
obj_handle
,
level
,
context
,
return_value
);
status
=
acpi_get_object_info
(
obj_handle
,
&
info
);
if
(
ACPI_SUCCESS
(
status
))
{
for
(
i
=
0
;
i
<
level
;
i
++
)
{
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_TABLES
,
" "
));
}
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_TABLES
,
" HID: %s, ADR: %8.8X%8.8X, Status: %X
\n
"
,
info
.
hardware_id
,
ACPI_HIDWORD
(
info
.
address
),
ACPI_LODWORD
(
info
.
address
),
info
.
current_status
));
}
return
(
status
);
}
/*******************************************************************************
*
* FUNCTION: Acpi_ns_dump_root_devices
*
* PARAMETERS: None
*
* DESCRIPTION: Dump all objects of type "device"
*
******************************************************************************/
void
acpi_ns_dump_root_devices
(
void
)
{
acpi_handle
sys_bus_handle
;
acpi_status
status
;
ACPI_FUNCTION_NAME
(
"Ns_dump_root_devices"
);
/* Only dump the table if tracing is enabled */
if
(
!
(
ACPI_LV_TABLES
&
acpi_dbg_level
))
{
return
;
}
status
=
acpi_get_handle
(
0
,
ACPI_NS_SYSTEM_BUS
,
&
sys_bus_handle
);
if
(
ACPI_FAILURE
(
status
))
{
return
;
}
ACPI_DEBUG_PRINT
((
ACPI_DB_TABLES
,
"Display of all devices in the namespace:
\n
"
));
status
=
acpi_ns_walk_namespace
(
ACPI_TYPE_DEVICE
,
sys_bus_handle
,
ACPI_UINT32_MAX
,
ACPI_NS_WALK_NO_UNLOCK
,
acpi_ns_dump_one_device
,
NULL
,
NULL
);
}
#endif
drivers/acpi/namespace/nsload.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: nsload - namespace loading/expanding/contracting procedures
* Module Name: nsload - namespace loading/expanding/contracting procedures
* $Revision: 5
6
$
* $Revision: 5
7
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -37,59 +37,7 @@
...
@@ -37,59 +37,7 @@
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: Acpi_load_namespace
* FUNCTION: Ns_one_complete_parse
*
* PARAMETERS: None
*
* RETURN: Status
*
* DESCRIPTION: Load the name space from what ever is pointed to by DSDT.
* (DSDT points to either the BIOS or a buffer.)
*
******************************************************************************/
acpi_status
acpi_ns_load_namespace
(
void
)
{
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"Acpi_load_name_space"
);
/* There must be at least a DSDT installed */
if
(
acpi_gbl_DSDT
==
NULL
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"DSDT is not in memory
\n
"
));
return_ACPI_STATUS
(
AE_NO_ACPI_TABLES
);
}
/*
* Load the namespace. The DSDT is required,
* but the SSDT and PSDT tables are optional.
*/
status
=
acpi_ns_load_table_by_type
(
ACPI_TABLE_DSDT
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
/* Ignore exceptions from these */
(
void
)
acpi_ns_load_table_by_type
(
ACPI_TABLE_SSDT
);
(
void
)
acpi_ns_load_table_by_type
(
ACPI_TABLE_PSDT
);
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_OK
,
"ACPI Namespace successfully loaded at root %p
\n
"
,
acpi_gbl_root_node
));
return_ACPI_STATUS
(
status
);
}
/*******************************************************************************
*
* FUNCTION: Acpi_ns_one_parse_pass
*
*
* PARAMETERS: Pass_number - 1 or 2
* PARAMETERS: Pass_number - 1 or 2
* Table_desc - The table to be parsed.
* Table_desc - The table to be parsed.
...
@@ -203,6 +151,7 @@ acpi_ns_parse_table (
...
@@ -203,6 +151,7 @@ acpi_ns_parse_table (
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
#ifndef ACPI_NO_METHOD_EXECUTION
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -419,6 +368,58 @@ acpi_ns_load_table_by_type (
...
@@ -419,6 +368,58 @@ acpi_ns_load_table_by_type (
}
}
/*******************************************************************************
*
* FUNCTION: Acpi_load_namespace
*
* PARAMETERS: None
*
* RETURN: Status
*
* DESCRIPTION: Load the name space from what ever is pointed to by DSDT.
* (DSDT points to either the BIOS or a buffer.)
*
******************************************************************************/
acpi_status
acpi_ns_load_namespace
(
void
)
{
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"Acpi_load_name_space"
);
/* There must be at least a DSDT installed */
if
(
acpi_gbl_DSDT
==
NULL
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"DSDT is not in memory
\n
"
));
return_ACPI_STATUS
(
AE_NO_ACPI_TABLES
);
}
/*
* Load the namespace. The DSDT is required,
* but the SSDT and PSDT tables are optional.
*/
status
=
acpi_ns_load_table_by_type
(
ACPI_TABLE_DSDT
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
/* Ignore exceptions from these */
(
void
)
acpi_ns_load_table_by_type
(
ACPI_TABLE_SSDT
);
(
void
)
acpi_ns_load_table_by_type
(
ACPI_TABLE_PSDT
);
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_OK
,
"ACPI Namespace successfully loaded at root %p
\n
"
,
acpi_gbl_root_node
));
return_ACPI_STATUS
(
status
);
}
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: Acpi_ns_delete_subtree
* FUNCTION: Acpi_ns_delete_subtree
...
@@ -550,4 +551,5 @@ acpi_ns_unload_namespace (
...
@@ -550,4 +551,5 @@ acpi_ns_unload_namespace (
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
#endif
drivers/acpi/namespace/nsxfeval.c
0 → 100644
View file @
26cffe4a
This diff is collapsed.
Click to expand it.
drivers/acpi/namespace/nsxfobj.c
View file @
26cffe4a
This diff is collapsed.
Click to expand it.
drivers/acpi/parser/psargs.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: psargs - Parse AML opcode arguments
* Module Name: psargs - Parse AML opcode arguments
* $Revision: 6
1
$
* $Revision: 6
2
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -332,7 +332,7 @@ acpi_ps_get_next_namepath (
...
@@ -332,7 +332,7 @@ acpi_ps_get_next_namepath (
NATIVE_CHAR
*
path
;
NATIVE_CHAR
*
path
;
acpi_parse_object
*
name_op
;
acpi_parse_object
*
name_op
;
acpi_status
status
;
acpi_status
status
;
acpi_
namespace_node
*
method_node
=
NULL
;
acpi_
operand_object
*
method_desc
;
acpi_namespace_node
*
node
;
acpi_namespace_node
*
node
;
acpi_generic_state
scope_info
;
acpi_generic_state
scope_info
;
...
@@ -369,12 +369,15 @@ acpi_ps_get_next_namepath (
...
@@ -369,12 +369,15 @@ acpi_ps_get_next_namepath (
&
node
);
&
node
);
if
(
ACPI_SUCCESS
(
status
))
{
if
(
ACPI_SUCCESS
(
status
))
{
if
(
node
->
type
==
ACPI_TYPE_METHOD
)
{
if
(
node
->
type
==
ACPI_TYPE_METHOD
)
{
method_
node
=
node
;
method_
desc
=
acpi_ns_get_attached_object
(
node
)
;
ACPI_DEBUG_PRINT
((
ACPI_DB_PARSE
,
"
method -
%p Path=%p
\n
"
,
ACPI_DEBUG_PRINT
((
ACPI_DB_PARSE
,
"
Control Method - %p Desc
%p Path=%p
\n
"
,
method_node
,
path
));
node
,
method_desc
,
path
));
name_op
=
acpi_ps_alloc_op
(
AML_INT_NAMEPATH_OP
);
name_op
=
acpi_ps_alloc_op
(
AML_INT_NAMEPATH_OP
);
if
(
name_op
)
{
if
(
!
name_op
)
{
return_VOID
;
}
/* Change arg into a METHOD CALL and attach name to it */
/* Change arg into a METHOD CALL and attach name to it */
acpi_ps_init_op
(
arg
,
AML_INT_METHODCALL_OP
);
acpi_ps_init_op
(
arg
,
AML_INT_METHODCALL_OP
);
...
@@ -383,16 +386,19 @@ acpi_ps_get_next_namepath (
...
@@ -383,16 +386,19 @@ acpi_ps_get_next_namepath (
/* Point METHODCALL/NAME to the METHOD Node */
/* Point METHODCALL/NAME to the METHOD Node */
name_op
->
common
.
node
=
method_
node
;
name_op
->
common
.
node
=
node
;
acpi_ps_append_arg
(
arg
,
name_op
);
acpi_ps_append_arg
(
arg
,
name_op
);
if
(
!
acpi_ns_get_attached_object
(
method_node
))
{
if
(
!
method_desc
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_PARSE
,
"Control Method - %p has no attached object
\n
"
,
node
));
return_VOID
;
return_VOID
;
}
}
*
arg_count
=
(
acpi_ns_get_attached_object
(
method_node
))
->
method
.
param_count
;
ACPI_DEBUG_PRINT
((
ACPI_DB_PARSE
,
"Control Method - %p Args %X
\n
"
,
}
node
,
method_desc
->
method
.
param_count
));
*
arg_count
=
method_desc
->
method
.
param_count
;
return_VOID
;
return_VOID
;
}
}
...
...
drivers/acpi/parser/psopcode.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: psopcode - Parser/Interpreter opcode information table
* Module Name: psopcode - Parser/Interpreter opcode information table
* $Revision: 7
0
$
* $Revision: 7
1
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -734,7 +734,7 @@ NATIVE_CHAR *
...
@@ -734,7 +734,7 @@ NATIVE_CHAR *
acpi_ps_get_opcode_name
(
acpi_ps_get_opcode_name
(
u16
opcode
)
u16
opcode
)
{
{
#ifdef ACPI_D
EBUG
#ifdef ACPI_D
ISASSEMBLER
const
acpi_opcode_info
*
op
;
const
acpi_opcode_info
*
op
;
...
...
drivers/acpi/parser/psparse.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: psparse - Parser top level AML parse routines
* Module Name: psparse - Parser top level AML parse routines
* $Revision: 12
8
$
* $Revision: 12
9
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -473,7 +473,7 @@ acpi_ps_parse_loop (
...
@@ -473,7 +473,7 @@ acpi_ps_parse_loop (
parser_state
=
&
walk_state
->
parser_state
;
parser_state
=
&
walk_state
->
parser_state
;
walk_state
->
arg_types
=
0
;
walk_state
->
arg_types
=
0
;
#if
ndef PARSER_ONLY
#if
(!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
if
(
walk_state
->
walk_type
&
ACPI_WALK_METHOD_RESTART
)
{
if
(
walk_state
->
walk_type
&
ACPI_WALK_METHOD_RESTART
)
{
/* We are restarting a preempted control method */
/* We are restarting a preempted control method */
...
...
drivers/acpi/parser/psutils.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: psutils - Parser miscellaneous utilities (Parser only)
* Module Name: psutils - Parser miscellaneous utilities (Parser only)
* $Revision: 5
2
$
* $Revision: 5
3
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -186,7 +186,7 @@ acpi_ps_free_op (
...
@@ -186,7 +186,7 @@ acpi_ps_free_op (
ACPI_DEBUG_PRINT
((
ACPI_DB_ALLOCATIONS
,
"Free retval op: %p
\n
"
,
op
));
ACPI_DEBUG_PRINT
((
ACPI_DB_ALLOCATIONS
,
"Free retval op: %p
\n
"
,
op
));
}
}
if
(
op
->
common
.
flags
==
ACPI_PARSEOP_GENERIC
)
{
if
(
op
->
common
.
flags
&
ACPI_PARSEOP_GENERIC
)
{
acpi_ut_release_to_cache
(
ACPI_MEM_LIST_PSNODE
,
op
);
acpi_ut_release_to_cache
(
ACPI_MEM_LIST_PSNODE
,
op
);
}
}
else
{
else
{
...
...
drivers/acpi/pci_irq.c
View file @
26cffe4a
/*
/*
* pci_irq.c - ACPI PCI Interrupt Routing ($Revision: 1
0
$)
* pci_irq.c - ACPI PCI Interrupt Routing ($Revision: 1
1
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
...
drivers/acpi/pci_link.c
View file @
26cffe4a
/*
/*
* pci_link.c - ACPI PCI Interrupt Link Device Driver ($Revision: 3
3
$)
* pci_link.c - ACPI PCI Interrupt Link Device Driver ($Revision: 3
4
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
@@ -54,12 +54,12 @@ static int acpi_pci_link_add (struct acpi_device *device);
...
@@ -54,12 +54,12 @@ static int acpi_pci_link_add (struct acpi_device *device);
static
int
acpi_pci_link_remove
(
struct
acpi_device
*
device
,
int
type
);
static
int
acpi_pci_link_remove
(
struct
acpi_device
*
device
,
int
type
);
static
struct
acpi_driver
acpi_pci_link_driver
=
{
static
struct
acpi_driver
acpi_pci_link_driver
=
{
name:
ACPI_PCI_LINK_DRIVER_NAME
,
.
name
=
ACPI_PCI_LINK_DRIVER_NAME
,
class:
ACPI_PCI_LINK_CLASS
,
.
class
=
ACPI_PCI_LINK_CLASS
,
ids:
ACPI_PCI_LINK_HID
,
.
ids
=
ACPI_PCI_LINK_HID
,
ops:
{
.
ops
=
{
add:
acpi_pci_link_add
,
.
add
=
acpi_pci_link_add
,
remove:
acpi_pci_link_remove
,
.
remove
=
acpi_pci_link_remove
,
},
},
};
};
...
...
drivers/acpi/pci_root.c
View file @
26cffe4a
/*
/*
* pci_root.c - ACPI PCI Root Bridge Driver ($Revision:
39
$)
* pci_root.c - ACPI PCI Root Bridge Driver ($Revision:
40
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
@@ -47,12 +47,12 @@ static int acpi_pci_root_add (struct acpi_device *device);
...
@@ -47,12 +47,12 @@ static int acpi_pci_root_add (struct acpi_device *device);
static
int
acpi_pci_root_remove
(
struct
acpi_device
*
device
,
int
type
);
static
int
acpi_pci_root_remove
(
struct
acpi_device
*
device
,
int
type
);
static
struct
acpi_driver
acpi_pci_root_driver
=
{
static
struct
acpi_driver
acpi_pci_root_driver
=
{
name:
ACPI_PCI_ROOT_DRIVER_NAME
,
.
name
=
ACPI_PCI_ROOT_DRIVER_NAME
,
class:
ACPI_PCI_ROOT_CLASS
,
.
class
=
ACPI_PCI_ROOT_CLASS
,
ids:
ACPI_PCI_ROOT_HID
,
.
ids
=
ACPI_PCI_ROOT_HID
,
ops:
{
.
ops
=
{
add:
acpi_pci_root_add
,
.
add
=
acpi_pci_root_add
,
remove:
acpi_pci_root_remove
,
.
remove
=
acpi_pci_root_remove
,
},
},
};
};
...
...
drivers/acpi/power.c
View file @
26cffe4a
/*
/*
* acpi_power.c - ACPI Bus Power Management ($Revision: 3
8
$)
* acpi_power.c - ACPI Bus Power Management ($Revision: 3
9
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
@@ -43,12 +43,12 @@ int acpi_power_add (struct acpi_device *device);
...
@@ -43,12 +43,12 @@ int acpi_power_add (struct acpi_device *device);
int
acpi_power_remove
(
struct
acpi_device
*
device
,
int
type
);
int
acpi_power_remove
(
struct
acpi_device
*
device
,
int
type
);
static
struct
acpi_driver
acpi_power_driver
=
{
static
struct
acpi_driver
acpi_power_driver
=
{
name:
ACPI_POWER_DRIVER_NAME
,
.
name
=
ACPI_POWER_DRIVER_NAME
,
class:
ACPI_POWER_CLASS
,
.
class
=
ACPI_POWER_CLASS
,
ids:
ACPI_POWER_HID
,
.
ids
=
ACPI_POWER_HID
,
ops:
{
.
ops
=
{
add:
acpi_power_add
,
.
add
=
acpi_power_add
,
remove:
acpi_power_remove
,
.
remove
=
acpi_power_remove
,
},
},
};
};
...
...
drivers/acpi/processor.c
View file @
26cffe4a
/*
/*
* acpi_processor.c - ACPI Processor Driver ($Revision:
69
$)
* acpi_processor.c - ACPI Processor Driver ($Revision:
71
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
@@ -78,12 +78,12 @@ static int acpi_processor_add (struct acpi_device *device);
...
@@ -78,12 +78,12 @@ static int acpi_processor_add (struct acpi_device *device);
static
int
acpi_processor_remove
(
struct
acpi_device
*
device
,
int
type
);
static
int
acpi_processor_remove
(
struct
acpi_device
*
device
,
int
type
);
static
struct
acpi_driver
acpi_processor_driver
=
{
static
struct
acpi_driver
acpi_processor_driver
=
{
name:
ACPI_PROCESSOR_DRIVER_NAME
,
.
name
=
ACPI_PROCESSOR_DRIVER_NAME
,
class:
ACPI_PROCESSOR_CLASS
,
.
class
=
ACPI_PROCESSOR_CLASS
,
ids:
ACPI_PROCESSOR_HID
,
.
ids
=
ACPI_PROCESSOR_HID
,
ops:
{
.
ops
=
{
add:
acpi_processor_add
,
.
add
=
acpi_processor_add
,
remove:
acpi_processor_remove
,
.
remove
=
acpi_processor_remove
,
},
},
};
};
...
...
drivers/acpi/resources/rsio.c
View file @
26cffe4a
/*******************************************************************************
/*******************************************************************************
*
*
* Module Name: rsio - IO and DMA resource descriptors
* Module Name: rsio - IO and DMA resource descriptors
* $Revision: 2
1
$
* $Revision: 2
2
$
*
*
******************************************************************************/
******************************************************************************/
...
@@ -399,7 +399,7 @@ acpi_rs_dma_resource (
...
@@ -399,7 +399,7 @@ acpi_rs_dma_resource (
buffer
+=
1
;
buffer
+=
1
;
temp8
=
*
buffer
;
temp8
=
*
buffer
;
/* Decode the
IRQ
bits */
/* Decode the
DMA channel
bits */
for
(
i
=
0
,
index
=
0
;
index
<
8
;
index
++
)
{
for
(
i
=
0
,
index
=
0
;
index
<
8
;
index
++
)
{
if
((
temp8
>>
index
)
&
0x01
)
{
if
((
temp8
>>
index
)
&
0x01
)
{
...
@@ -407,19 +407,16 @@ acpi_rs_dma_resource (
...
@@ -407,19 +407,16 @@ acpi_rs_dma_resource (
i
++
;
i
++
;
}
}
}
}
if
(
i
==
0
)
{
/* Zero channels is invalid! */
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Found Zero DMA channels in resource list
\n
"
));
return_ACPI_STATUS
(
AE_BAD_DATA
);
}
output_struct
->
data
.
dma
.
number_of_channels
=
i
;
/* Zero DMA channels is valid */
output_struct
->
data
.
dma
.
number_of_channels
=
i
;
if
(
i
>
0
)
{
/*
/*
* Calculate the structure size based upon the number of interrupts
* Calculate the structure size based upon the number of interrupts
*/
*/
struct_size
+=
((
ACPI_SIZE
)
output_struct
->
data
.
dma
.
number_of_channels
-
1
)
*
4
;
struct_size
+=
((
ACPI_SIZE
)
i
-
1
)
*
4
;
}
/*
/*
* Point to Byte 2
* Point to Byte 2
...
...
drivers/acpi/resources/rsirq.c
View file @
26cffe4a
/*******************************************************************************
/*******************************************************************************
*
*
* Module Name: rsirq - IRQ resource descriptors
* Module Name: rsirq - IRQ resource descriptors
* $Revision:
29
$
* $Revision:
30
$
*
*
******************************************************************************/
******************************************************************************/
...
@@ -96,18 +96,15 @@ acpi_rs_irq_resource (
...
@@ -96,18 +96,15 @@ acpi_rs_irq_resource (
}
}
}
}
if
(
i
==
0
)
{
/* Zero interrupts is valid */
/* Zero interrupts is invalid! */
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Found Zero interrupt levels in resource list
\n
"
));
return_ACPI_STATUS
(
AE_BAD_DATA
);
}
output_struct
->
data
.
irq
.
number_of_interrupts
=
i
;
output_struct
->
data
.
irq
.
number_of_interrupts
=
i
;
if
(
i
>
0
)
{
/*
/*
* Calculate the structure size based upon the number of interrupts
* Calculate the structure size based upon the number of interrupts
*/
*/
struct_size
+=
((
ACPI_SIZE
)
output_struct
->
data
.
irq
.
number_of_interrupts
-
1
)
*
4
;
struct_size
+=
((
ACPI_SIZE
)
i
-
1
)
*
4
;
}
/*
/*
* Point to Byte 3 if it is used
* Point to Byte 3 if it is used
...
...
drivers/acpi/system.c
View file @
26cffe4a
/*
/*
* acpi_system.c - ACPI System Driver ($Revision: 6
0
$)
* acpi_system.c - ACPI System Driver ($Revision: 6
3
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
@@ -63,12 +63,12 @@ static int acpi_system_add (struct acpi_device *device);
...
@@ -63,12 +63,12 @@ static int acpi_system_add (struct acpi_device *device);
static
int
acpi_system_remove
(
struct
acpi_device
*
device
,
int
type
);
static
int
acpi_system_remove
(
struct
acpi_device
*
device
,
int
type
);
static
struct
acpi_driver
acpi_system_driver
=
{
static
struct
acpi_driver
acpi_system_driver
=
{
name:
ACPI_SYSTEM_DRIVER_NAME
,
.
name
=
ACPI_SYSTEM_DRIVER_NAME
,
class:
ACPI_SYSTEM_CLASS
,
.
class
=
ACPI_SYSTEM_CLASS
,
ids:
ACPI_SYSTEM_HID
,
.
ids
=
ACPI_SYSTEM_HID
,
ops:
{
.
ops
=
{
add:
acpi_system_add
,
.
add
=
acpi_system_add
,
remove:
acpi_system_remove
.
remove
=
acpi_system_remove
},
},
};
};
...
@@ -383,10 +383,10 @@ static unsigned int acpi_system_poll_event(struct file *file, poll_table *wait);
...
@@ -383,10 +383,10 @@ static unsigned int acpi_system_poll_event(struct file *file, poll_table *wait);
static
struct
file_operations
acpi_system_event_ops
=
{
static
struct
file_operations
acpi_system_event_ops
=
{
open:
acpi_system_open_event
,
.
open
=
acpi_system_open_event
,
read:
acpi_system_read_event
,
.
read
=
acpi_system_read_event
,
release:
acpi_system_close_event
,
.
release
=
acpi_system_close_event
,
poll:
acpi_system_poll_event
,
.
poll
=
acpi_system_poll_event
,
};
};
static
int
static
int
...
@@ -479,7 +479,7 @@ acpi_system_poll_event(
...
@@ -479,7 +479,7 @@ acpi_system_poll_event(
static
ssize_t
acpi_system_read_dsdt
(
struct
file
*
,
char
*
,
size_t
,
loff_t
*
);
static
ssize_t
acpi_system_read_dsdt
(
struct
file
*
,
char
*
,
size_t
,
loff_t
*
);
static
struct
file_operations
acpi_system_dsdt_ops
=
{
static
struct
file_operations
acpi_system_dsdt_ops
=
{
read:
acpi_system_read_dsdt
,
.
read
=
acpi_system_read_dsdt
,
};
};
static
ssize_t
static
ssize_t
...
@@ -522,7 +522,7 @@ acpi_system_read_dsdt (
...
@@ -522,7 +522,7 @@ acpi_system_read_dsdt (
static
ssize_t
acpi_system_read_fadt
(
struct
file
*
,
char
*
,
size_t
,
loff_t
*
);
static
ssize_t
acpi_system_read_fadt
(
struct
file
*
,
char
*
,
size_t
,
loff_t
*
);
static
struct
file_operations
acpi_system_fadt_ops
=
{
static
struct
file_operations
acpi_system_fadt_ops
=
{
read:
acpi_system_read_fadt
,
.
read
=
acpi_system_read_fadt
,
};
};
static
ssize_t
static
ssize_t
...
@@ -1171,9 +1171,9 @@ static void acpi_sysrq_power_off(int key, struct pt_regs *pt_regs,
...
@@ -1171,9 +1171,9 @@ static void acpi_sysrq_power_off(int key, struct pt_regs *pt_regs,
}
}
struct
sysrq_key_op
sysrq_acpi_poweroff_op
=
{
struct
sysrq_key_op
sysrq_acpi_poweroff_op
=
{
handler:
&
acpi_sysrq_power_off
,
.
handler
=
&
acpi_sysrq_power_off
,
help_msg:
"Off"
,
.
help_msg
=
"Off"
,
action_msg:
"Power Off
\n
"
.
action_msg
=
"Power Off
\n
"
};
};
#endif
/* CONFIG_MAGIC_SYSRQ */
#endif
/* CONFIG_MAGIC_SYSRQ */
...
...
drivers/acpi/tables.c
View file @
26cffe4a
...
@@ -330,6 +330,11 @@ acpi_table_get_sdt (
...
@@ -330,6 +330,11 @@ acpi_table_get_sdt (
return
-
ENODEV
;
return
-
ENODEV
;
}
}
if
(
acpi_table_compute_checksum
(
header
,
header
->
length
))
{
printk
(
KERN_WARNING
PREFIX
"Invalid XSDT checksum
\n
"
);
return
-
ENODEV
;
}
sdt
.
count
=
(
header
->
length
-
sizeof
(
struct
acpi_table_header
))
>>
3
;
sdt
.
count
=
(
header
->
length
-
sizeof
(
struct
acpi_table_header
))
>>
3
;
if
(
sdt
.
count
>
ACPI_MAX_TABLES
)
{
if
(
sdt
.
count
>
ACPI_MAX_TABLES
)
{
printk
(
KERN_WARNING
PREFIX
"Truncated %lu XSDT entries
\n
"
,
printk
(
KERN_WARNING
PREFIX
"Truncated %lu XSDT entries
\n
"
,
...
@@ -370,6 +375,11 @@ acpi_table_get_sdt (
...
@@ -370,6 +375,11 @@ acpi_table_get_sdt (
return
-
ENODEV
;
return
-
ENODEV
;
}
}
if
(
acpi_table_compute_checksum
(
header
,
header
->
length
))
{
printk
(
KERN_WARNING
PREFIX
"Invalid RSDT checksum
\n
"
);
return
-
ENODEV
;
}
sdt
.
count
=
(
header
->
length
-
sizeof
(
struct
acpi_table_header
))
>>
2
;
sdt
.
count
=
(
header
->
length
-
sizeof
(
struct
acpi_table_header
))
>>
2
;
if
(
sdt
.
count
>
ACPI_MAX_TABLES
)
{
if
(
sdt
.
count
>
ACPI_MAX_TABLES
)
{
printk
(
KERN_WARNING
PREFIX
"Truncated %lu RSDT entries
\n
"
,
printk
(
KERN_WARNING
PREFIX
"Truncated %lu RSDT entries
\n
"
,
...
...
drivers/acpi/tables/tbrsdt.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: tbrsdt - ACPI RSDT table utilities
* Module Name: tbrsdt - ACPI RSDT table utilities
* $Revision:
1
$
* $Revision:
2
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -271,12 +271,6 @@ acpi_tb_get_table_rsdt (
...
@@ -271,12 +271,6 @@ acpi_tb_get_table_rsdt (
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
/*
* Valid RSDT signature, verify the checksum. If it fails, just
* print a warning and ignore it.
*/
status
=
acpi_tb_verify_table_checksum
(
table_info
.
pointer
);
/* Get the number of tables defined in the RSDT or XSDT */
/* Get the number of tables defined in the RSDT or XSDT */
acpi_gbl_rsdt_table_count
=
acpi_tb_get_table_count
(
acpi_gbl_RSDP
,
table_info
.
pointer
);
acpi_gbl_rsdt_table_count
=
acpi_tb_get_table_count
(
acpi_gbl_RSDP
,
table_info
.
pointer
);
...
...
drivers/acpi/thermal.c
View file @
26cffe4a
/*
/*
* acpi_thermal.c - ACPI Thermal Zone Driver ($Revision: 4
0
$)
* acpi_thermal.c - ACPI Thermal Zone Driver ($Revision: 4
1
$)
*
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
@@ -65,12 +65,12 @@ static int acpi_thermal_add (struct acpi_device *device);
...
@@ -65,12 +65,12 @@ static int acpi_thermal_add (struct acpi_device *device);
static
int
acpi_thermal_remove
(
struct
acpi_device
*
device
,
int
type
);
static
int
acpi_thermal_remove
(
struct
acpi_device
*
device
,
int
type
);
static
struct
acpi_driver
acpi_thermal_driver
=
{
static
struct
acpi_driver
acpi_thermal_driver
=
{
name:
ACPI_THERMAL_DRIVER_NAME
,
.
name
=
ACPI_THERMAL_DRIVER_NAME
,
class:
ACPI_THERMAL_CLASS
,
.
class
=
ACPI_THERMAL_CLASS
,
ids:
ACPI_THERMAL_HID
,
.
ids
=
ACPI_THERMAL_HID
,
ops:
{
.
ops
=
{
add:
acpi_thermal_add
,
.
add
=
acpi_thermal_add
,
remove:
acpi_thermal_remove
,
.
remove
=
acpi_thermal_remove
,
},
},
};
};
...
...
drivers/acpi/utilities/utglobal.c
View file @
26cffe4a
/******************************************************************************
/******************************************************************************
*
*
* Module Name: utglobal - Global variables for the ACPI subsystem
* Module Name: utglobal - Global variables for the ACPI subsystem
* $Revision: 16
4
$
* $Revision: 16
5
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "acpi.h"
#include "acpi.h"
#include "acnamesp.h"
#include "acnamesp.h"
#include "amlcode.h"
#define _COMPONENT ACPI_UTILITIES
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME
(
"utglobal"
)
ACPI_MODULE_NAME
(
"utglobal"
)
...
@@ -357,15 +358,15 @@ acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
...
@@ -357,15 +358,15 @@ acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
/* Region type decoding */
/* Region type decoding */
static
const
NATIVE_CHAR
*
acpi_gbl_region_types
[
ACPI_NUM_PREDEFINED_REGIONS
]
=
const
NATIVE_CHAR
*
acpi_gbl_region_types
[
ACPI_NUM_PREDEFINED_REGIONS
]
=
{
{
"System_memory"
,
"System_memory"
,
"System_iO"
,
"System_iO"
,
"PCIConfig"
,
"PCI
_
Config"
,
"Embedded_control"
,
"Embedded_control"
,
"SMBus"
,
"SMBus"
,
"CMOS"
,
"CMOS"
,
"PCIB
ar_t
arget"
,
"PCIB
ART
arget"
,
"Data_table"
,
"Data_table"
,
};
};
...
@@ -555,55 +556,6 @@ acpi_ut_get_mutex_name (
...
@@ -555,55 +556,6 @@ acpi_ut_get_mutex_name (
}
}
/* Various strings for future use */
#if 0
#include "amlcode.h"
/* Data used in keeping track of fields */
static const NATIVE_CHAR *acpi_gbl_FEnames[NUM_FIELD_NAMES] =
{
"skip",
"?access?"
}; /* FE = Field Element */
static const NATIVE_CHAR *acpi_gbl_match_ops[NUM_MATCH_OPS] =
{
"Error",
"MTR",
"MEQ",
"MLE",
"MLT",
"MGE",
"MGT"
};
/* Access type decoding */
static const NATIVE_CHAR *acpi_gbl_access_types[NUM_ACCESS_TYPES] =
{
"Any_acc",
"Byte_acc",
"Word_acc",
"DWord_acc",
"QWord_acc",
"Buffer_acc",
};
/* Update rule decoding */
static const NATIVE_CHAR *acpi_gbl_update_rules[NUM_UPDATE_RULES] =
{
"Preserve",
"Write_as_ones",
"Write_as_zeros"
};
#endif /* Future use */
#endif
#endif
...
...
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