Commit Graph

129 Commits

Author SHA1 Message Date
jhb
26703f68fb Use TASK_INIT to initialize taskqueue task instead of violating the
abstraction.

Submitted by:	Andrew Reiter <arr@watson.org>
2001-10-25 19:56:02 +00:00
jhb
92926ccb2d Allow hw.acpi.cpu.{economy,performance}_speed to be set from the loader
via tunables.
2001-10-23 22:37:36 +00:00
iwasaki
258c555833 Reduce frequency of Battery info (_BIF) acquisition. This helps
avoiding EC read errors on some laptops.
 - Stop updating Battery info for all user requests
 - Update Battery info by notify events and resume method
 - Poll Battery info every one minute

Suggested by:	takawata
2001-10-22 18:01:37 +00:00
jhb
e58d793d19 Add missing includes of sys/lock.h. 2001-10-11 17:52:20 +00:00
dfr
6fb327a40f Make the interrupt routing a bit less chatty unless bootverbose is set. 2001-10-07 18:25:43 +00:00
peter
1362f09f59 Fix some 64-bit uncleanliness. 2001-10-06 04:09:26 +00:00
peter
e93559e124 Fix some style bugs before fixing some real bugs. 2001-10-06 04:03:20 +00:00
peter
83a50569d0 Fix a stack trashing bug when int != sizeof(pointer)
This fixes the ia64 boot!  We have scsi disks!
2001-10-06 03:49:38 +00:00
msmith
8b9973a0ee Update usage of AcpiEnableEvent to reflect a new argument.
Fix acpi_DeviceIsPresent to check for valid _STA data and to check
the "present" and "functioning" bits.

Use acpi_DeviceIsPresent in acpi_pcib rather than rolling our own
(also broken) version.
2001-10-04 23:21:09 +00:00
dfr
1e5a79cd70 Add busspace hacks for ia64. 2001-10-04 08:33:16 +00:00
dfr
d0ec64659d Use return_PTR, not return_VALUE when returning pointers. 2001-10-04 08:32:18 +00:00
dfr
3f7e7298ab Check the compatible ID as well as the hardware ID in acpi_MatchHid. 2001-10-04 08:31:17 +00:00
iwasaki
a044ecafbd Call acpi_DeviceIsPresent() only for devices. This should make
non-ACPI_TYPE_DEVICE devices (such as acpi_tz and acpi_cpu) enabled
again.

Reviewed by:	msmith
2001-09-17 15:11:55 +00:00
msmith
9e8e5b6938 Disable devices that are not present; at a later stage we can then enable
them if the device arrives.

This should solve the problem where devices that have been disabled eg. in
the BIOS show up with nonsense resources and hang the bootstrap process.
2001-09-15 04:14:31 +00:00
julian
aff3918a2c KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
iwasaki
46a738f9ed Don't call tsleep from AcpiOsStall(), call DELAY() always instead.
Process switching during calling AcpiOsStall() caused fatal trap 12 at
sleeping/wakeup on some machines.
2001-09-08 17:03:26 +00:00
msmith
86ec004ed3 Should check debug.acpi.avoid, not .disable. 2001-09-07 03:54:37 +00:00
msmith
16b42ea584 Allow the ACPI subsystem to be disabled with a hint.
Avoid fully initialising the ACPI namespace if we are attempting to avoid
parts of it.  This is a workaround for some systems that still crash
the interpreter.

Implement the ISA_IVAR_LOGICALID for ISA compatibility.  Implement stubs
for other PnP ID-related ivars.
2001-09-07 02:57:29 +00:00
msmith
84f99b656b Move OsdEnvironment.c into MD code; searching for the ACPI tables is not
portable.
2001-09-07 02:55:00 +00:00
msmith
0df8f53b61 Initialise the adapter status to an invalid state, so that the initial check
of the adapter object will always result in a change event.

This fixes the problem where a laptop booted without an AC adapter ran
at 100% CPU speed by default.

Submitted by:	"Christopher N . Harrell" <cnh@netvmg.com>
2001-09-06 23:33:22 +00:00
jhb
f79ef17e44 Add a hack to acpi_EvaluateInteger() to handle the case of a method
returning a Buffer that contains an Integer rather an an Integer directly.

Submitted by:	msmith
Approved by:	msmith
2001-09-06 23:16:55 +00:00
msmith
15cf8e2fc2 Allocate system resource IRQs as shareable; this is the typical case. 2001-09-06 22:34:40 +00:00
iwasaki
d4f40221d6 Just print a message in acpi_tz_monitor() only when new active state
is different from the previous active state.
This reduce tons of 'acpi_tz0: _AC0: temperature 64.0 >= setpoint 64.0'
messages.

Reviewed by:	msmith
2001-09-04 15:40:12 +00:00
iwasaki
a8c86ab277 Fix typo; CTLFLAG_RO -> CTLFLAG_RD. 2001-09-02 06:28:20 +00:00
msmith
7193811fac Add a MODULE_VERSION declaration. This should prevent duplicate loading
of the module, and allows other modules to depend on and link against
the ACPI module.

