Deleted Added
full compact
acpi_wakeup.c (167578) acpi_wakeup.c (177253)
1/*-
2 * Copyright (c) 2001 Takanori Watanabe <takawata@jp.freebsd.org>
3 * Copyright (c) 2001 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Takanori Watanabe <takawata@jp.freebsd.org>
3 * Copyright (c) 2001 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/i386/acpica/acpi_wakeup.c 167578 2007-03-14 22:30:02Z njl $");
29__FBSDID("$FreeBSD: head/sys/i386/acpica/acpi_wakeup.c 177253 2008-03-16 10:58:09Z rwatson $");
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/bus.h>
35#include <sys/lock.h>
36#include <sys/proc.h>
37#include <sys/sysctl.h>

--- 279 unchanged lines hidden (view full) ---

317 if (bus_dmamem_alloc(acpi_waketag, &wakeaddr, BUS_DMA_NOWAIT,
318 &acpi_wakemap) != 0) {
319 printf("acpi_alloc_wakeup_handler: can't alloc wake memory\n");
320 return;
321 }
322 acpi_wakeaddr = (vm_offset_t)wakeaddr;
323}
324
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/bus.h>
35#include <sys/lock.h>
36#include <sys/proc.h>
37#include <sys/sysctl.h>

--- 279 unchanged lines hidden (view full) ---

317 if (bus_dmamem_alloc(acpi_waketag, &wakeaddr, BUS_DMA_NOWAIT,
318 &acpi_wakemap) != 0) {
319 printf("acpi_alloc_wakeup_handler: can't alloc wake memory\n");
320 return;
321 }
322 acpi_wakeaddr = (vm_offset_t)wakeaddr;
323}
324
325SYSINIT(acpiwakeup, SI_SUB_KMEM, SI_ORDER_ANY, acpi_alloc_wakeup_handler, 0)
325SYSINIT(acpiwakeup, SI_SUB_KMEM, SI_ORDER_ANY, acpi_alloc_wakeup_handler, 0);
326
327static void
328acpi_realmodeinst(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
329{
330 struct acpi_softc *sc;
331 uint32_t *addr;
332
333 /* Overwrite the ljmp target with the real address */

--- 26 unchanged lines hidden ---
326
327static void
328acpi_realmodeinst(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
329{
330 struct acpi_softc *sc;
331 uint32_t *addr;
332
333 /* Overwrite the ljmp target with the real address */

--- 26 unchanged lines hidden ---