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).
This commit is contained in:
Mike Smith 2001-07-21 04:04:03 +00:00
parent 0b920e45df
commit acf72ef4f1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=80066
2 changed files with 4 additions and 19 deletions

View File

@ -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.
@ -1259,19 +1257,6 @@ struct acpi_staticbuf {
char data[512];
};
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)
{

View File

@ -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