diff options
author | Lin Ming <ming.m.lin@intel.com> | 2008-04-10 11:06:41 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-22 14:29:28 -0400 |
commit | ef805d956320ffa36d068673d5c5eb2a7d13209b (patch) | |
tree | efc621915bc0909d99f523551c062390cc3afa0b /drivers/acpi/parser | |
parent | 57345ee6b807d32e5eecf724a463378b80cc261c (diff) |
ACPICA: Implemented full argument resolution support for the BankValue argument to BankField
Previously, only constants were supported, now any TermArg may
be used.
http://www.acpica.org/bugzilla/show_bug.cgi?id=387
http://www.acpica.org/bugzilla/show_bug.cgi?id=393
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/parser')
-rw-r--r-- | drivers/acpi/parser/psloop.c | 19 | ||||
-rw-r--r-- | drivers/acpi/parser/psopcode.c | 5 | ||||
-rw-r--r-- | drivers/acpi/parser/psparse.c | 2 |
3 files changed, 24 insertions, 2 deletions
diff --git a/drivers/acpi/parser/psloop.c b/drivers/acpi/parser/psloop.c index a079975f671f..a7c768860648 100644 --- a/drivers/acpi/parser/psloop.c +++ b/drivers/acpi/parser/psloop.c | |||
@@ -325,6 +325,15 @@ acpi_ps_create_op(struct acpi_walk_state *walk_state, | |||
325 | op->named.length = 0; | 325 | op->named.length = 0; |
326 | } | 326 | } |
327 | 327 | ||
328 | if (walk_state->opcode == AML_BANK_FIELD_OP) { | ||
329 | /* | ||
330 | * Backup to beginning of bank_field declaration | ||
331 | * body_length is unknown until we parse the body | ||
332 | */ | ||
333 | op->named.data = aml_op_start; | ||
334 | op->named.length = 0; | ||
335 | } | ||
336 | |||
328 | parent_scope = acpi_ps_get_parent_scope(&(walk_state->parser_state)); | 337 | parent_scope = acpi_ps_get_parent_scope(&(walk_state->parser_state)); |
329 | acpi_ps_append_arg(parent_scope, op); | 338 | acpi_ps_append_arg(parent_scope, op); |
330 | 339 | ||
@@ -1040,6 +1049,16 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
1040 | (u32) (parser_state->aml - op->named.data); | 1049 | (u32) (parser_state->aml - op->named.data); |
1041 | } | 1050 | } |
1042 | 1051 | ||
1052 | if (op->common.aml_opcode == AML_BANK_FIELD_OP) { | ||
1053 | /* | ||
1054 | * Backup to beginning of bank_field declaration | ||
1055 | * | ||
1056 | * body_length is unknown until we parse the body | ||
1057 | */ | ||
1058 | op->named.length = | ||
1059 | (u32) (parser_state->aml - op->named.data); | ||
1060 | } | ||
1061 | |||
1043 | /* This op complete, notify the dispatcher */ | 1062 | /* This op complete, notify the dispatcher */ |
1044 | 1063 | ||
1045 | if (walk_state->ascending_callback != NULL) { | 1064 | if (walk_state->ascending_callback != NULL) { |
diff --git a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c index b273a0a127e6..18ed59dd2a6e 100644 --- a/drivers/acpi/parser/psopcode.c +++ b/drivers/acpi/parser/psopcode.c | |||
@@ -520,9 +520,10 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = { | |||
520 | AML_TYPE_NAMED_FIELD, | 520 | AML_TYPE_NAMED_FIELD, |
521 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD), | 521 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD), |
522 | /* 5F */ ACPI_OP("BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP, | 522 | /* 5F */ ACPI_OP("BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP, |
523 | ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, | 523 | ACPI_TYPE_LOCAL_BANK_FIELD, AML_CLASS_NAMED_OBJECT, |
524 | AML_TYPE_NAMED_FIELD, | 524 | AML_TYPE_NAMED_FIELD, |
525 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD), | 525 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD | |
526 | AML_DEFER), | ||
526 | 527 | ||
527 | /* Internal opcodes that map to invalid AML opcodes */ | 528 | /* Internal opcodes that map to invalid AML opcodes */ |
528 | 529 | ||
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index 1442e55c40d1..a8995ca52ee7 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c | |||
@@ -205,6 +205,8 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state, | |||
205 | || (op->common.parent->common.aml_opcode == | 205 | || (op->common.parent->common.aml_opcode == |
206 | AML_PACKAGE_OP) | 206 | AML_PACKAGE_OP) |
207 | || (op->common.parent->common.aml_opcode == | 207 | || (op->common.parent->common.aml_opcode == |
208 | AML_BANK_FIELD_OP) | ||
209 | || (op->common.parent->common.aml_opcode == | ||
208 | AML_VAR_PACKAGE_OP)) { | 210 | AML_VAR_PACKAGE_OP)) { |
209 | replacement_op = | 211 | replacement_op = |
210 | acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP); | 212 | acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP); |