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
68443ffe
Commit
68443ffe
authored
Nov 10, 2002
by
Andy Grover
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACPI: Interpreter update to 20021111 - Adds support for SMBus OpRegions
parent
d4eb4155
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
208 additions
and
73 deletions
+208
-73
drivers/acpi/events/evevent.c
drivers/acpi/events/evevent.c
+4
-4
drivers/acpi/executer/exdump.c
drivers/acpi/executer/exdump.c
+2
-1
drivers/acpi/executer/exfield.c
drivers/acpi/executer/exfield.c
+111
-13
drivers/acpi/executer/exfldio.c
drivers/acpi/executer/exfldio.c
+25
-12
drivers/acpi/executer/exoparg1.c
drivers/acpi/executer/exoparg1.c
+14
-10
drivers/acpi/executer/exoparg2.c
drivers/acpi/executer/exoparg2.c
+4
-2
drivers/acpi/executer/exoparg3.c
drivers/acpi/executer/exoparg3.c
+4
-2
drivers/acpi/executer/exprep.c
drivers/acpi/executer/exprep.c
+7
-11
drivers/acpi/executer/exstore.c
drivers/acpi/executer/exstore.c
+3
-3
drivers/acpi/include/acconfig.h
drivers/acpi/include/acconfig.h
+6
-2
drivers/acpi/include/acdisasm.h
drivers/acpi/include/acdisasm.h
+4
-1
drivers/acpi/include/acinterp.h
drivers/acpi/include/acinterp.h
+3
-2
drivers/acpi/include/actypes.h
drivers/acpi/include/actypes.h
+2
-1
drivers/acpi/include/amlcode.h
drivers/acpi/include/amlcode.h
+3
-2
drivers/acpi/namespace/nsdump.c
drivers/acpi/namespace/nsdump.c
+2
-2
drivers/acpi/namespace/nsutils.c
drivers/acpi/namespace/nsutils.c
+7
-3
drivers/acpi/tables/tbxfroot.c
drivers/acpi/tables/tbxfroot.c
+7
-2
No files found.
drivers/acpi/events/evevent.c
View file @
68443ffe
/******************************************************************************
/******************************************************************************
*
*
* Module Name: evevent - Fixed and General Purpose Even handling and dispatch
* Module Name: evevent - Fixed and General Purpose Even handling and dispatch
* $Revision: 9
5
$
* $Revision: 9
6
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -503,9 +503,9 @@ acpi_ev_gpe_initialize (void)
...
@@ -503,9 +503,9 @@ acpi_ev_gpe_initialize (void)
ACPI_REPORT_INFO
((
"GPE Block%d defined as GPE%d to GPE%d
\n
"
,
ACPI_REPORT_INFO
((
"GPE Block%d defined as GPE%d to GPE%d
\n
"
,
(
s32
)
gpe_block
,
(
s32
)
gpe_block
,
acpi_gbl_gpe_block_info
[
gpe_block
].
block_base_number
,
(
u32
)
acpi_gbl_gpe_block_info
[
gpe_block
].
block_base_number
,
acpi_gbl_gpe_block_info
[
gpe_block
].
block_base_number
+
(
u32
)
(
acpi_gbl_gpe_block_info
[
gpe_block
].
block_base_number
+
((
acpi_gbl_gpe_block_info
[
gpe_block
].
register_count
*
8
)
-
1
)));
((
acpi_gbl_gpe_block_info
[
gpe_block
].
register_count
*
8
)
-
1
)))
)
;
}
}
}
}
...
...
drivers/acpi/executer/exdump.c
View file @
68443ffe
/******************************************************************************
/******************************************************************************
*
*
* Module Name: exdump - Interpreter debug output routines
* Module Name: exdump - Interpreter debug output routines
* $Revision: 16
2
$
* $Revision: 16
3
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -590,6 +590,7 @@ acpi_ex_dump_object_descriptor (
...
@@ -590,6 +590,7 @@ acpi_ex_dump_object_descriptor (
acpi_ex_out_integer
(
"Length"
,
obj_desc
->
buffer
.
length
);
acpi_ex_out_integer
(
"Length"
,
obj_desc
->
buffer
.
length
);
acpi_ex_out_pointer
(
"Pointer"
,
obj_desc
->
buffer
.
pointer
);
acpi_ex_out_pointer
(
"Pointer"
,
obj_desc
->
buffer
.
pointer
);
ACPI_DUMP_BUFFER
(
obj_desc
->
buffer
.
pointer
,
obj_desc
->
buffer
.
length
);
break
;
break
;
...
...
drivers/acpi/executer/exfield.c
View file @
68443ffe
/******************************************************************************
/******************************************************************************
*
*
* Module Name: exfield - ACPI AML (p-code) execution - field manipulation
* Module Name: exfield - ACPI AML (p-code) execution - field manipulation
* $Revision: 11
2
$
* $Revision: 11
3
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
#include "acpi.h"
#include "acpi.h"
#include "acdispat.h"
#include "acdispat.h"
#include "acinterp.h"
#include "acinterp.h"
#include "acevents.h"
#include "amlcode.h"
#define _COMPONENT ACPI_EXECUTER
#define _COMPONENT ACPI_EXECUTER
...
@@ -82,6 +84,45 @@ acpi_ex_read_data_from_field (
...
@@ -82,6 +84,45 @@ acpi_ex_read_data_from_field (
}
}
}
}
}
}
else
if
((
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_LOCAL_REGION_FIELD
)
&&
(
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
ACPI_ADR_SPACE_SMBUS
))
{
/*
* This is an SMBus read. We must create a buffer to hold the data
* and directly access the region handler.
*/
buffer_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_BUFFER
);
if
(
!
buffer_desc
)
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
/* Create the actual read buffer */
buffer_desc
->
buffer
.
pointer
=
ACPI_MEM_CALLOCATE
(
ACPI_SMBUS_BUFFER_SIZE
);
if
(
!
buffer_desc
->
buffer
.
pointer
)
{
acpi_ut_remove_reference
(
buffer_desc
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
/* Complete the buffer object initialization */
buffer_desc
->
common
.
flags
=
AOPOBJ_DATA_VALID
;
buffer_desc
->
buffer
.
length
=
ACPI_SMBUS_BUFFER_SIZE
;
buffer
=
buffer_desc
->
buffer
.
pointer
;
/* Lock entire transaction if requested */
locked
=
acpi_ex_acquire_global_lock
(
obj_desc
->
common_field
.
field_flags
);
/*
* Perform the read.
* Note: Smbus protocol value is passed in upper 16-bits of Function
*/
status
=
acpi_ex_access_region
(
obj_desc
,
0
,
(
acpi_integer
*
)
buffer_desc
->
buffer
.
pointer
,
ACPI_READ
|
(
obj_desc
->
field
.
attribute
<<
16
));
acpi_ex_release_global_lock
(
locked
);
goto
exit
;
}
/*
/*
* Allocate a buffer for the contents of the field.
* Allocate a buffer for the contents of the field.
...
@@ -138,17 +179,17 @@ acpi_ex_read_data_from_field (
...
@@ -138,17 +179,17 @@ acpi_ex_read_data_from_field (
obj_desc
->
common_field
.
start_field_bit_offset
,
obj_desc
->
common_field
.
start_field_bit_offset
,
obj_desc
->
common_field
.
base_byte_offset
));
obj_desc
->
common_field
.
base_byte_offset
));
/* Lock entire transaction if requested */
locked
=
acpi_ex_acquire_global_lock
(
obj_desc
->
common_field
.
field_flags
);
locked
=
acpi_ex_acquire_global_lock
(
obj_desc
->
common_field
.
field_flags
);
/* Read from the field */
/* Read from the field */
status
=
acpi_ex_extract_from_field
(
obj_desc
,
buffer
,
length
);
status
=
acpi_ex_extract_from_field
(
obj_desc
,
buffer
,
length
);
/*
* Release global lock if we acquired it earlier
*/
acpi_ex_release_global_lock
(
locked
);
acpi_ex_release_global_lock
(
locked
);
exit:
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
acpi_ut_remove_reference
(
buffer_desc
);
acpi_ut_remove_reference
(
buffer_desc
);
}
}
...
@@ -176,7 +217,8 @@ acpi_ex_read_data_from_field (
...
@@ -176,7 +217,8 @@ acpi_ex_read_data_from_field (
acpi_status
acpi_status
acpi_ex_write_data_to_field
(
acpi_ex_write_data_to_field
(
acpi_operand_object
*
source_desc
,
acpi_operand_object
*
source_desc
,
acpi_operand_object
*
obj_desc
)
acpi_operand_object
*
obj_desc
,
acpi_operand_object
**
result_desc
)
{
{
acpi_status
status
;
acpi_status
status
;
u32
length
;
u32
length
;
...
@@ -184,6 +226,7 @@ acpi_ex_write_data_to_field (
...
@@ -184,6 +226,7 @@ acpi_ex_write_data_to_field (
void
*
buffer
;
void
*
buffer
;
void
*
new_buffer
;
void
*
new_buffer
;
u8
locked
;
u8
locked
;
acpi_operand_object
*
buffer_desc
;
ACPI_FUNCTION_TRACE_PTR
(
"Ex_write_data_to_field"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
"Ex_write_data_to_field"
,
obj_desc
);
...
@@ -207,6 +250,64 @@ acpi_ex_write_data_to_field (
...
@@ -207,6 +250,64 @@ acpi_ex_write_data_to_field (
}
}
}
}
}
}
else
if
((
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_LOCAL_REGION_FIELD
)
&&
(
obj_desc
->
field
.
region_obj
->
region
.
space_id
==
ACPI_ADR_SPACE_SMBUS
))
{
/*
* This is an SMBus write. We will bypass the entire field mechanism
* and handoff the buffer directly to the handler.
*
* Source must be a buffer of sufficient size (ACPI_SMBUS_BUFFER_SIZE).
*/
if
(
ACPI_GET_OBJECT_TYPE
(
source_desc
)
!=
ACPI_TYPE_BUFFER
)
{
ACPI_REPORT_ERROR
((
"SMBus write requires Buffer, found type %s
\n
"
,
acpi_ut_get_object_type_name
(
source_desc
)));
return_ACPI_STATUS
(
AE_AML_OPERAND_TYPE
);
}
if
(
source_desc
->
buffer
.
length
<
ACPI_SMBUS_BUFFER_SIZE
)
{
ACPI_REPORT_ERROR
((
"SMBus write requires Buffer of length %X, found length %X
\n
"
,
ACPI_SMBUS_BUFFER_SIZE
,
source_desc
->
buffer
.
length
));
return_ACPI_STATUS
(
AE_AML_BUFFER_LIMIT
);
}
buffer_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_BUFFER
);
if
(
!
buffer_desc
)
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
/* Create the actual read buffer */
buffer_desc
->
buffer
.
pointer
=
ACPI_MEM_CALLOCATE
(
ACPI_SMBUS_BUFFER_SIZE
);
if
(
!
buffer_desc
->
buffer
.
pointer
)
{
acpi_ut_remove_reference
(
buffer_desc
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
/* Complete the buffer object initialization */
buffer_desc
->
common
.
flags
=
AOPOBJ_DATA_VALID
;
buffer_desc
->
buffer
.
length
=
ACPI_SMBUS_BUFFER_SIZE
;
buffer
=
buffer_desc
->
buffer
.
pointer
;
ACPI_MEMCPY
(
buffer
,
source_desc
->
buffer
.
pointer
,
ACPI_SMBUS_BUFFER_SIZE
);
/* Lock entire transaction if requested */
locked
=
acpi_ex_acquire_global_lock
(
obj_desc
->
common_field
.
field_flags
);
/*
* Perform the write (returns status and perhaps data in the same buffer)
* Note: SMBus protocol type is passed in upper 16-bits of Function.
*/
status
=
acpi_ex_access_region
(
obj_desc
,
0
,
(
acpi_integer
*
)
buffer
,
ACPI_WRITE
|
(
obj_desc
->
field
.
attribute
<<
16
));
acpi_ex_release_global_lock
(
locked
);
*
result_desc
=
buffer_desc
;
return_ACPI_STATUS
(
status
);
}
/*
/*
* Get a pointer to the data to be written
* Get a pointer to the data to be written
...
@@ -267,16 +368,13 @@ acpi_ex_write_data_to_field (
...
@@ -267,16 +368,13 @@ acpi_ex_write_data_to_field (
obj_desc
->
common_field
.
start_field_bit_offset
,
obj_desc
->
common_field
.
start_field_bit_offset
,
obj_desc
->
common_field
.
base_byte_offset
));
obj_desc
->
common_field
.
base_byte_offset
));
/* Lock entire transaction if requested */
locked
=
acpi_ex_acquire_global_lock
(
obj_desc
->
common_field
.
field_flags
);
locked
=
acpi_ex_acquire_global_lock
(
obj_desc
->
common_field
.
field_flags
);
/*
/* Write to the field */
* Write to the field
*/
status
=
acpi_ex_insert_into_field
(
obj_desc
,
buffer
,
length
);
/*
status
=
acpi_ex_insert_into_field
(
obj_desc
,
buffer
,
length
);
* Release global lock if we acquired it earlier
*/
acpi_ex_release_global_lock
(
locked
);
acpi_ex_release_global_lock
(
locked
);
/* Free temporary buffer if we used one */
/* Free temporary buffer if we used one */
...
...
drivers/acpi/executer/exfldio.c
View file @
68443ffe
/******************************************************************************
/******************************************************************************
*
*
* Module Name: exfldio - Aml Field I/O
* Module Name: exfldio - Aml Field I/O
* $Revision:
89
$
* $Revision:
90
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -64,6 +64,8 @@ acpi_ex_setup_region (
...
@@ -64,6 +64,8 @@ acpi_ex_setup_region (
rgn_desc
=
obj_desc
->
common_field
.
region_obj
;
rgn_desc
=
obj_desc
->
common_field
.
region_obj
;
/* We must have a valid region */
if
(
ACPI_GET_OBJECT_TYPE
(
rgn_desc
)
!=
ACPI_TYPE_REGION
)
{
if
(
ACPI_GET_OBJECT_TYPE
(
rgn_desc
)
!=
ACPI_TYPE_REGION
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Needed Region, found type %X (%s)
\n
"
,
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Needed Region, found type %X (%s)
\n
"
,
ACPI_GET_OBJECT_TYPE
(
rgn_desc
),
ACPI_GET_OBJECT_TYPE
(
rgn_desc
),
...
@@ -83,6 +85,12 @@ acpi_ex_setup_region (
...
@@ -83,6 +85,12 @@ acpi_ex_setup_region (
}
}
}
}
if
(
rgn_desc
->
region
.
space_id
==
ACPI_ADR_SPACE_SMBUS
)
{
/* SMBus has a non-linear address space */
return_ACPI_STATUS
(
AE_OK
);
}
/*
/*
* Validate the request. The entire request from the byte offset for a
* Validate the request. The entire request from the byte offset for a
* length of one field datum (access width) must fit within the region.
* length of one field datum (access width) must fit within the region.
...
@@ -127,8 +135,10 @@ acpi_ex_setup_region (
...
@@ -127,8 +135,10 @@ acpi_ex_setup_region (
* PARAMETERS: *Obj_desc - Field to be read
* PARAMETERS: *Obj_desc - Field to be read
* Field_datum_byte_offset - Byte offset of this datum within the
* Field_datum_byte_offset - Byte offset of this datum within the
* parent field
* parent field
* *Value - Where to store value (must be 32 bits)
* *Value - Where to store value (must at least
* Read_write - Read or Write flag
* the size of acpi_integer)
* Function - Read or Write flag plus other region-
* dependent flags
*
*
* RETURN: Status
* RETURN: Status
*
*
...
@@ -141,7 +151,7 @@ acpi_ex_access_region (
...
@@ -141,7 +151,7 @@ acpi_ex_access_region (
acpi_operand_object
*
obj_desc
,
acpi_operand_object
*
obj_desc
,
u32
field_datum_byte_offset
,
u32
field_datum_byte_offset
,
acpi_integer
*
value
,
acpi_integer
*
value
,
u32
read_write
)
u32
function
)
{
{
acpi_status
status
;
acpi_status
status
;
acpi_operand_object
*
rgn_desc
;
acpi_operand_object
*
rgn_desc
;
...
@@ -151,6 +161,15 @@ acpi_ex_access_region (
...
@@ -151,6 +161,15 @@ acpi_ex_access_region (
ACPI_FUNCTION_TRACE
(
"Ex_access_region"
);
ACPI_FUNCTION_TRACE
(
"Ex_access_region"
);
/*
* Ensure that the region operands are fully evaluated and verify
* the validity of the request
*/
status
=
acpi_ex_setup_region
(
obj_desc
,
field_datum_byte_offset
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
/*
/*
* The physical address of this field datum is:
* The physical address of this field datum is:
*
*
...
@@ -163,7 +182,7 @@ acpi_ex_access_region (
...
@@ -163,7 +182,7 @@ acpi_ex_access_region (
+
obj_desc
->
common_field
.
base_byte_offset
+
obj_desc
->
common_field
.
base_byte_offset
+
field_datum_byte_offset
;
+
field_datum_byte_offset
;
if
(
read_write
==
ACPI_READ
)
{
if
(
(
function
&
ACPI_IO_MASK
)
==
ACPI_READ
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
"[READ]"
));
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
"[READ]"
));
}
}
else
{
else
{
...
@@ -181,7 +200,7 @@ acpi_ex_access_region (
...
@@ -181,7 +200,7 @@ acpi_ex_access_region (
/* Invoke the appropriate Address_space/Op_region handler */
/* Invoke the appropriate Address_space/Op_region handler */
status
=
acpi_ev_address_space_dispatch
(
rgn_desc
,
read_write
,
status
=
acpi_ev_address_space_dispatch
(
rgn_desc
,
function
,
address
,
ACPI_MUL_8
(
obj_desc
->
common_field
.
access_byte_width
),
value
);
address
,
ACPI_MUL_8
(
obj_desc
->
common_field
.
access_byte_width
),
value
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
...
@@ -191,7 +210,6 @@ acpi_ex_access_region (
...
@@ -191,7 +210,6 @@ acpi_ex_access_region (
acpi_ut_get_region_name
(
rgn_desc
->
region
.
space_id
),
acpi_ut_get_region_name
(
rgn_desc
->
region
.
space_id
),
rgn_desc
->
region
.
space_id
));
rgn_desc
->
region
.
space_id
));
}
}
else
if
(
status
==
AE_NOT_EXIST
)
{
else
if
(
status
==
AE_NOT_EXIST
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Region %s(%X) has no handler
\n
"
,
"Region %s(%X) has no handler
\n
"
,
...
@@ -371,11 +389,6 @@ acpi_ex_field_datum_io (
...
@@ -371,11 +389,6 @@ acpi_ex_field_datum_io (
* For simple Region_fields, we just directly access the owning
* For simple Region_fields, we just directly access the owning
* Operation Region.
* Operation Region.
*/
*/
status
=
acpi_ex_setup_region
(
obj_desc
,
field_datum_byte_offset
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
status
=
acpi_ex_access_region
(
obj_desc
,
field_datum_byte_offset
,
value
,
status
=
acpi_ex_access_region
(
obj_desc
,
field_datum_byte_offset
,
value
,
read_write
);
read_write
);
break
;
break
;
...
...
drivers/acpi/executer/exoparg1.c
View file @
68443ffe
...
@@ -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
4
$
* $Revision: 14
5
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -389,14 +389,16 @@ acpi_ex_opcode_1A_1T_1R (
...
@@ -389,14 +389,16 @@ acpi_ex_opcode_1A_1T_1R (
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
/*
if
(
!
walk_state
->
result_obj
)
{
* Normally, we would remove a reference on the Operand[0] parameter;
/*
* But since it is being used as the internal return object
* Normally, we would remove a reference on the Operand[0] parameter;
* (meaning we would normally increment it), the two cancel out,
* But since it is being used as the internal return object
* and we simply don't do anything.
* (meaning we would normally increment it), the two cancel out,
*/
* and we simply don't do anything.
walk_state
->
result_obj
=
operand
[
0
];
*/
walk_state
->
operands
[
0
]
=
NULL
;
/* Prevent deletion */
walk_state
->
result_obj
=
operand
[
0
];
walk_state
->
operands
[
0
]
=
NULL
;
/* Prevent deletion */
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
...
@@ -461,7 +463,9 @@ acpi_ex_opcode_1A_1T_1R (
...
@@ -461,7 +463,9 @@ acpi_ex_opcode_1A_1T_1R (
cleanup:
cleanup:
walk_state
->
result_obj
=
return_desc
;
if
(
!
walk_state
->
result_obj
)
{
walk_state
->
result_obj
=
return_desc
;
}
/* Delete return object on error */
/* Delete return object on error */
...
...
drivers/acpi/executer/exoparg2.c
View file @
68443ffe
/******************************************************************************
/******************************************************************************
*
*
* Module Name: exoparg2 - AML execution - opcodes with 2 arguments
* Module Name: exoparg2 - AML execution - opcodes with 2 arguments
* $Revision: 11
3
$
* $Revision: 11
4
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -490,7 +490,9 @@ acpi_ex_opcode_2A_1T_1R (
...
@@ -490,7 +490,9 @@ acpi_ex_opcode_2A_1T_1R (
goto
cleanup
;
goto
cleanup
;
}
}
walk_state
->
result_obj
=
return_desc
;
if
(
!
walk_state
->
result_obj
)
{
walk_state
->
result_obj
=
return_desc
;
}
}
}
...
...
drivers/acpi/executer/exoparg3.c
View file @
68443ffe
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
/******************************************************************************
/******************************************************************************
*
*
* Module Name: exoparg3 - AML execution - opcodes with 3 arguments
* Module Name: exoparg3 - AML execution - opcodes with 3 arguments
* $Revision: 1
4
$
* $Revision: 1
5
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -226,7 +226,9 @@ acpi_ex_opcode_3A_1T_1R (
...
@@ -226,7 +226,9 @@ acpi_ex_opcode_3A_1T_1R (
/* Set the return object and exit */
/* Set the return object and exit */
walk_state
->
result_obj
=
return_desc
;
if
(
!
walk_state
->
result_obj
)
{
walk_state
->
result_obj
=
return_desc
;
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
...
drivers/acpi/executer/exprep.c
View file @
68443ffe
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
/******************************************************************************
/******************************************************************************
*
*
* Module Name: exprep - ACPI AML (p-code) execution - field prep utilities
* Module Name: exprep - ACPI AML (p-code) execution - field prep utilities
* $Revision: 12
0
$
* $Revision: 12
1
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -107,28 +107,24 @@ acpi_ex_decode_field_access (
...
@@ -107,28 +107,24 @@ acpi_ex_decode_field_access (
break
;
break
;
case
AML_FIELD_ACCESS_BYTE
:
case
AML_FIELD_ACCESS_BYTE
:
case
AML_FIELD_ACCESS_BUFFER
:
/* ACPI 2.0 (SMBus Buffer) */
byte_alignment
=
1
;
byte_alignment
=
1
;
bit_length
=
8
;
bit_length
=
8
;
break
;
break
;
case
AML_FIELD_ACCESS_WORD
:
case
AML_FIELD_ACCESS_WORD
:
byte_alignment
=
2
;
byte_alignment
=
2
;
bit_length
=
16
;
bit_length
=
16
;
break
;
break
;
case
AML_FIELD_ACCESS_DWORD
:
case
AML_FIELD_ACCESS_DWORD
:
byte_alignment
=
4
;
byte_alignment
=
4
;
bit_length
=
32
;
bit_length
=
32
;
break
;
break
;
case
AML_FIELD_ACCESS_QWORD
:
/* ACPI 2.0 */
case
AML_FIELD_ACCESS_QWORD
:
/* ACPI 2.0 */
byte_alignment
=
8
;
byte_alignment
=
8
;
bit_length
=
64
;
bit_length
=
64
;
break
;
case
AML_FIELD_ACCESS_BUFFER
:
/* ACPI 2.0 */
byte_alignment
=
8
;
bit_length
=
8
;
break
;
break
;
default:
default:
...
...
drivers/acpi/executer/exstore.c
View file @
68443ffe
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
/******************************************************************************
/******************************************************************************
*
*
* Module Name: exstore - AML Interpreter object store support
* Module Name: exstore - AML Interpreter object store support
* $Revision: 17
3
$
* $Revision: 17
4
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -81,7 +81,7 @@ acpi_ex_store (
...
@@ -81,7 +81,7 @@ acpi_ex_store (
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
dest_desc
)
==
ACPI_DESC_TYPE_NAMED
)
{
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
dest_desc
)
==
ACPI_DESC_TYPE_NAMED
)
{
/*
/*
* Dest is a namespace node,
* Dest is a namespace node,
* Storing an object into a Name
"container"
* Storing an object into a Name
d node.
*/
*/
status
=
acpi_ex_store_object_to_node
(
source_desc
,
status
=
acpi_ex_store_object_to_node
(
source_desc
,
(
acpi_namespace_node
*
)
dest_desc
,
walk_state
);
(
acpi_namespace_node
*
)
dest_desc
,
walk_state
);
...
@@ -435,7 +435,7 @@ acpi_ex_store_object_to_node (
...
@@ -435,7 +435,7 @@ acpi_ex_store_object_to_node (
/*
/*
* For fields, copy the source data to the target field.
* For fields, copy the source data to the target field.
*/
*/
status
=
acpi_ex_write_data_to_field
(
source_desc
,
target_desc
);
status
=
acpi_ex_write_data_to_field
(
source_desc
,
target_desc
,
&
walk_state
->
result_obj
);
break
;
break
;
...
...
drivers/acpi/include/acconfig.h
View file @
68443ffe
/******************************************************************************
/******************************************************************************
*
*
* Name: acconfig.h - Global configuration constants
* Name: acconfig.h - Global configuration constants
* $Revision: 11
5
$
* $Revision: 11
7
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
/* Version string */
/* Version string */
#define ACPI_CA_VERSION 0x200211
0
1
#define ACPI_CA_VERSION 0x200211
1
1
/* Version of ACPI supported */
/* Version of ACPI supported */
...
@@ -166,6 +166,10 @@
...
@@ -166,6 +166,10 @@
#define ACPI_RSDP_CHECKSUM_LENGTH 20
#define ACPI_RSDP_CHECKSUM_LENGTH 20
#define ACPI_RSDP_XCHECKSUM_LENGTH 36
#define ACPI_RSDP_XCHECKSUM_LENGTH 36
/* SMBus bidirectional buffer size */
#define ACPI_SMBUS_BUFFER_SIZE 34
/******************************************************************************
/******************************************************************************
*
*
...
...
drivers/acpi/include/acdisasm.h
View file @
68443ffe
/******************************************************************************
/******************************************************************************
*
*
* Name: acdisasm.h - AML disassembler
* Name: acdisasm.h - AML disassembler
* $Revision:
4
$
* $Revision:
5
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -239,6 +239,9 @@ void
...
@@ -239,6 +239,9 @@ void
acpi_dm_bit_list
(
acpi_dm_bit_list
(
u16
mask
);
u16
mask
);
void
acpi_dm_decode_attribute
(
u8
attribute
);
/*
/*
* dmresrcl
* dmresrcl
...
...
drivers/acpi/include/acinterp.h
View file @
68443ffe
/******************************************************************************
/******************************************************************************
*
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
* $Revision: 14
1
$
* $Revision: 14
2
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -164,7 +164,8 @@ acpi_ex_read_data_from_field (
...
@@ -164,7 +164,8 @@ acpi_ex_read_data_from_field (
acpi_status
acpi_status
acpi_ex_write_data_to_field
(
acpi_ex_write_data_to_field
(
acpi_operand_object
*
source_desc
,
acpi_operand_object
*
source_desc
,
acpi_operand_object
*
obj_desc
);
acpi_operand_object
*
obj_desc
,
acpi_operand_object
**
result_desc
);
/*
/*
* exmisc - ACPI AML (p-code) execution - specific opcodes
* exmisc - ACPI AML (p-code) execution - specific opcodes
...
...
drivers/acpi/include/actypes.h
View file @
68443ffe
/******************************************************************************
/******************************************************************************
*
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
* Name: actypes.h - Common data types for the entire ACPI subsystem
* $Revision: 24
0
$
* $Revision: 24
1
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -499,6 +499,7 @@ typedef u32 acpi_object_type;
...
@@ -499,6 +499,7 @@ typedef u32 acpi_object_type;
*/
*/
#define ACPI_READ 0
#define ACPI_READ 0
#define ACPI_WRITE 1
#define ACPI_WRITE 1
#define ACPI_IO_MASK 1
/*
/*
...
...
drivers/acpi/include/amlcode.h
View file @
68443ffe
...
@@ -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: 7
0
$
* $Revision: 7
1
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -462,7 +462,8 @@ typedef enum
...
@@ -462,7 +462,8 @@ typedef enum
AML_FIELD_ATTRIB_SMB_BYTE
=
0x06
,
AML_FIELD_ATTRIB_SMB_BYTE
=
0x06
,
AML_FIELD_ATTRIB_SMB_WORD
=
0x08
,
AML_FIELD_ATTRIB_SMB_WORD
=
0x08
,
AML_FIELD_ATTRIB_SMB_BLOCK
=
0x0A
,
AML_FIELD_ATTRIB_SMB_BLOCK
=
0x0A
,
AML_FIELD_ATTRIB_SMB_CALL
=
0x0E
AML_FIELD_ATTRIB_SMB_WORD_CALL
=
0x0C
,
AML_FIELD_ATTRIB_SMB_BLOCK_CALL
=
0x0D
}
AML_ACCESS_ATTRIBUTE
;
}
AML_ACCESS_ATTRIBUTE
;
...
...
drivers/acpi/namespace/nsdump.c
View file @
68443ffe
/******************************************************************************
/******************************************************************************
*
*
* Module Name: nsdump - table dumping routines for debug
* Module Name: nsdump - table dumping routines for debug
* $Revision: 14
5
$
* $Revision: 14
6
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -180,7 +180,7 @@ acpi_ns_dump_one_object (
...
@@ -180,7 +180,7 @@ acpi_ns_dump_one_object (
/* Indent the object according to the level */
/* Indent the object according to the level */
acpi_os_printf
(
"%2d%*s"
,
level
-
1
,
level
*
2
,
" "
);
acpi_os_printf
(
"%2d%*s"
,
(
u32
)
level
-
1
,
(
int
)
level
*
2
,
" "
);
/* Check the node type and name */
/* Check the node type and name */
...
...
drivers/acpi/namespace/nsutils.c
View file @
68443ffe
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
*
*
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
* parents and siblings and Scope manipulation
* parents and siblings and Scope manipulation
* $Revision: 11
5
$
* $Revision: 11
6
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
*
*
* RETURN: None
* RETURN: None
*
*
* DESCRIPTION: Print warning message
* DESCRIPTION: Print warning message
with full pathname
*
*
******************************************************************************/
******************************************************************************/
...
@@ -61,12 +61,16 @@ acpi_ns_report_error (
...
@@ -61,12 +61,16 @@ acpi_ns_report_error (
char
*
name
;
char
*
name
;
/* Convert path to external format */
status
=
acpi_ns_externalize_name
(
ACPI_UINT32_MAX
,
internal_name
,
NULL
,
&
name
);
status
=
acpi_ns_externalize_name
(
ACPI_UINT32_MAX
,
internal_name
,
NULL
,
&
name
);
acpi_os_printf
(
"%8s-%04d: *** Error: Looking up "
,
acpi_os_printf
(
"%8s-%04d: *** Error: Looking up "
,
module_name
,
line_number
);
module_name
,
line_number
);
if
(
name
)
{
/* Print target name */
if
(
ACPI_SUCCESS
(
status
))
{
acpi_os_printf
(
"[%s]"
,
name
);
acpi_os_printf
(
"[%s]"
,
name
);
}
}
else
{
else
{
...
...
drivers/acpi/tables/tbxfroot.c
View file @
68443ffe
/******************************************************************************
/******************************************************************************
*
*
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
* $Revision: 6
4
$
* $Revision: 6
5
$
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -302,7 +302,8 @@ acpi_find_root_pointer (
...
@@ -302,7 +302,8 @@ acpi_find_root_pointer (
status
=
acpi_tb_find_rsdp
(
&
table_info
,
flags
);
status
=
acpi_tb_find_rsdp
(
&
table_info
,
flags
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"RSDP structure not found
\n
"
));
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"RSDP structure not found, %s Flags=%X
\n
"
,
acpi_format_exception
(
status
),
flags
));
return_ACPI_STATUS
(
AE_NO_ACPI_TABLES
);
return_ACPI_STATUS
(
AE_NO_ACPI_TABLES
);
}
}
...
@@ -406,6 +407,8 @@ acpi_tb_find_rsdp (
...
@@ -406,6 +407,8 @@ acpi_tb_find_rsdp (
status
=
acpi_os_map_memory
((
u64
)
LO_RSDP_WINDOW_BASE
,
LO_RSDP_WINDOW_SIZE
,
status
=
acpi_os_map_memory
((
u64
)
LO_RSDP_WINDOW_BASE
,
LO_RSDP_WINDOW_SIZE
,
(
void
**
)
&
table_ptr
);
(
void
**
)
&
table_ptr
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Could not map memory at %X for length %X
\n
"
,
LO_RSDP_WINDOW_BASE
,
LO_RSDP_WINDOW_SIZE
));
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -428,6 +431,8 @@ acpi_tb_find_rsdp (
...
@@ -428,6 +431,8 @@ acpi_tb_find_rsdp (
status
=
acpi_os_map_memory
((
u64
)
HI_RSDP_WINDOW_BASE
,
HI_RSDP_WINDOW_SIZE
,
status
=
acpi_os_map_memory
((
u64
)
HI_RSDP_WINDOW_BASE
,
HI_RSDP_WINDOW_SIZE
,
(
void
**
)
&
table_ptr
);
(
void
**
)
&
table_ptr
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_ERROR
,
"Could not map memory at %X for length %X
\n
"
,
HI_RSDP_WINDOW_BASE
,
HI_RSDP_WINDOW_SIZE
));
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
...
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