Add a sysctl that allows us to retrieve the ACPI CA version number as
well.
2001-09-01 22:41:53 +00:00
msmith
b4f19c522d Don't claim memory resources owned by a PNP0C01 device ("system memory")
as some systems claim the entire physical address space is owned by it.
2001-08-31 22:59:04 +00:00
msmith
ed5463b4ec Don't activate placeholder resources; it can be very expensive in the
SYS_RES_MEMORY case, and it shouldn't be necessary.
2001-08-31 18:08:50 +00:00
takawata
6b5da07a69 Call OS-independent resume routine to execute _WAK .. etc.
This should also recover GPE bit,comment says, though not implemented yet.
2001-08-31 05:36:48 +00:00
msmith
17d0056b7c Add support for attaching PnP-aware ISA drivers to ACPI.
Always parse ACPI device resource settings (current resources only)
and attach the resources to the device before probe/attaching.
2001-08-30 00:50:58 +00:00
msmith
40c3ac1ef3 Retarget the resource parser slightly. We only fetch current resources
for the device now (we should really just be parsing a passed-in resource
buffer).

Wrap long lines so this is (more) readable.

Support Address16 and Address32 resources, in the CONSUMER case.

Support DRQs so that we can handle ISA devices.

Support ExtendedIrqs (we ignore most of their attributes)

Add a placeholder device for system memory and system resources.  This
takes the place of the nexus placeholder, which only attaches to ISA.
2001-08-30 00:49:34 +00:00
msmith
abd4aaad1f Note that now that some ISA devices will attach to ACPI, we need to
keep the ivar indexes that ISA uses free.
2001-08-30 00:45:42 +00:00
msmith
4f0ffaf8b6 Don't parse our resources ourself, the ACPI core code must do it. 2001-08-30 00:45:12 +00:00
msmith
a1a3d7d84a Nuke the (fairly bogus) attachment of *all* ACPI devices to ISA. 2001-08-30 00:44:29 +00:00
msmith
574b18805f Add missing acpi_disabled() call so that this driver can be disabled. 2001-08-30 00:44:01 +00:00
msmith
27619a76d4 Updates to match the ACPI CA 20010816 import:
- New debug macro (ACPI_DEBUG_PRINT), reducing debug-case code size.
 - New debug level/subsystem codes.
2001-08-26 22:50:15 +00:00
iwasaki
6a4ddd6875 Fix error checking about device state transition from D0 to D3.
Turn off the resources listed in _PR0 to go to D3 if we don't have _PR3/_PS3.

Reviewed by:	msmith
2001-08-21 18:22:40 +00:00
msmith
ea9eb218b1 Remove noisy printfs from the notify handler; having these go off
every couple of seconds is not useful.
2001-08-21 09:06:02 +00:00
msmith
d8d251d3e5 The Intel 440MX ACPI timer seems to work properly, so add it to the list
here.  Restructure slightly so that adding more devices is easier.

Submitted by:	Jose Gabriel J Marcelino <gabriel@maquina.com>
2001-08-05 23:20:32 +00:00
msmith
4bad900eda Reverse the logic here again with regards to "trusted" ACPI timer
implementations.  More of them seem to be broken, so only "trust"
timers we know work.
2001-08-03 09:52:53 +00:00
msmith
78310cd458 Shoud build resources in the _CRS buffer. Oops.
Submitted by:	"neckpain@nettaxi.com" <neckpain@nettaxi.com>
2001-08-03 08:38:49 +00:00
msmith
ff0b823044 Move the resource pointer when we reallocate the buffer.
Submitted by:	"neckpain@nettaxi.com" <neckpain@nettaxi.com>
2001-08-03 08:38:11 +00:00
msmith
dde7847fe6 The current resource buffer returned from an interrupt link device
in the case where there are no interrupts routed for it does not
contain enough space to use it to route an interrupt.  In the case
where we need to route an interrupt, throw away the returned buffer
and create a new one containing the interrupt we want.
2001-07-30 09:01:18 +00:00
msmith
db480b248b - Prevent the ACPI code from being loaded as a module other than at
boot time.  Loading as a module once the system is up and running
   doesn't make any sense.

 - Fix acpi_FindIndexedResource (it would only check the first resource),
   changes the calling interface.

 - Add a new helper function (acpi_AppendBufferResource) to help building
   buffers containing resources.
2001-07-30 08:59:43 +00:00
msmith
d1cde1f052 Minor updates (no functional changes)
- Remove the beer-ware license (reqested by phk)
 - Reorganise so that the PIIX4 workaround code is kept together, and
   switch the workaround function via the timecounter struct, saving
   a compare in the read-timecounter codepath.  Also indicate that
   the workaround is active by changing the timecounter hardware string.
2001-07-30 08:57:55 +00:00
msmith
90047bd687 The ACPI timer register corruption problem is resolved in the PIIX4
starting with the PIIX4M.  Restrict enabling the workaround to those
chips known to be buggy.
2001-07-27 09:01:13 +00:00
iwasaki
fe52ab0fec Better checking of duplicated interrupt handler installation.
Reviewed by:	msmith
2001-07-25 16:13:30 +00:00
iwasaki
0485a28afa Some minor fixes.
- Set system power profile only when AC-line status has canged.
 - Get initial AC-line status after whole system is up.

Reviewed by:	msmith
2001-07-25 16:08:58 +00:00
iwasaki
a01232fccb Don't do sleep state transition if specified sleep state is not
supported by the system.
2001-07-22 19:13:54 +00:00
msmith
59dc3b7c43 Convert from acpi_strerror() to AcpiFormatException()
Fix dangling include of the dear departed acpi_ecreg.h
2001-07-21 10:24:37 +00:00
msmith
af3dbc36f0 Update the OSD module to match the ACPI CA 20010717 import.
Submitted by:	"Grover, Andrew" <andrew.grover@intel.com> (OsdHardware.c)
2001-07-21 04:10:01 +00:00