aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2009-06-05 18:44:36 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2009-06-05 18:44:36 +0000
commit129d3046ef0427d3b22b78a71f3494854d817fba (patch)
treed775a86a0ebbf412e4960fa787e9a405073ca489 /sys/dev
parent14b55641a5703026c1e245bef6d575470265fe3e (diff)
downloadsrc-129d3046ef0427d3b22b78a71f3494854d817fba.tar.gz
src-129d3046ef0427d3b22b78a71f3494854d817fba.zip
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi_support/acpi_aiboost.c4
-rw-r--r--sys/dev/acpi_support/acpi_asus.c4
-rw-r--r--sys/dev/acpi_support/acpi_fujitsu.c4
-rw-r--r--sys/dev/acpi_support/acpi_ibm.c5
-rw-r--r--sys/dev/acpi_support/acpi_panasonic.c3
-rw-r--r--sys/dev/acpi_support/acpi_sony.c4
-rw-r--r--sys/dev/acpi_support/acpi_toshiba.c3
-rw-r--r--sys/dev/acpica/Osd/OsdDebug.c6
-rw-r--r--sys/dev/acpica/Osd/OsdHardware.c78
-rw-r--r--sys/dev/acpica/Osd/OsdInterrupt.c4
-rw-r--r--sys/dev/acpica/Osd/OsdMemory.c15
-rw-r--r--sys/dev/acpica/Osd/OsdSchedule.c4
-rw-r--r--sys/dev/acpica/Osd/OsdStream.c2
-rw-r--r--sys/dev/acpica/Osd/OsdSynch.c5
-rw-r--r--sys/dev/acpica/Osd/OsdTable.c25
-rw-r--r--sys/dev/acpica/acpi.c22
-rw-r--r--sys/dev/acpica/acpi_acad.c3
-rw-r--r--sys/dev/acpica/acpi_battery.c3
-rw-r--r--sys/dev/acpica/acpi_button.c4
-rw-r--r--sys/dev/acpica/acpi_cmbat.c3
-rw-r--r--sys/dev/acpica/acpi_cpu.c26
-rw-r--r--sys/dev/acpica/acpi_dock.c5
-rw-r--r--sys/dev/acpica/acpi_ec.c4
-rw-r--r--sys/dev/acpica/acpi_hpet.c4
-rw-r--r--sys/dev/acpica/acpi_if.m3
-rw-r--r--sys/dev/acpica/acpi_isab.c4
-rw-r--r--sys/dev/acpica/acpi_lid.c4
-rw-r--r--sys/dev/acpica/acpi_package.c3
-rw-r--r--sys/dev/acpica/acpi_pci.c4
-rw-r--r--sys/dev/acpica/acpi_pci_link.c3
-rw-r--r--sys/dev/acpica/acpi_pcib.c4
-rw-r--r--sys/dev/acpica/acpi_pcib_acpi.c4
-rw-r--r--sys/dev/acpica/acpi_pcib_pci.c4
-rw-r--r--sys/dev/acpica/acpi_perf.c3
-rw-r--r--sys/dev/acpica/acpi_powerres.c4
-rw-r--r--sys/dev/acpica/acpi_quirk.c3
-rw-r--r--sys/dev/acpica/acpi_resource.c4
-rw-r--r--sys/dev/acpica/acpi_smbat.c3
-rw-r--r--sys/dev/acpica/acpi_thermal.c4
-rw-r--r--sys/dev/acpica/acpi_throttle.c3
-rw-r--r--sys/dev/acpica/acpi_timer.c4
-rw-r--r--sys/dev/acpica/acpi_video.c3
-rw-r--r--sys/dev/asmc/asmc.c4
-rw-r--r--sys/dev/fdc/fdc_acpi.c3
-rw-r--r--sys/dev/ipmi/ipmi_acpi.c3
-rw-r--r--sys/dev/pci/pci.c2
46 files changed, 148 insertions, 168 deletions
diff --git a/sys/dev/acpi_support/acpi_aiboost.c b/sys/dev/acpi_support/acpi_aiboost.c
index 00bf9cb1a34d..8fff8720597f 100644
--- a/sys/dev/acpi_support/acpi_aiboost.c
+++ b/sys/dev/acpi_support/acpi_aiboost.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/bus.h>
-#include <contrib/dev/acpica/acpi.h>
+
+#include <contrib/dev/acpica/include/acpi.h>
+
#include "acpi_if.h"
#include <sys/module.h>
#include <dev/acpica/acpivar.h>
diff --git a/sys/dev/acpi_support/acpi_asus.c b/sys/dev/acpi_support/acpi_asus.c
index 28f9e7c982c3..51ca6fa35458 100644
--- a/sys/dev/acpi_support/acpi_asus.c
+++ b/sys/dev/acpi_support/acpi_asus.c
@@ -47,7 +47,9 @@ __FBSDID("$FreeBSD$");
#include <sys/bus.h>
#include <sys/sbuf.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/led/led.h>
diff --git a/sys/dev/acpi_support/acpi_fujitsu.c b/sys/dev/acpi_support/acpi_fujitsu.c
index 5de365a060ce..6628135039fa 100644
--- a/sys/dev/acpi_support/acpi_fujitsu.c
+++ b/sys/dev/acpi_support/acpi_fujitsu.c
@@ -37,7 +37,9 @@ __FBSDID("$FreeBSD$");
#include <sys/module.h>
#include <sys/sysctl.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
/* Hooks for the ACPI CA debugging infrastructure */
diff --git a/sys/dev/acpi_support/acpi_ibm.c b/sys/dev/acpi_support/acpi_ibm.c
index ca67716ed8d6..0bf340dd5ec7 100644
--- a/sys/dev/acpi_support/acpi_ibm.c
+++ b/sys/dev/acpi_support/acpi_ibm.c
@@ -42,7 +42,10 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/bus.h>
#include <machine/cpufunc.h>
-#include <contrib/dev/acpica/acpi.h>
+
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include "acpi_if.h"
#include <sys/module.h>
#include <dev/acpica/acpivar.h>
diff --git a/sys/dev/acpi_support/acpi_panasonic.c b/sys/dev/acpi_support/acpi_panasonic.c
index f922233092a3..595ca08e524a 100644
--- a/sys/dev/acpi_support/acpi_panasonic.c
+++ b/sys/dev/acpi_support/acpi_panasonic.c
@@ -37,7 +37,8 @@ __FBSDID("$FreeBSD$");
#include <sys/bus.h>
#include <sys/power.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
#define _COMPONENT ACPI_OEM
diff --git a/sys/dev/acpi_support/acpi_sony.c b/sys/dev/acpi_support/acpi_sony.c
index 88195c2d7836..905461d1e121 100644
--- a/sys/dev/acpi_support/acpi_sony.c
+++ b/sys/dev/acpi_support/acpi_sony.c
@@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/bus.h>
-#include <contrib/dev/acpica/acpi.h>
+
+#include <contrib/dev/acpica/include/acpi.h>
+
#include "acpi_if.h"
#include <sys/module.h>
#include <dev/acpica/acpivar.h>
diff --git a/sys/dev/acpi_support/acpi_toshiba.c b/sys/dev/acpi_support/acpi_toshiba.c
index d15fe7e4ae4a..343d3aed4a14 100644
--- a/sys/dev/acpi_support/acpi_toshiba.c
+++ b/sys/dev/acpi_support/acpi_toshiba.c
@@ -34,7 +34,8 @@ __FBSDID("$FreeBSD$");
#include <sys/module.h>
#include <sys/bus.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
#define _COMPONENT ACPI_OEM
diff --git a/sys/dev/acpica/Osd/OsdDebug.c b/sys/dev/acpica/Osd/OsdDebug.c
index 27b94a09d89d..84253574cf98 100644
--- a/sys/dev/acpica/Osd/OsdDebug.c
+++ b/sys/dev/acpica/Osd/OsdDebug.c
@@ -41,8 +41,10 @@ __FBSDID("$FreeBSD$");
#include <ddb/ddb.h>
#include <ddb/db_output.h>
-#include <contrib/dev/acpica/acpi.h>
-#include <contrib/dev/acpica/acdebug.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+#include <contrib/dev/acpica/include/acdebug.h>
+
#include <dev/acpica/acpivar.h>
UINT32
diff --git a/sys/dev/acpica/Osd/OsdHardware.c b/sys/dev/acpica/Osd/OsdHardware.c
index 6e3beea6a566..cf3cdd74e736 100644
--- a/sys/dev/acpica/Osd/OsdHardware.c
+++ b/sys/dev/acpica/Osd/OsdHardware.c
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
#include <sys/bus.h>
#include <sys/kernel.h>
@@ -65,75 +65,9 @@ __FBSDID("$FreeBSD$");
#define ACPI_BUS_HANDLE 0
#endif
-/*
- * Some BIOS vendors use AML to read/write directly to IO space. This
- * can cause a problem if such accesses interfere with the OS's access to
- * the same ports. Windows XP and newer systems block accesses to certain
- * IO ports. We print a message or block accesses based on a tunable.
- */
-static int illegal_bios_ports[] = {
- 0x000, 0x00f, /* DMA controller 1 */
- 0x020, 0x021, /* PIC */
- 0x040, 0x043, /* Timer 1 */
- 0x048, 0x04b, /* Timer 2 failsafe */
- 0x070, 0x071, /* CMOS and RTC */
- 0x074, 0x076, /* Extended CMOS */
- 0x081, 0x083, /* DMA1 page registers */
- 0x087, 0x087, /* DMA1 ch0 low page */
- 0x089, 0x08b, /* DMA2 ch2 (0x89), ch3 low page (0x8a, 0x8b) */
- 0x08f, 0x091, /* DMA2 low page refresh (0x8f) */
- /* Arb ctrl port, card select feedback (0x90, 0x91) */
- 0x093, 0x094, /* System board setup */
- 0x096, 0x097, /* POS channel select */
- 0x0a0, 0x0a1, /* PIC (cascaded) */
- 0x0c0, 0x0df, /* ISA DMA */
- 0x4d0, 0x4d1, /* PIC ELCR (edge/level control) */
- 0xcf8, 0xcff, /* PCI config space. Microsoft adds 0xd00 also but
- that seems incorrect. */
- -1, -1
-};
-
-/* Block accesses to bad IO port addresses or just print a warning. */
-static int block_bad_io;
-TUNABLE_INT("debug.acpi.block_bad_io", &block_bad_io);
-
-/*
- * Look up bad ports in our table. Returns 0 if ok, 1 if marked bad but
- * access is still allowed, or -1 to deny access.
- */
-static int
-acpi_os_check_port(UINT32 addr, UINT32 width)
-{
- int error, *port;
-
- error = 0;
- for (port = illegal_bios_ports; *port != -1; port += 2) {
- if ((addr >= port[0] && addr <= port[1]) ||
- (addr < port[0] && addr + (width / 8) > port[0])) {
- if (block_bad_io)
- error = -1;
- else
- error = 1;
- break;
- }
- }
-
- return (error);
-}
-
ACPI_STATUS
AcpiOsReadPort(ACPI_IO_ADDRESS InPort, UINT32 *Value, UINT32 Width)
{
- int error;
-
- error = acpi_os_check_port(InPort, Width);
- if (error != 0) {
- if (bootverbose)
- printf("acpi: bad read from port 0x%03x (%d)\n",
- (int)InPort, Width);
- if (error == -1)
- return (AE_BAD_PARAMETER);
- }
switch (Width) {
case 8:
@@ -159,16 +93,6 @@ AcpiOsReadPort(ACPI_IO_ADDRESS InPort, UINT32 *Value, UINT32 Width)
ACPI_STATUS
AcpiOsWritePort(ACPI_IO_ADDRESS OutPort, UINT32 Value, UINT32 Width)
{
- int error;
-
- error = acpi_os_check_port(OutPort, Width);
- if (error != 0) {
- if (bootverbose)
- printf("acpi: bad write to port 0x%03x (%d), val %#x\n",
- (int)OutPort, Width, Value);
- if (error == -1)
- return (AE_BAD_PARAMETER);
- }
switch (Width) {
case 8:
diff --git a/sys/dev/acpica/Osd/OsdInterrupt.c b/sys/dev/acpica/Osd/OsdInterrupt.c
index c973124f50db..158a2b9de21c 100644
--- a/sys/dev/acpica/Osd/OsdInterrupt.c
+++ b/sys/dev/acpica/Osd/OsdInterrupt.c
@@ -39,7 +39,9 @@ __FBSDID("$FreeBSD$");
#include <machine/resource.h>
#include <sys/rman.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
#define _COMPONENT ACPI_OS_SERVICES
diff --git a/sys/dev/acpica/Osd/OsdMemory.c b/sys/dev/acpica/Osd/OsdMemory.c
index 3804bb6642d0..8ed7a900c34d 100644
--- a/sys/dev/acpica/Osd/OsdMemory.c
+++ b/sys/dev/acpica/Osd/OsdMemory.c
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
@@ -55,7 +55,7 @@ AcpiOsFree(void *Memory)
}
void *
-AcpiOsMapMemory(ACPI_PHYSICAL_ADDRESS PhysicalAddress, ACPI_NATIVE_UINT Length)
+AcpiOsMapMemory(ACPI_PHYSICAL_ADDRESS PhysicalAddress, ACPI_SIZE Length)
{
return (pmap_mapbios((vm_offset_t)PhysicalAddress, Length));
}
@@ -80,17 +80,6 @@ AcpiOsValidateInterface (char *Interface)
return (AE_SUPPORT);
}
-/*
- * There is no clean way to do this. We make the charitable assumption
- * that callers will not pass garbage to us.
- */
-ACPI_STATUS
-AcpiOsValidateAddress (UINT8 SpaceId, ACPI_PHYSICAL_ADDRESS Address,
- ACPI_SIZE Length)
-{
- return (AE_OK);
-}
-
BOOLEAN
AcpiOsReadable (void *Pointer, ACPI_SIZE Length)
{
diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c
index 795de93e1801..fa91ed8781e0 100644
--- a/sys/dev/acpica/Osd/OsdSchedule.c
+++ b/sys/dev/acpica/Osd/OsdSchedule.c
@@ -43,7 +43,9 @@ __FBSDID("$FreeBSD$");
#include <sys/proc.h>
#include <sys/taskqueue.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
#define _COMPONENT ACPI_OS_SERVICES
diff --git a/sys/dev/acpica/Osd/OsdStream.c b/sys/dev/acpica/Osd/OsdStream.c
index 8d1291a568a7..81181db34a51 100644
--- a/sys/dev/acpica/Osd/OsdStream.c
+++ b/sys/dev/acpica/Osd/OsdStream.c
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
void
AcpiOsPrintf(const char *Format, ...)
diff --git a/sys/dev/acpica/Osd/OsdSynch.c b/sys/dev/acpica/Osd/OsdSynch.c
index b15b1ead09d9..68fdcaa66e73 100644
--- a/sys/dev/acpica/Osd/OsdSynch.c
+++ b/sys/dev/acpica/Osd/OsdSynch.c
@@ -32,7 +32,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
#include "opt_acpi.h"
#include <sys/kernel.h>
@@ -367,7 +368,7 @@ AcpiOsDeleteLock (ACPI_SPINLOCK Handle)
* (and thus can't block) but since we have ithreads, we don't worry
* about potentially blocking.
*/
-ACPI_NATIVE_UINT
+ACPI_CPU_FLAGS
AcpiOsAcquireLock (ACPI_SPINLOCK Handle)
{
struct acpi_spinlock *h = (struct acpi_spinlock *)Handle;
diff --git a/sys/dev/acpica/Osd/OsdTable.c b/sys/dev/acpica/Osd/OsdTable.c
index d9b29ebc7ac9..55f674df3131 100644
--- a/sys/dev/acpica/Osd/OsdTable.c
+++ b/sys/dev/acpica/Osd/OsdTable.c
@@ -36,8 +36,8 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/linker.h>
-#include <contrib/dev/acpica/acpi.h>
-#include <contrib/dev/acpica/actables.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/actables.h>
#undef _COMPONENT
#define _COMPONENT ACPI_TABLES
@@ -67,17 +67,30 @@ ACPI_STATUS
AcpiOsTableOverride(ACPI_TABLE_HEADER *ExistingTable,
ACPI_TABLE_HEADER **NewTable)
{
- caddr_t acpi_dsdt, p;
+ char modname[] = "acpi_dsdt";
+ caddr_t acpi_table, p, s;
if (ExistingTable == NULL || NewTable == NULL)
return (AE_BAD_PARAMETER);
+#ifdef notyet
+ for (int i = 0; i < ACPI_NAME_SIZE; i++)
+ modname[i + 5] = tolower(ExistingTable->Signature[i]);
+#else
/* If we're not overriding the DSDT, just return. */
- if ((acpi_dsdt = preload_search_by_type("acpi_dsdt")) == NULL ||
- (p = preload_search_info(acpi_dsdt, MODINFO_ADDR)) == NULL) {
+ if (strncmp(ExistingTable->Signature, ACPI_SIG_DSDT, ACPI_NAME_SIZE) != 0) {
*NewTable = NULL;
- } else
+ return (AE_OK);
+ }
+#endif
+
+ if ((acpi_table = preload_search_by_type(modname)) != NULL &&
+ (p = preload_search_info(acpi_table, MODINFO_ADDR)) != NULL &&
+ (s = preload_search_info(acpi_table, MODINFO_SIZE)) != NULL &&
+ *(size_t *)s != 0)
*NewTable = *(ACPI_TABLE_HEADER **)p;
+ else
+ *NewTable = NULL;
return (AE_OK);
}
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 4bc059b3c5df..63f95d3eb2c8 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -61,11 +61,12 @@ __FBSDID("$FreeBSD$");
#include <isa/isavar.h>
#include <isa/pnpvar.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+#include <contrib/dev/acpica/include/acnamesp.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/acpica/acpiio.h>
-#include <contrib/dev/acpica/achware.h>
-#include <contrib/dev/acpica/acnamesp.h>
#include "pci_if.h"
#include <dev/pci/pcivar.h>
@@ -416,7 +417,6 @@ static int
acpi_attach(device_t dev)
{
struct acpi_softc *sc;
- ACPI_TABLE_FACS *facs;
ACPI_STATUS status;
int error, state;
UINT32 flags;
@@ -593,14 +593,7 @@ acpi_attach(device_t dev)
}
/* Only enable S4BIOS by default if the FACS says it is available. */
- status = AcpiGetTable(ACPI_SIG_FACS, 0, (ACPI_TABLE_HEADER **)&facs);
- if (ACPI_FAILURE(status)) {
- device_printf(dev, "couldn't get FACS: %s\n",
- AcpiFormatException(status));
- error = ENXIO;
- goto out;
- }
- if (facs->Flags & ACPI_FACS_S4_BIOS_PRESENT)
+ if (AcpiGbl_FACS->Flags & ACPI_FACS_S4_BIOS_PRESENT)
sc->acpi_s4bios = 1;
/* Probe all supported sleep states. */
@@ -1848,8 +1841,7 @@ acpi_shutdown_final(void *arg, int howto)
(AcpiGbl_FADT.Flags & ACPI_FADT_RESET_REGISTER) &&
sc->acpi_handle_reboot) {
/* Reboot using the reset register. */
- status = AcpiHwLowLevelWrite(
- AcpiGbl_FADT.ResetRegister.BitWidth,
+ status = AcpiWrite(
AcpiGbl_FADT.ResetValue, &AcpiGbl_FADT.ResetRegister);
if (ACPI_FAILURE(status))
device_printf(sc->acpi_dev, "reset failed - %s\n",
@@ -3391,8 +3383,6 @@ static struct debugtag dbg_layer[] = {
};
static struct debugtag dbg_level[] = {
- {"ACPI_LV_ERROR", ACPI_LV_ERROR},
- {"ACPI_LV_WARN", ACPI_LV_WARN},
{"ACPI_LV_INIT", ACPI_LV_INIT},
{"ACPI_LV_DEBUG_OBJECT", ACPI_LV_DEBUG_OBJECT},
{"ACPI_LV_INFO", ACPI_LV_INFO},
diff --git a/sys/dev/acpica/acpi_acad.c b/sys/dev/acpica/acpi_acad.c
index 0ea69e849bba..638c09be635e 100644
--- a/sys/dev/acpica/acpi_acad.c
+++ b/sys/dev/acpica/acpi_acad.c
@@ -40,7 +40,8 @@ __FBSDID("$FreeBSD$");
#include <sys/conf.h>
#include <sys/power.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/acpica/acpiio.h>
#include <isa/isavar.h>
diff --git a/sys/dev/acpica/acpi_battery.c b/sys/dev/acpica/acpi_battery.c
index 2e8c7a4b4932..dd2b3fa20808 100644
--- a/sys/dev/acpica/acpi_battery.c
+++ b/sys/dev/acpica/acpi_battery.c
@@ -36,7 +36,8 @@ __FBSDID("$FreeBSD$");
#include <sys/ioccom.h>
#include <sys/sysctl.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/acpica/acpiio.h>
diff --git a/sys/dev/acpica/acpi_button.c b/sys/dev/acpica/acpi_button.c
index 197af4f8cd86..7814c0e3fdf5 100644
--- a/sys/dev/acpica/acpi_button.c
+++ b/sys/dev/acpica/acpi_button.c
@@ -35,7 +35,9 @@ __FBSDID("$FreeBSD$");
#include <sys/module.h>
#include <sys/bus.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
/* Hooks for the ACPI CA debugging infrastructure */
diff --git a/sys/dev/acpica/acpi_cmbat.c b/sys/dev/acpica/acpi_cmbat.c
index 24ab5f8aefe9..dde3ad5e5c97 100644
--- a/sys/dev/acpica/acpi_cmbat.c
+++ b/sys/dev/acpica/acpi_cmbat.c
@@ -41,7 +41,8 @@ __FBSDID("$FreeBSD$");
#include <sys/rman.h>
#include <sys/malloc.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/acpica/acpiio.h>
diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
index a65faeec8baa..5d8ad535998f 100644
--- a/sys/dev/acpica/acpi_cpu.c
+++ b/sys/dev/acpica/acpi_cpu.c
@@ -46,7 +46,9 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
#include <sys/rman.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
/*
@@ -897,9 +899,9 @@ acpi_cpu_idle()
* time if USB is loaded.
*/
if ((cpu_quirks & CPU_QUIRK_NO_BM_CTRL) == 0) {
- AcpiGetRegister(ACPI_BITREG_BUS_MASTER_STATUS, &bm_active);
+ AcpiReadBitRegister(ACPI_BITREG_BUS_MASTER_STATUS, &bm_active);
if (bm_active != 0) {
- AcpiSetRegister(ACPI_BITREG_BUS_MASTER_STATUS, 1);
+ AcpiWriteBitRegister(ACPI_BITREG_BUS_MASTER_STATUS, 1);
cx_next_idx = min(cx_next_idx, sc->cpu_non_c3);
}
}
@@ -926,8 +928,8 @@ acpi_cpu_idle()
*/
if (cx_next->type == ACPI_STATE_C3) {
if ((cpu_quirks & CPU_QUIRK_NO_BM_CTRL) == 0) {
- AcpiSetRegister(ACPI_BITREG_ARB_DISABLE, 1);
- AcpiSetRegister(ACPI_BITREG_BUS_MASTER_RLD, 1);
+ AcpiWriteBitRegister(ACPI_BITREG_ARB_DISABLE, 1);
+ AcpiWriteBitRegister(ACPI_BITREG_BUS_MASTER_RLD, 1);
} else
ACPI_FLUSH_CPU_CACHE();
}
@@ -938,7 +940,7 @@ acpi_cpu_idle()
* get the time very close to the CPU start/stop clock logic, this
* is the only reliable time source.
*/
- AcpiHwLowLevelRead(32, &start_time, &AcpiGbl_FADT.XPmTimerBlock);
+ AcpiRead(&start_time, &AcpiGbl_FADT.XPmTimerBlock);
CPU_GET_REG(cx_next->p_lvlx, 1);
/*
@@ -947,14 +949,14 @@ acpi_cpu_idle()
* the processor has stopped. Doing it again provides enough
* margin that we are certain to have a correct value.
*/
- AcpiHwLowLevelRead(32, &end_time, &AcpiGbl_FADT.XPmTimerBlock);
- AcpiHwLowLevelRead(32, &end_time, &AcpiGbl_FADT.XPmTimerBlock);
+ AcpiRead(&end_time, &AcpiGbl_FADT.XPmTimerBlock);
+ AcpiRead(&end_time, &AcpiGbl_FADT.XPmTimerBlock);
/* Enable bus master arbitration and disable bus master wakeup. */
if (cx_next->type == ACPI_STATE_C3 &&
(cpu_quirks & CPU_QUIRK_NO_BM_CTRL) == 0) {
- AcpiSetRegister(ACPI_BITREG_ARB_DISABLE, 0);
- AcpiSetRegister(ACPI_BITREG_BUS_MASTER_RLD, 0);
+ AcpiWriteBitRegister(ACPI_BITREG_ARB_DISABLE, 0);
+ AcpiWriteBitRegister(ACPI_BITREG_BUS_MASTER_RLD, 0);
}
ACPI_ENABLE_IRQS();
@@ -1069,11 +1071,11 @@ acpi_cpu_quirks(void)
val |= PIIX4_STOP_BREAK_MASK;
pci_write_config(acpi_dev, PIIX4_DEVACTB_REG, val, 4);
}
- AcpiGetRegister(ACPI_BITREG_BUS_MASTER_RLD, &val);
+ AcpiReadBitRegister(ACPI_BITREG_BUS_MASTER_RLD, &val);
if (val) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"acpi_cpu: PIIX4: reset BRLD_EN_BM\n"));
- AcpiSetRegister(ACPI_BITREG_BUS_MASTER_RLD, 0);
+ AcpiWriteBitRegister(ACPI_BITREG_BUS_MASTER_RLD, 0);
}
break;
default:
diff --git a/sys/dev/acpica/acpi_dock.c b/sys/dev/acpica/acpi_dock.c
index fc59b53f5e4a..b7d2e3e444a4 100644
--- a/sys/dev/acpica/acpi_dock.c
+++ b/sys/dev/acpica/acpi_dock.c
@@ -32,8 +32,9 @@
#include <sys/kernel.h>
#include <sys/module.h>
-#include <contrib/dev/acpica/acpi.h>
-#include <contrib/dev/acpica/acnamesp.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/acpica/acpiio.h>
diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c
index 696542cf21c5..a5a81dc632f4 100644
--- a/sys/dev/acpica/acpi_ec.c
+++ b/sys/dev/acpica/acpi_ec.c
@@ -42,7 +42,9 @@ __FBSDID("$FreeBSD$");
#include <machine/resource.h>
#include <sys/rman.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
/* Hooks for the ACPI CA debugging infrastructure */
diff --git a/sys/dev/acpica/acpi_hpet.c b/sys/dev/acpica/acpi_hpet.c
index 17022bb0e6c4..a41869543680 100644
--- a/sys/dev/acpica/acpi_hpet.c
+++ b/sys/dev/acpica/acpi_hpet.c
@@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$");
#include <sys/time.h>
#include <sys/timetc.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/acpica/acpi_hpet.h>
diff --git a/sys/dev/acpica/acpi_if.m b/sys/dev/acpica/acpi_if.m
index 2ae19f444e04..4d90109d7506 100644
--- a/sys/dev/acpica/acpi_if.m
+++ b/sys/dev/acpica/acpi_if.m
@@ -28,7 +28,8 @@
#include <sys/bus.h>
#include <sys/types.h>
-#include <contrib/dev/acpica/acpi.h>
+
+#include <contrib/dev/acpica/include/acpi.h>
INTERFACE acpi;
diff --git a/sys/dev/acpica/acpi_isab.c b/sys/dev/acpica/acpi_isab.c
index 382d1c6f77d7..0da018246345 100644
--- a/sys/dev/acpica/acpi_isab.c
+++ b/sys/dev/acpica/acpi_isab.c
@@ -39,7 +39,9 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/module.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
#include <isa/isavar.h>
diff --git a/sys/dev/acpica/acpi_lid.c b/sys/dev/acpica/acpi_lid.c
index 0bb4a9f13c09..47d5b45c1f9d 100644
--- a/sys/dev/acpica/acpi_lid.c
+++ b/sys/dev/acpica/acpi_lid.c
@@ -37,7 +37,9 @@ __FBSDID("$FreeBSD$");
#include <sys/bus.h>
#include <sys/proc.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
/* Hooks for the ACPI CA debugging infrastructure */
diff --git a/sys/dev/acpica/acpi_package.c b/sys/dev/acpica/acpi_package.c
index d7be2571d6e6..55eaf93608ce 100644
--- a/sys/dev/acpica/acpi_package.c
+++ b/sys/dev/acpica/acpi_package.c
@@ -36,7 +36,8 @@ __FBSDID("$FreeBSD$");
#include <machine/resource.h>
#include <sys/rman.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
/*
diff --git a/sys/dev/acpica/acpi_pci.c b/sys/dev/acpica/acpi_pci.c
index 607691c7091b..7c1bd86120e0 100644
--- a/sys/dev/acpica/acpi_pci.c
+++ b/sys/dev/acpica/acpi_pci.c
@@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/module.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
#include <sys/pciio.h>
diff --git a/sys/dev/acpica/acpi_pci_link.c b/sys/dev/acpica/acpi_pci_link.c
index b39e8e2860b4..dcf101d7c422 100644
--- a/sys/dev/acpica/acpi_pci_link.c
+++ b/sys/dev/acpica/acpi_pci_link.c
@@ -35,7 +35,8 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/module.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/acpica/acpi_pcibvar.h>
diff --git a/sys/dev/acpica/acpi_pcib.c b/sys/dev/acpica/acpi_pcib.c
index 96c9253dbbb3..cc9bcbef659a 100644
--- a/sys/dev/acpica/acpi_pcib.c
+++ b/sys/dev/acpica/acpi_pcib.c
@@ -34,7 +34,9 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/kernel.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/acpica/acpi_pcibvar.h>
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c
index 495ae20cc00f..d9827abfd547 100644
--- a/sys/dev/acpica/acpi_pcib_acpi.c
+++ b/sys/dev/acpica/acpi_pcib_acpi.c
@@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$");
#include <sys/module.h>
#include <sys/sysctl.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
#include <machine/pci_cfgreg.h>
diff --git a/sys/dev/acpica/acpi_pcib_pci.c b/sys/dev/acpica/acpi_pcib_pci.c
index f0f2d76e4fea..0da89c405b4e 100644
--- a/sys/dev/acpica/acpi_pcib_pci.c
+++ b/sys/dev/acpica/acpi_pcib_pci.c
@@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/module.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/acpica/acpi_pcibvar.h>
diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c
index e517ad3f6245..31b1c630d3ea 100644
--- a/sys/dev/acpica/acpi_perf.c
+++ b/sys/dev/acpica/acpi_perf.c
@@ -44,7 +44,8 @@ __FBSDID("$FreeBSD$");
#include <machine/resource.h>
#include <sys/rman.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
#include "cpufreq_if.h"
diff --git a/sys/dev/acpica/acpi_powerres.c b/sys/dev/acpica/acpi_powerres.c
index 3a64e3acd163..0988871c246d 100644
--- a/sys/dev/acpica/acpi_powerres.c
+++ b/sys/dev/acpica/acpi_powerres.c
@@ -33,7 +33,9 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/bus.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
/*
diff --git a/sys/dev/acpica/acpi_quirk.c b/sys/dev/acpica/acpi_quirk.c
index b75a527a6a0e..fe0a06f87bb4 100644
--- a/sys/dev/acpica/acpi_quirk.c
+++ b/sys/dev/acpica/acpi_quirk.c
@@ -30,7 +30,8 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/bus.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
enum ops_t {
diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c
index 2a81e54ec4c2..d9132b0dbb73 100644
--- a/sys/dev/acpica/acpi_resource.c
+++ b/sys/dev/acpica/acpi_resource.c
@@ -39,7 +39,9 @@ __FBSDID("$FreeBSD$");
#include <machine/resource.h>
#include <sys/rman.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
/* Hooks for the ACPI CA debugging infrastructure */
diff --git a/sys/dev/acpica/acpi_smbat.c b/sys/dev/acpica/acpi_smbat.c
index 3935a9f768d7..145e240dca10 100644
--- a/sys/dev/acpica/acpi_smbat.c
+++ b/sys/dev/acpica/acpi_smbat.c
@@ -33,7 +33,8 @@ __FBSDID("$FreeBSD$");
#include <sys/module.h>
#include <sys/bus.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/acpica/acpiio.h>
#include <dev/acpica/acpi_smbus.h>
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c
index 08cd15be89cd..962fdb7e9388 100644
--- a/sys/dev/acpica/acpi_thermal.c
+++ b/sys/dev/acpica/acpi_thermal.c
@@ -45,7 +45,9 @@ __FBSDID("$FreeBSD$");
#include "cpufreq_if.h"
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
/* Hooks for the ACPI CA debugging infrastructure */
diff --git a/sys/dev/acpica/acpi_throttle.c b/sys/dev/acpica/acpi_throttle.c
index d79d7ae2d736..40476e02bd98 100644
--- a/sys/dev/acpica/acpi_throttle.c
+++ b/sys/dev/acpica/acpi_throttle.c
@@ -39,7 +39,8 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/pci/pcivar.h>
diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c
index 73bd5ed09e4c..cfbeea4ee2c9 100644
--- a/sys/dev/acpica/acpi_timer.c
+++ b/sys/dev/acpica/acpi_timer.c
@@ -40,7 +40,9 @@ __FBSDID("$FreeBSD$");
#include <machine/resource.h>
#include <sys/rman.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/pci/pcivar.h>
diff --git a/sys/dev/acpica/acpi_video.c b/sys/dev/acpica/acpi_video.c
index b9fccfc5ab5b..c095a402642f 100644
--- a/sys/dev/acpica/acpi_video.c
+++ b/sys/dev/acpica/acpi_video.c
@@ -38,7 +38,8 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/sysctl.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
/* ACPI video extension driver. */
diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c
index a2722c01e7a0..d4e835d1263e 100644
--- a/sys/dev/asmc/asmc.c
+++ b/sys/dev/asmc/asmc.c
@@ -49,7 +49,9 @@ __FBSDID("$FreeBSD$");
#include <sys/rman.h>
#include <machine/resource.h>
-#include <contrib/dev/acpica/acpi.h>
+
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/asmc/asmcvar.h>
diff --git a/sys/dev/fdc/fdc_acpi.c b/sys/dev/fdc/fdc_acpi.c
index c3cb9b9bd822..79fa66b93a1a 100644
--- a/sys/dev/fdc/fdc_acpi.c
+++ b/sys/dev/fdc/fdc_acpi.c
@@ -35,7 +35,8 @@ __FBSDID("$FreeBSD$");
#include <sys/module.h>
#include <sys/proc.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
#include <dev/fdc/fdcvar.h>
diff --git a/sys/dev/ipmi/ipmi_acpi.c b/sys/dev/ipmi/ipmi_acpi.c
index 1bd3a64d7b93..42810028d544 100644
--- a/sys/dev/ipmi/ipmi_acpi.c
+++ b/sys/dev/ipmi/ipmi_acpi.c
@@ -36,7 +36,8 @@ __FBSDID("$FreeBSD$");
#include <sys/rman.h>
#include <sys/selinfo.h>
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
+
#include <dev/acpica/acpivar.h>
/* Hooks for the ACPI CA debugging infrastructure */
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 63d9cee98eac..667072fe30a9 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$");
#include "pci_if.h"
#ifdef __HAVE_ACPI
-#include <contrib/dev/acpica/acpi.h>
+#include <contrib/dev/acpica/include/acpi.h>
#include "acpi_if.h"
#else
#define ACPI_PWR_FOR_SLEEP(x, y, z)