Commit Graph

30 Commits

Author SHA1 Message Date
Nate Lawson
8a7e9ab4b7 Fix the ACPI_DEBUG build for the non-module case. Move the #define into
acfreebsd.h and remove it from the Makefile.  Now ACPI_DEBUG implies
ACPI_DISASSEMBLER.

Noticed by:	marcel
2003-07-15 19:18:41 +00:00
Nate Lawson
06bc618c85 Fix build with ACPI_DEBUG option.
Reported by:	Mark Santcroos <marks@ripe.net>, des+tinderbox
2003-07-14 17:19:45 +00:00
John Baldwin
6c525ee43c Add an ACPI to ISA psuedo bridge driver. It attaches an isab(4) device to
ACPI nodes with the plug and play ID's defined for a "Generic ISA Bus
Device" as defined in section 10.7 of the ACPI 2.0 specification.  This
gives machines like the Libretto that contain a fake ISA bus that is not
connected via a PCI-ISA bridge an ISA bus for ISA devices to attach to.

Tested by:	markm
2003-07-08 18:59:32 +00:00
Nate Lawson
51773ddf47 Support functions for the new ACPI import.
* AcpiOsDerivePciId(): finds a bus number, given the slot/func and the
    acpi parse tree.
  * AcpiOsPredefinedOverride(): use the sysctl hw.acpi.os_name to
    override the value for _OS.

Ideas from:	takawata, jhb
Reviewed by:	takawata, marcel
Tested on:	i386, ia64
2003-04-29 18:50:34 +00:00
Mitsuru IWASAKI
ba835e3fe6 Add code for ACPI PCI link object manipulation.
This allocate the best IRQ to boot-disable devices (have IRQ 0).
Allocated IRQ will be used for PCI interrupt routing when ACPI is
enabled.

Note that verbose messaging enabled for the time being so that
people can easily notice the strange behavior if it happened.
2002-10-05 02:01:05 +00:00
Bruce Evans
d834a93b27 Removed explicit rule for creating a null opt_bus.h. kmod.mk does this
automatically once opt_foo.h is in SRCS, modulo some carelessness in
removing garbage in stale versions of opt_foo.h (touch(1) should not
be used to create opt_foo.h in kmod.mk or elsewhere).

Cleaned up nearby rule for creating opt_ddb.h.
2002-08-27 13:39:31 +00:00
John Baldwin
abec7762ba Have to create opt_bus.h for sys/bus.h to be happy. *sigh*
Noticed by:	imp and others
2002-08-26 21:11:56 +00:00
John Baldwin
3cb751691f Oops, forgot to hook up the ACPI PCI bus in the module.
Noticed by:	imp
2002-08-26 19:00:36 +00:00
John Baldwin
e7f52ff8bb Hook up the new ACPI PCI bus and catch up to ACPI PCI bridge driver changes. 2002-08-26 18:32:00 +00:00
Mitsuru IWASAKI
b69ed3f4c6 Resolve conflicts arising from the ACPI CA 20020725 import. 2002-07-30 19:35:32 +00:00
Mitsuru IWASAKI
98479b041b Resolve conflicts arising from the ACPI CA 20020611 import. 2002-07-09 17:54:02 +00:00
Mitsuru IWASAKI
899ccf541a Add generalized power profile code.
This makes other power-management system (APM for now) to be able to
generate power profile change events (ie. AC-line status changes), and
other kernel components, not only the ACPI components, can be notified
the events.

 - move subroutines in acpi_powerprofile.c (removed) to kern/subr_power.c
 - call power_profile_set_state() also from APM driver when AC-line
   status changes
 - add call-back function for Crusoe LongRun controlling on power
   profile changes for a example
2002-03-04 18:46:13 +00:00
Mitsuru IWASAKI
c573e654b7 Add OS layer ACPI mutex and threading support.
- Temporary fix a bug of Intel ACPI CA core code.
 - Add OS layer ACPI mutex support.  This can be disabled by
   specifying option ACPI_NO_SEMAPHORES.
 - Add ACPI threading support.  Now that we have a dedicate taskqueue for
   ACPI tasks and more ACPI task threads can be created by specifying option
   ACPI_MAX_THREADS.
 - Change acpi_EvaluateIntoBuffer() behavior slightly to reuse given
   caller's buffer unless AE_BUFFER_OVERFLOW occurs.  Also CM battery's
   evaluations were changed to use acpi_EvaluateIntoBuffer().
 - Add new utility function acpi_ConvertBufferToInteger().
 - Add simple locking for CM battery and temperature updating.
 - Fix a minor problem on EC locking.
 - Make the thermal zone polling rate to be changeable.
 - Change minor things on AcpiOsSignal(); in ACPI_SIGNAL_FATAL case,
   entering Debugger is easier to investigate the problem rather than panic.
