summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2018-06-25 22:33:25 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2018-06-25 22:33:25 +0000
commitd4be10bb2300db550fd687cc4bbee19535681603 (patch)
treec7f9d515cb06587a2479f030ad1a2524bc3bbf68 /sys/arch/i386
parentebc6c03003108f9b51191ef34c6b7f463eb9d06e (diff)
Reorganize acpi(4) code a bit in preparation for upcoming arm64 support.
ok deraadt@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/acpi_machdep.c17
-rw-r--r--sys/arch/i386/i386/hibernate_machdep.c7
2 files changed, 20 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c
index e87dae851bd..e14e91f29bc 100644
--- a/sys/arch/i386/i386/acpi_machdep.c
+++ b/sys/arch/i386/i386/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.65 2018/03/31 13:45:03 bluhm Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.66 2018/06/25 22:33:24 kettenis Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -28,6 +28,7 @@
#include <uvm/uvm_extern.h>
+#include <machine/biosvar.h>
#include <machine/bus.h>
#include <machine/conf.h>
#include <machine/acpiapm.h>
@@ -104,6 +105,20 @@ acpi_unmap(struct acpi_mem_map *handle)
uvm_km_free(kernel_map, handle->baseva, handle->vsize);
}
+int
+acpi_bus_space_map(bus_space_tag_t t, bus_addr_t addr, bus_size_t size,
+ int flags, bus_space_handle_t *bshp)
+{
+ return _bus_space_map(t, addr, size, flags, bshp);
+}
+
+void
+acpi_bus_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh,
+ bus_size_t size)
+{
+ _bus_space_unmap(t, bsh, size, NULL);
+}
+
u_int8_t *
acpi_scan(struct acpi_mem_map *handle, paddr_t pa, size_t len)
{
diff --git a/sys/arch/i386/i386/hibernate_machdep.c b/sys/arch/i386/i386/hibernate_machdep.c
index c8164705183..0c7e4262861 100644
--- a/sys/arch/i386/i386/hibernate_machdep.c
+++ b/sys/arch/i386/i386/hibernate_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hibernate_machdep.c,v 1.52 2018/06/21 07:33:30 mlarkin Exp $ */
+/* $OpenBSD: hibernate_machdep.c,v 1.53 2018/06/25 22:33:24 kettenis Exp $ */
/*
* Copyright (c) 2011 Mike Larkin <mlarkin@openbsd.org>
@@ -26,11 +26,10 @@
#include <sys/timeout.h>
#include <sys/malloc.h>
-#include <dev/acpi/acpivar.h>
-
#include <uvm/uvm_extern.h>
#include <uvm/uvm_pmemrange.h>
+#include <machine/biosvar.h>
#include <machine/hibernate.h>
#include <machine/hibernate_var.h>
#include <machine/kcore.h>
@@ -40,6 +39,8 @@
#include <machine/mpbiosvar.h>
#endif /* MULTIPROCESSOR */
+#include <dev/acpi/acpivar.h>
+
#include "acpi.h"
#include "wd.h"
#include "ahci.h"