diff options
author | iwasaki <iwasaki@FreeBSD.org> | 2000-09-30 22:37:24 +0000 |
---|---|---|
committer | iwasaki <iwasaki@FreeBSD.org> | 2000-09-30 22:37:24 +0000 |
commit | e50592ac572d97a1ad258f180a94a57db5e06052 (patch) | |
tree | 84a6f7396e3b43119ffdf76245a8b21e10aaa4c8 /usr.sbin/acpi/amldb | |
parent | 017c58324c4e1ec2f7ba068f6d99153cb68860eb (diff) | |
download | FreeBSD-src-e50592ac572d97a1ad258f180a94a57db5e06052.zip FreeBSD-src-e50592ac572d97a1ad258f180a94a57db5e06052.tar.gz |
- Add acpi_disable_events() and set it with EVENTHANDLER_REGISTER in order to
avoid power on again problem after acpi_soft_off() calling.
- Implement SleepOp/StallOp in AML interpreter. Also provide ACPICA
compatibility.
- Minor changes on __inline function declaration in acpica_osd.h
(obtained from NetBSD porting).
Diffstat (limited to 'usr.sbin/acpi/amldb')
-rw-r--r-- | usr.sbin/acpi/amldb/aml/aml_common.h | 4 | ||||
-rw-r--r-- | usr.sbin/acpi/amldb/aml/aml_parse.c | 20 |
2 files changed, 20 insertions, 4 deletions
diff --git a/usr.sbin/acpi/amldb/aml/aml_common.h b/usr.sbin/acpi/amldb/aml/aml_common.h index 4988385..827c324 100644 --- a/usr.sbin/acpi/amldb/aml/aml_common.h +++ b/usr.sbin/acpi/amldb/aml/aml_common.h @@ -47,11 +47,15 @@ printf(fmt, args); \ } while(0) #define AML_DEBUGGER(x, y) /* no debugger in kernel */ +#define AML_STALL(micro) DELAY(micro) +#define AML_SLEEP(sec, milli) OsdSleep(sec, milli) #else /* !_KERNEL */ #define AML_SYSASSERT(x) assert(x) #define AML_SYSABORT() abort() #define AML_SYSERRX(eval, fmt, args...) errx(eval, fmt, args) #define AML_DEBUGGER(x, y) aml_dbgr(x, y) +#define AML_STALL(micro) /* not required in userland */ +#define AML_SLEEP(sec, milli) /* not required in userland */ #endif /* _KERNEL */ union aml_object; diff --git a/usr.sbin/acpi/amldb/aml/aml_parse.c b/usr.sbin/acpi/amldb/aml/aml_parse.c index f98977d..ce40e64 100644 --- a/usr.sbin/acpi/amldb/aml/aml_parse.c +++ b/usr.sbin/acpi/amldb/aml/aml_parse.c @@ -55,6 +55,14 @@ #include "debug.h" #else /* _KERNEL */ #include <sys/systm.h> +#include <sys/bus.h> +#include <machine/bus.h> +#include <machine/clock.h> +#include <dev/acpi/acpireg.h> +#include <dev/acpi/acpivar.h> +#ifndef ACPI_NO_OSDFUNC_INLINE +#include <machine/acpica_osd.h> +#endif #endif /* !_KERNEL */ static int findsetleftbit(int num); @@ -1484,14 +1492,18 @@ aml_parse_termobj(struct aml_environ *env, int indent) aml_parse_termobj(env, indent); AML_DEBUGPRINT(")"); break; - case 0x21: /* StallOp *//* XXX Not yet */ + case 0x21: /* StallOp */ AML_DEBUGPRINT("Stall("); - aml_parse_termobj(env, indent); + num1 = aml_objtonum(env, aml_eval_name(env, + aml_parse_termobj(env, indent))); AML_DEBUGPRINT(")"); + AML_STALL(num1); break; - case 0x22: /* SleepOp *//* XXX Not yet */ + case 0x22: /* SleepOp */ AML_DEBUGPRINT("Sleep("); - aml_parse_termobj(env, indent); + num1 = aml_objtonum(env, aml_eval_name(env, + aml_parse_termobj(env, indent))); + AML_SLEEP(0, num1); AML_DEBUGPRINT(")"); break; case 0x23: /* AcquireOp *//* XXX Not yet */ |