summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2001-07-21 04:04:03 +0000
committermsmith <msmith@FreeBSD.org>2001-07-21 04:04:03 +0000
commitfdc534151a6e846ad0d22cde61a680cc4a7d5b09 (patch)
treed0487c69ae5b71f59c39ce52a2e49b7b42c15d99 /sys
parent183b6c470d461cb7d3d5947c5ff76a9028cdd241 (diff)
downloadFreeBSD-src-fdc534151a6e846ad0d22cde61a680cc4a7d5b09.zip
FreeBSD-src-fdc534151a6e846ad0d22cde61a680cc4a7d5b09.tar.gz
The API for loading tables changed (we no longer explicitly search for the
RSDP, it's now found via a callback). AcpiOsSleepUsec() went away, use AcpiOsSleep() instead (we could use AcpiOsStall() too) AcpiFormatException() was changed to make more sense (it behaves like our old acpi_strerror() did), so throw acpi_strerror() away (still #defined in acpivar.h though, we need to sweep these seperately).
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpica/acpi.c19
-rw-r--r--sys/dev/acpica/acpivar.h4
2 files changed, 4 insertions, 19 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 54426f4..d9e34f7 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -168,7 +168,6 @@ static void
acpi_identify(driver_t *driver, device_t parent)
{
device_t child;
- ACPI_PHYSICAL_ADDRESS rsdp;
int error;
#ifdef ENABLE_DEBUGGER
char *debugpoint = getenv("debug.acpi.debugger");
@@ -205,8 +204,7 @@ acpi_identify(driver_t *driver, device_t parent)
if (debugpoint && !strcmp(debugpoint, "tables"))
acpi_EnterDebugger();
#endif
- if (((error = AcpiFindRootPointer(&rsdp)) != AE_OK) ||
- ((error = AcpiLoadTables(rsdp)) != AE_OK)) {
+ if ((error = AcpiLoadTables()) != AE_OK) {
printf("ACPI: table load failed: %s\n", acpi_strerror(error));
return_VOID;
}
@@ -1095,7 +1093,7 @@ acpi_SetSleepState(struct acpi_softc *sc, int state)
/* wait for the WAK_STS bit */
Count = 0;
while (!(AcpiHwRegisterBitAccess(ACPI_READ, ACPI_MTX_LOCK, WAK_STS))) {
- AcpiOsSleepUsec(1000);
+ AcpiOsSleep(0, 1);
/*
* Some BIOSes don't set WAK_STS at all,
* give up waiting for wakeup if we time out.
@@ -1260,19 +1258,6 @@ struct acpi_staticbuf {
};
char *
-acpi_strerror(ACPI_STATUS excep)
-{
- static struct acpi_staticbuf buf;
-
- buf.buffer.Length = 512;
- buf.buffer.Pointer = &buf.data[0];
-
- if (AcpiFormatException(excep, &buf.buffer) == AE_OK)
- return(buf.buffer.Pointer);
- return("(error formatting exception)");
-}
-
-char *
acpi_name(ACPI_HANDLE handle)
{
static struct acpi_staticbuf buf;
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
index 5a6f737..22be040 100644
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -231,8 +231,8 @@ extern struct acpi_parse_resource_set acpi_res_parse_set;
extern ACPI_STATUS acpi_parse_resources(device_t dev, ACPI_HANDLE handle,
struct acpi_parse_resource_set *set);
-/* XXX this is ugly */
-extern char *acpi_strerror(ACPI_STATUS excep);
+/* XXX hack to handle old code, should be fixed */
+#define acpi_strerror(e) AcpiFormatException(e)
/*
* ACPI event handling
OpenPOWER on IntegriCloud