2001-12-22 16:05:41 +00:00
Mitsuru IWASAKI
1611ea8727 Add S4BIOS sleep (BIOS hibernation) and DSDT overriding support.
- Add S4BIOS sleep implementation.  This will works well if MIB
   hw.acpi.s4bios is set (and of course BIOS supports it and hibernation
   is enabled correctly).
 - Add DSDT overriding support which is submitted by takawata originally.
   If loader tunable acpi_dsdt_load="YES" and DSDT file is set to
   acpi_dsdt_name (default DSDT file name is /boot/acpi_dsdt.aml),
   ACPI CA core loads DSDT from given file rather than BIOS memory block.
   DSDT file can be generated by iasl in ports/devel/acpicatools/.
 - Add new files so that we can add our proposed additional code to Intel
   ACPI CA into these files temporary.  They will be removed when
   similar code is added into ACPI CA officially.
2001-11-06 15:00:30 +00:00
Mike Smith
fad334b0b9 Update to reflect files added/removed with the 20011018 ACPI CA update. 2001-10-31 02:35:43 +00:00
Mitsuru IWASAKI
f86214b6b8 Add APM compatibility feature to ACPI.
This emulates APM device node interface APIs (mainly ioctl) and
provides APM services for the applications.  The goal is to support
most of APM applications without any changes.
Implemented ioctls in this commit are:
 - APMIO_SUSPEND (mapped ACPI S3 as default but changable by sysctl)
 - APMIO_STANDBY (mapped ACPI S1 as default but changable by sysctl)
 - APMIO_GETINFO and APMIO_GETINFO_OLD
 - APMIO_GETPWSTATUS

With above, many APM applications which get batteries, ac-line
info. and transition the system into suspend/standby mode (such as
wmapm, xbatt) should work with ACPI enabled kernel (if ACPI works well :-)

Reviewed by:	arch@, audit@ and some guys
2001-10-26 17:43:05 +00:00
Mike Smith
9bdd67479e Update list of sources to match 20010920 snapshot. 2001-10-04 23:19:17 +00:00
Yoshihiro Takahashi
5fc7261688 Use MACHINE_ARCH instead of MACHINE to fix pc98 module. 2001-09-06 12:53:53 +00:00
Mike Smith
d78d4c8a43 Update for slightly changed ACPI OSD module. Make debugging code conditional
on ACPI_DEBUG, so we can set it in /etc/make.conf.
2001-08-30 00:53:13 +00:00
Takanori Watanabe
6161544ca7 Add ACPI S2-S4BIOS Suspend/Resume code.
Some problems may remain.

Reviewed by:iwasaki
2001-07-20 06:07:34 +00:00
Mike Smith
55ec04d9bc Ha! This time, I remembered the ACPI module. Update the sources list
to reflect recent changes in the code.
2001-07-07 23:36:13 +00:00
Takanori Watanabe
c7ec8708f6 Follow Mike's commit by adding acpi_powerres.c. 2001-06-28 17:07:37 +00:00
Takanori Watanabe
39f6498da2 Fix include path for recent acpica update. 2001-05-30 10:12:20 +00:00
Mike Smith
2704f54b4b New files for the ACPI CA 20010518 update. 2001-05-29 20:05:59 +00:00
Peter Wemm
205a48f7f3 Zap some bad examples:
opt_foo.h:
	touch opt_foo.h
.. is unnecessary - kmod.mk does this for us.
2001-02-04 08:23:14 +00:00
Scott Long
ed2b5a2368 Update the module Makefile to reflect the state of things from the last
acpi-ca import.

Approved by:	msmith
2001-01-31 22:40:01 +00:00
David E. O'Brien
c68159a6d8 Use a consistent style and one much closer to the rest of /usr/src 2001-01-06 14:00:42 +00:00
Takanori Watanabe
d8c616aedc Add ACPI AC adaptor and ACPI Control Method Battery.
And install notify handler for thermal zone .
2000-12-22 14:41:55 +00:00
Takanori Watanabe
d55a2811f5 Update Makefile to follow acpica-1115 import. 2000-12-05 08:47:41 +00:00
Takanori Watanabe
e927e6a1c0 Makefile for ACPI CA base acpi driver kernel module.
This module is intended to be loaded from /boot/loader,not from kldload(8).
2000-10-31 04:09:35 +00:00