Deleted Added
full compact
acpi_apm.c (159409) acpi_apm.c (159477)
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 159409 2006-06-08 17:54:10Z njl $");
28__FBSDID("$FreeBSD: head/sys/i386/acpica/acpi_machdep.c 159477 2006-06-10 08:06:16Z 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>

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

47
48#include <sys/selinfo.h>
49
50#include <machine/apm_bios.h>
51#include <machine/pc/bios.h>
52
53#include <i386/bios/apm.h>
54
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>

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

47
48#include <sys/selinfo.h>
49
50#include <machine/apm_bios.h>
51#include <machine/pc/bios.h>
52
53#include <i386/bios/apm.h>
54
55SYSCTL_DECL(_debug_acpi);
56
55uint32_t acpi_resume_beep;
57uint32_t acpi_resume_beep;
56TUNABLE_INT("hw.acpi.resume_beep", &acpi_resume_beep);
58TUNABLE_INT("debug.acpi.resume_beep", &acpi_resume_beep);
59SYSCTL_UINT(_debug_acpi, OID_AUTO, resume_beep, CTLFLAG_RW, &acpi_resume_beep,
60 0, "Beep the PC speaker when resuming");
57uint32_t acpi_reset_video;
58TUNABLE_INT("hw.acpi.reset_video", &acpi_reset_video);
59
60static int intr_model = ACPI_INTR_PIC;
61static int apm_active;
62
63static d_open_t apmopen;
64static d_close_t apmclose;

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

317 if (intr_model == ACPI_INTR_PIC)
318 BUS_CONFIG_INTR(dev, AcpiGbl_FADT->SciInt, INTR_TRIGGER_LEVEL,
319 INTR_POLARITY_LOW);
320 else
321 acpi_SetIntrModel(intr_model);
322
323 SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx,
324 SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO,
61uint32_t acpi_reset_video;
62TUNABLE_INT("hw.acpi.reset_video", &acpi_reset_video);
63
64static int intr_model = ACPI_INTR_PIC;
65static int apm_active;
66
67static d_open_t apmopen;
68static d_close_t apmclose;

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

321 if (intr_model == ACPI_INTR_PIC)
322 BUS_CONFIG_INTR(dev, AcpiGbl_FADT->SciInt, INTR_TRIGGER_LEVEL,
323 INTR_POLARITY_LOW);
324 else
325 acpi_SetIntrModel(intr_model);
326
327 SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx,
328 SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO,
325 "resume_beep", CTLFLAG_RD | CTLFLAG_RW, &acpi_resume_beep, 0,
326 "Beep the PC speaker when resuming");
327 SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx,
328 SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO,
329 "reset_video", CTLFLAG_RD | CTLFLAG_RW, &acpi_reset_video, 0,
329 "reset_video", CTLFLAG_RW, &acpi_reset_video, 0,
330 "Call the VESA reset BIOS vector on the resume path");
331
332 return (0);
333}
334
335void
336acpi_SetDefaultIntrModel(int model)
337{

--- 31 unchanged lines hidden ---
330 "Call the VESA reset BIOS vector on the resume path");
331
332 return (0);
333}
334
335void
336acpi_SetDefaultIntrModel(int model)
337{

--- 31 unchanged lines hidden ---