From 25e47ad7a2fc03462f2f9b79c003eb3042e0bed5 Mon Sep 17 00:00:00 2001 From: iwasaki Date: Wed, 20 Sep 2000 01:01:32 +0000 Subject: Improve region I/O sub-routines by re-writing most of low level part of AML interpreter. - Delete and cleanup a lot of almost duplicated code in kernel/userland. - Add new common functions for kernel/userland code. aml_adjust_readvalue(), aml_adjust_updatevalue(), aml_region_handle_alloc(), aml_region_handle_free() and aml_region_io(). - Add primitive functions for both versions of kernel/userland in order to have shared code as much as possible. aml_region_read_simple(), aml_region_write_simple(), aml_region_prompt_read(), aml_region_prompt_write() and aml_region_prompt_update_value(). - Consider update rule and access type in field flags. Also add a lot of definitions for the flags. - Fix bugs on bit manipulation for read/write operations. - Fix bugs on IndexField I/O part. Also add workaround for temporary object corruption during StoreOp interpretation. --- usr.sbin/acpi/amldb/aml/aml_parse.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'usr.sbin/acpi/amldb/aml/aml_parse.c') diff --git a/usr.sbin/acpi/amldb/aml/aml_parse.c b/usr.sbin/acpi/amldb/aml/aml_parse.c index 344eb6c..560c910 100644 --- a/usr.sbin/acpi/amldb/aml/aml_parse.c +++ b/usr.sbin/acpi/amldb/aml/aml_parse.c @@ -1613,6 +1613,16 @@ aml_parse_termobj(struct aml_environ *env, int indent) AML_DEBUGPRINT(", "); destname1 = aml_parse_termobj(env, indent); AML_DEBUGPRINT(")"); + /* XXX + * temporary object may change during aml_store_to_name() + * operation, so we make a copy of it on stack. + */ + if (destname1 == &env->tempname && + destname1->property == &env->tempobject) { + destname1 = aml_create_local_object(); + AML_COPY_OBJECT(destname1->property, env, + &env->tempobject, NULL); + } aml_store_to_name(env, tmpobj, destname1); if (env->stat == aml_stat_panic) { AML_DEBUGPRINT("StoreOp failed"); -- cgit v1.1