Deleted Added
full compact
acpi_apm.c (121743) acpi_apm.c (121830)
1/*-
2 * Copyright (c) 2001 Mitsuru IWASAKI
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/i386/acpica/acpi_machdep.c 121743 2003-10-30 16:14:55Z iwasaki $");
28__FBSDID("$FreeBSD: head/sys/i386/acpica/acpi_machdep.c 121830 2003-11-01 00:18:29Z njl $");
29
30#include <sys/param.h>
31#include <sys/bus.h>
32#include <sys/conf.h>
33#include <sys/fcntl.h>
34#include <sys/kernel.h>
35#include <sys/sysctl.h>
36#include <sys/uio.h>

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

56#include <machine/pc/bios.h>
57
58#if __FreeBSD_version < 500000
59#include <i386/apm/apm.h>
60#else
61#include <i386/bios/apm.h>
62#endif
63
29
30#include <sys/param.h>
31#include <sys/bus.h>
32#include <sys/conf.h>
33#include <sys/fcntl.h>
34#include <sys/kernel.h>
35#include <sys/sysctl.h>
36#include <sys/uio.h>

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

56#include <machine/pc/bios.h>
57
58#if __FreeBSD_version < 500000
59#include <i386/apm/apm.h>
60#else
61#include <i386/bios/apm.h>
62#endif
63
64u_int32_t acpi_no_reset_video = 0;
65TUNABLE_INT("hw.acpi.no_reset_video", &acpi_no_reset_video);
64u_int32_t acpi_reset_video = 1;
65TUNABLE_INT("hw.acpi.reset_video", &acpi_reset_video);
66
67static struct apm_softc apm_softc;
68
69static d_open_t apmopen;
70static d_close_t apmclose;
71static d_write_t apmwrite;
72static d_ioctl_t apmioctl;
73static d_poll_t apmpoll;

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

328
329 acpi_capm_init(sc);
330
331 acpi_install_wakeup_handler(sc);
332
333 if (intr_model != ACPI_INTR_PIC)
334 acpi_SetIntrModel(intr_model);
335
66
67static struct apm_softc apm_softc;
68
69static d_open_t apmopen;
70static d_close_t apmclose;
71static d_write_t apmwrite;
72static d_ioctl_t apmioctl;
73static d_poll_t apmpoll;

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

328
329 acpi_capm_init(sc);
330
331 acpi_install_wakeup_handler(sc);
332
333 if (intr_model != ACPI_INTR_PIC)
334 acpi_SetIntrModel(intr_model);
335
336 SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
337 OID_AUTO, "no_reset_video", CTLFLAG_RD | CTLFLAG_RW, &acpi_no_reset_video, 0,
338 "Disable calling the VESA reset BIOS vector on the resume path");
336 SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx,
337 SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO,
338 "reset_video", CTLFLAG_RD | CTLFLAG_RW, &acpi_reset_video, 0,
339 "Call the VESA reset BIOS vector on the resume path");
339
340 return (0);
341}
342
343void
344acpi_SetDefaultIntrModel(int model)
345{
346
347 intr_model = model;
348}
340
341 return (0);
342}
343
344void
345acpi_SetDefaultIntrModel(int model)
346{
347
348 intr_model = model;
349}