Skip site navigation (1)Skip section navigation (2)

CVS log for src/sys/dev/acpica/acpi.c

[BACK] Up to [FreeBSD] / src / sys / dev / acpica

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.309: download - view: text, markup, annotated - select for diffs
Wed Feb 8 21:23:20 2012 UTC (25 hours, 11 minutes ago) by jkim
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.308: preferred, colored
Changes since revision 1.308: +9 -3 lines
SVN rev 231227 on 2012-02-08 21:23:20Z by jkim

Reset clock after atrtc(4) is properly resumed.

Revision 1.308: download - view: text, markup, annotated - select for diffs
Tue Feb 7 20:54:44 2012 UTC (2 days, 1 hour ago) by jkim
Branches: MAIN
Diff to: previous 1.307: preferred, colored
Changes since revision 1.307: +23 -17 lines
SVN rev 231161 on 2012-02-07 20:54:44Z by jkim

- Give all clocks and timers on acpi0 the equal probing order.
- Increase probing order for ECDT table to match HID-based probing.
- Decrease probing order for HPET table to match HID-based probing.
- Decrease probing order for CPUs and system resources.
- Fix ACPI_DEV_BASE_ORDER to reflect the reality.

Revision 1.305.2.2.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.305.2.2: preferred, colored; next MAIN 1.306: preferred, colored
Changes since revision 1.305.2.2: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)

Revision 1.305.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 9 18:12:42 2011 UTC (3 months ago) by jhb
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.305.2.1: preferred, colored; branchpoint 1.305: preferred, colored; next MAIN 1.306: preferred, colored
Changes since revision 1.305.2.1: +19 -5 lines
SVN rev 227397 on 2011-11-09 18:12:42Z by jhb

MFC 226302:
If an allocation for a specific resource range fails because it is not in
a decoded range for an ACPI Host-PCI bridge, try to allocate it from the
ACPI system resource range.  If that works, permit the resource allocation
regardless.

Approved by:	re (kib)

Revision 1.307: download - view: text, markup, annotated - select for diffs
Mon Nov 7 06:44:47 2011 UTC (3 months ago) by ed
Branches: MAIN
Diff to: previous 1.306: preferred, colored
Changes since revision 1.306: +1 -1 lines
SVN rev 227293 on 2011-11-07 06:44:47Z by ed

Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.

This means that their use is restricted to a single C file.

Revision 1.306: download - view: text, markup, annotated - select for diffs
Wed Oct 12 14:13:32 2011 UTC (3 months, 4 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +19 -5 lines
SVN rev 226302 on 2011-10-12 14:13:32Z by jhb

If an allocation for a specific resource range fails because it is not in
a decoded range for an ACPI Host-PCI bridge, try to allocate it from the
ACPI system resource range.  If that works, permit the resource allocation
regardless.

MFC after:	1 week

Revision 1.305.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)

Revision 1.243.2.10: download - view: text, markup, annotated - select for diffs
Tue Sep 20 05:02:48 2011 UTC (4 months, 3 weeks ago) by brueffer
Branches: RELENG_7
Diff to: previous 1.243.2.9: preferred, colored; branchpoint 1.243: preferred, colored; next MAIN 1.244: preferred, colored
Changes since revision 1.243.2.9: +1 -1 lines
SVN rev 225688 on 2011-09-20 05:02:48Z by brueffer

MFC: r225533

Improve the sleep_delay sysctl description by specifying which unit
the number is in.

Revision 1.265.2.19: download - view: text, markup, annotated - select for diffs
Tue Sep 20 04:59:34 2011 UTC (4 months, 3 weeks ago) by brueffer
Branches: RELENG_8
Diff to: previous 1.265.2.18: preferred, colored; branchpoint 1.265: preferred, colored; next MAIN 1.266: preferred, colored
Changes since revision 1.265.2.18: +1 -1 lines
SVN rev 225687 on 2011-09-20 04:59:34Z by brueffer

MFC: r225533

Improve the sleep_delay sysctl description by specifying which unit
the number is in.

Revision 1.305: download - view: text, markup, annotated - select for diffs
Tue Sep 13 15:57:29 2011 UTC (4 months, 3 weeks ago) by brueffer
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +1 -1 lines
SVN rev 225533 on 2011-09-13 15:57:29Z by brueffer

Improve the sleep_delay sysctl description by specifying which unit
the number is in.

PR:		159975
Submitted by:	gcooper
Approved by:	re (kib)
MFC after:	1 week

Revision 1.265.2.18: download - view: text, markup, annotated - select for diffs
Fri Jun 24 17:29:41 2011 UTC (7 months, 2 weeks ago) by jhb
Branches: RELENG_8
Diff to: previous 1.265.2.17: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.17: +25 -11 lines
SVN rev 223509 on 2011-06-24 17:29:41Z by jhb

MFC 221324,221324:
Add implementations of BUS_ADJUST_RESOURCE() to the PCI bus driver,
generic PCI-PCI bridge driver, x86 nexus driver, x86 Host to PCI bridge
drivers, and the drivers that sit between the x86 Host-PCI bridge drivers
and nexus.

Revision 1.304: download - view: text, markup, annotated - select for diffs
Fri Jun 24 13:58:56 2011 UTC (7 months, 2 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.303: preferred, colored
Changes since revision 1.303: +1 -1 lines
SVN rev 223502 on 2011-06-24 13:58:56Z by jhb

Typo.

Revision 1.303: download - view: text, markup, annotated - select for diffs
Fri Jun 17 21:19:01 2011 UTC (7 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.302: preferred, colored
Changes since revision 1.302: +32 -0 lines
SVN rev 223207 on 2011-06-17 21:19:01Z by jhb

Don't create a device_t object or parse current resources (via _CRS) for
ACPI Device() objects that do not have any device IDs available via the
_HID or _CID methods.  Without a device ID a device driver cannot attach
to the device anyway.  Namespace objects that are devices but not of
type ACPI_TYPE_DEVICE are not affected.

A few BIOSes have also attached a _CRS method to a PCI device to
allocate resources that are not managed via a BAR.  With the previous
code those resources are allocated from acpi0 directly which can interfere
with the new PCI-PCI bridge driver (since the PCI device in question may
be behind a bridge and its resources should be allocated from that
bridge's windows instead).  The resources were also orphaned and
and would end up associated with some other random device whose device_t
reused the pointer of the original ACPI-enumerated device (after it was
free'd by the ACPI PCI bus driver) in devinfo output which was confusing.
If we want to handle _CRS on PCI devices we can adjust the ACPI PCI bus
driver to do that in the future and associate the resources with the
proper device object respecting PCI-PCI bridges, etc.

Note that with this change the ACPI PCI bus driver no longer has to
delete ACPI-enumerated device_t devices that mirror PCI devices since
they should in general not exist.  There are rare cases when a BIOS
will give a PCI device a _HID (e.g. I've seen a PCI-ISA bridge given
a _HID for a system resource device).  In that case we leave both the
ACPI and PCI-enumerated device_t objects around just as in the previous
code.

Revision 1.302: download - view: text, markup, annotated - select for diffs
Fri Jun 10 12:30:16 2011 UTC (8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.301: preferred, colored
Changes since revision 1.301: +25 -11 lines
SVN rev 222929 on 2011-06-10 12:30:16Z by jhb

Implement BUS_ADJUST_RESOURCE() for the x86 drivers that sit between the
Host-PCI bridge drivers and nexus.

Revision 1.301: download - view: text, markup, annotated - select for diffs
Thu Apr 14 22:17:39 2011 UTC (9 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.300: preferred, colored
Changes since revision 1.300: +4 -0 lines
SVN rev 220647 on 2011-04-14 22:17:39Z by jkim

Add event handlers for (ACPI) suspend/resume events.  Suspend event handlers
are invoked right before device drivers go into sleep state and resume event
handlers are invoked right after all device drivers are waken up.

Revision 1.300: download - view: text, markup, annotated - select for diffs
Mon Apr 4 18:39:04 2011 UTC (10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.299: preferred, colored
Changes since revision 1.299: +0 -10 lines
SVN rev 220338 on 2011-04-04 18:39:04Z by jkim

Move a trivial acpi_TimerDelta() to acpivar.h to make it inlineable.

Revision 1.299: download - view: text, markup, annotated - select for diffs
Mon Apr 4 17:30:33 2011 UTC (10 months, 1 week ago) by jkim
Branches: MAIN
Diff to: previous 1.298: preferred, colored
Changes since revision 1.298: +3 -8 lines
SVN rev 220334 on 2011-04-04 17:30:33Z by jkim

Fix bogus logic to calculate delta between two values from ACPI timers.

Revision 1.298: download - view: text, markup, annotated - select for diffs
Tue Jan 11 19:26:39 2011 UTC (12 months, 4 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.297: preferred, colored
Changes since revision 1.297: +26 -8 lines
SVN rev 217279 on 2011-01-11 19:26:39Z by jkim

Work around a witness(4) panic introduced in r217238.

Reported by:	jh

Revision 1.297: download - view: text, markup, annotated - select for diffs
Thu Dec 23 18:50:14 2010 UTC (13 months, 2 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +8 -0 lines
SVN rev 216680 on 2010-12-23 18:50:14Z by jhb

Don't try to reserve a resource that is already allocated.  If the ECDT
table is present, then the acpi_ec(4) driver will allocate its resources
from nexus0 before the acpi0 device reserves resources for child devices.

Reviewed by:	jkim

Revision 1.296: download - view: text, markup, annotated - select for diffs
Wed Dec 22 20:27:20 2010 UTC (13 months, 2 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.295: preferred, colored
Changes since revision 1.295: +195 -70 lines
SVN rev 216674 on 2010-12-22 20:27:20Z by jhb

Use resource_list_reserve() to reserve I/O port and memory resources for
ACPI devices even if they are not allocated by a device driver since the
resources are in use and should not be allocated to another device.

Revision 1.243.2.9.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.243.2.9: preferred, colored; next MAIN 1.243.2.10: preferred, colored
Changes since revision 1.243.2.9: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)

Revision 1.265.2.17.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.265.2.17: preferred, colored; next MAIN 1.265.2.18: preferred, colored
Changes since revision 1.265.2.17: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)

Revision 1.295: download - view: text, markup, annotated - select for diffs
Thu Dec 16 16:55:22 2010 UTC (13 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.294: preferred, colored
Changes since revision 1.294: +1 -1 lines
SVN rev 216488 on 2010-12-16 16:55:22Z by jhb

Spelling fix.

Revision 1.294: download - view: text, markup, annotated - select for diffs
Wed Dec 15 23:48:45 2010 UTC (13 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +15 -4 lines
SVN rev 216471 on 2010-12-15 23:48:45Z by jkim

Merge ACPICA 20101209.

Revision 1.265.2.17: download - view: text, markup, annotated - select for diffs
Sat Nov 20 16:42:19 2010 UTC (14 months, 2 weeks ago) by avg
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.265.2.16: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.16: +1 -1 lines
SVN rev 215571 on 2010-11-20 16:42:19Z by avg

fix a mismerge in r215521: MFC imports of ACPICA revisions 20100428
through 20101013

The mismerge resulted in ia64 build breakage.
This is a direct commit.

Pointyhat to:	avg

Revision 1.265.2.16: download - view: text, markup, annotated - select for diffs
Fri Nov 19 14:26:45 2010 UTC (14 months, 3 weeks ago) by avg
Branches: RELENG_8
Diff to: previous 1.265.2.15: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.15: +136 -36 lines
SVN rev 215521 on 2010-11-19 14:26:45Z by avg

MFC imports of ACPICA revisions 20100428 through 20101013

Plus related changes and ehancements.

Full list of revisions:

o-----------------------------------------------------------------------
r207344 | jkim | 2010-04-29 01:25:27 +0300 (Thu, 29 Apr 2010) | 2 lines
Merge ACPICA 20100428.
o-----------------------------------------------------------------------
r209065 | jkim | 2010-06-11 22:58:41 +0300 (Fri, 11 Jun 2010) | 2 lines
Simplify a function for getting brightness levels.
o-----------------------------------------------------------------------
r209746 | jkim | 2010-07-06 23:57:28 +0300 (Tue, 06 Jul 2010) | 2 lines
Merge ACPICA 20100702.
o-----------------------------------------------------------------------
r209747 | jkim | 2010-07-07 00:41:08 +0300 (Wed, 07 Jul 2010) | 2 lines
Fix mis-merges in the previous commit.
o-----------------------------------------------------------------------
r210150 | jkim | 2010-07-16 02:24:06 +0300 (Fri, 16 Jul 2010) | 3 lines
If there is any pending sleep request, disallow entering S5 state.
Otherwise, bad things may happen. ;-)
o-----------------------------------------------------------------------
r210976 | jkim | 2010-08-07 02:11:19 +0300 (Sat, 07 Aug 2010) | 2 lines
Merge ACPICA 20100806.
o-----------------------------------------------------------------------
r211763 | mav | 2010-08-24 21:07:59 +0300 (Tue, 24 Aug 2010) | 4 lines
When ACPI reports current battery consumption rate in mAmps, print it also
in mWatts. Values in mAmps are not always suitable, because they depend on
battery voltage, which depends on battery type and charge level.
o-----------------------------------------------------------------------
r212761 | jkim | 2010-09-16 23:08:00 +0300 (Thu, 16 Sep 2010) | 2 lines
Merge ACPICA 20100915.
o-----------------------------------------------------------------------
r213772 | rpaulo | 2010-10-13 14:38:24 +0300 (Wed, 13 Oct 2010) | 3 lines
Mark acpi_bus_number() as __unused. This allows clang to this file
without any warnings.
o-----------------------------------------------------------------------
r213783 | jkim | 2010-10-13 19:30:41 +0300 (Wed, 13 Oct 2010) | 4 lines
Remove acpi_bus_number() completely.  It had to be removed in r212761.
Pointed out by:	jhb
o-----------------------------------------------------------------------
r213787 | jkim | 2010-10-13 20:06:25 +0300 (Wed, 13 Oct 2010) | 2 lines
Clean up unused headers.
o-----------------------------------------------------------------------
r213806 | jkim | 2010-10-14 00:37:02 +0300 (Thu, 14 Oct 2010) | 2 lines
Merge ACPICA 20101013.
o-----------------------------------------------------------------------
r214390 | jkim | 2010-10-26 21:59:50 +0300 (Tue, 26 Oct 2010) | 18 lines
Add two new loader tunables 'hw.acpi.install_interface' and
'hw.acpi.remove_interface'.  hw.acpi.install_interface lets you install new
interfaces.  Conversely, hw.acpi.remove_interface lets you remove OS
interfaces from the pre-defined list in ACPICA.  For example,
	hw.acpi.install_interface="FreeBSD"
lets _OSI("FreeBSD") method to return 0xffffffff (or success) and
	hw.acpi.remove_interface="Windows 2009"
lets _OSI("Windows 2009") method to return zero (or failure).  Both are
comma-separated lists and leading white spaces are ignored.  For example,
the following examples are valid:
	hw.acpi.install_interface="Linux, FreeBSD"
	hw.acpi.remove_interface="Windows 2006, Windows 2006.1"
o-----------------------------------------------------------------------
r214401 | jkim | 2010-10-27 00:22:55 +0300 (Wed, 27 Oct 2010) | 3 lines
Document newly added loader tunables "hw.acpi.install_interface" and
"hw.acpi.remove_interface".
o-----------------------------------------------------------------------
r214765 | jkim | 2010-11-04 01:16:35 +0200 (Thu, 04 Nov 2010) | 4 lines
Adjust a comment to clarify why \_SB_ and \_TZ_ are defined as device type
in ACPICA.  Reshuffle the code a bit to make sure this kludge only applies
to these two specical cases and to make it cleaner.
o-----------------------------------------------------------------------
r214848 | jkim | 2010-11-05 21:50:09 +0200 (Fri, 05 Nov 2010) | 13 lines
Fix a use-after-free bug for extended IRQ resource[1].  When _PRS buffer is
copied as a template for _SRS, a string pointer for descriptor name is also
copied and it becomes stale as soon as it gets de-allocated[2].  Now _CRS is
used as a template for _SRS as ACPI specification suggests if it is usable.
The template from _PRS is still utilized but only when _CRS is not available
or broken.  To avoid use-after-free the problem in this case, however, only
mandatory fields are copied, optional data is removed, and structure length
is adjusted accordingly.
Reported by:	hps[1]
Analyzed by:	avg[2]
Tested by:	hps
o-----------------------------------------------------------------------
r214849 | jkim | 2010-11-05 22:24:26 +0200 (Fri, 05 Nov 2010) | 2 lines
Add a forgotten change from the previous commit.
o-----------------------------------------------------------------------
r214998 | jkim | 2010-11-08 21:52:14 +0200 (Mon, 08 Nov 2010) | 2 lines
Consistently use padding `_' in the comment.
o-----------------------------------------------------------------------

Reviewed by:	jkim
Tested by:	Alexandre "Sunny" Kovalenko <gaijin.k@ovi.com>
On behalf of:	jkim

Revision 1.265.2.15: download - view: text, markup, annotated - select for diffs
Tue Nov 9 15:14:10 2010 UTC (15 months ago) by mav
Branches: RELENG_8
Diff to: previous 1.265.2.14: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.14: +1 -2 lines
SVN rev 215038 on 2010-11-09 15:14:10Z by mav

MFC r208436, r208438:
Make table-based HPET identification more clever. Before creating fake
device, make sure we have no real HPET device entry with same ID.
As side effect, it potentially allows several HPETs to be attached.
Use first of them for timecounting, rest (if ever present) could later
be used as event sources.

Revision 1.265.2.14: download - view: text, markup, annotated - select for diffs
Mon Nov 8 20:25:19 2010 UTC (15 months ago) by jkim
Branches: RELENG_8
Diff to: previous 1.265.2.13: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.13: +10 -10 lines
SVN rev 215006 on 2010-11-08 20:25:19Z by jkim

MFC:	r213755

Use AcpiReset() from ACPICA instead of rolling our own, which is actually
incomplete.  If FADT says the register is available, enable the capability
by default.  Remove the previous default value from acpi(4).

Revision 1.293: download - view: text, markup, annotated - select for diffs
Mon Nov 8 19:52:14 2010 UTC (15 months ago) by jkim
Branches: MAIN
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +1 -1 lines
SVN rev 214998 on 2010-11-08 19:52:14Z by jkim

Consistently use padding `_' in the comment.

Revision 1.292: download - view: text, markup, annotated - select for diffs
Wed Nov 3 23:16:35 2010 UTC (15 months ago) by jkim
Branches: MAIN
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +14 -16 lines
SVN rev 214765 on 2010-11-03 23:16:35Z by jkim

Adjust a comment to clarify why \_SB_ and \_TZ_ are defined as device type
in ACPICA.  Reshuffle the code a bit to make sure this kludge only applies
to these two specical cases and to make it cleaner.

Revision 1.291: download - view: text, markup, annotated - select for diffs
Tue Oct 26 18:59:50 2010 UTC (15 months, 2 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +106 -0 lines
SVN rev 214390 on 2010-10-26 18:59:50Z by jkim

Add two new loader tunables 'hw.acpi.install_interface' and
'hw.acpi.remove_interface'.  hw.acpi.install_interface lets you install new
interfaces.  Conversely, hw.acpi.remove_interface lets you remove OS
interfaces from the pre-defined list in ACPICA.  For example,

	hw.acpi.install_interface="FreeBSD"

lets _OSI("FreeBSD") method to return 0xffffffff (or success) and

	hw.acpi.remove_interface="Windows 2009"

lets _OSI("Windows 2009") method to return zero (or failure).  Both are
comma-separated lists and leading white spaces are ignored.  For example,
the following examples are valid:

	hw.acpi.install_interface="Linux, FreeBSD"
	hw.acpi.remove_interface="Windows 2006, Windows 2006.1"

Revision 1.290: download - view: text, markup, annotated - select for diffs
Tue Oct 19 20:38:21 2010 UTC (15 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +0 -12 lines
SVN rev 214076 on 2010-10-19 20:38:21Z by jkim

Remove undocumented and stale debug.acpi.do_powerstate tunable.  It was
added with hw.pci.do_powerstate but the PCI version was splitted into two
separate tunables later and now this is completely stale.  To make it worse,
PCI devices enumerated in ACPI tree ignore this tunable as it is handled by
a function in acpi_pci.c instead.

Revision 1.289: download - view: text, markup, annotated - select for diffs
Tue Oct 19 19:53:06 2010 UTC (15 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +61 -92 lines
SVN rev 214072 on 2010-10-19 19:53:06Z by jkim

Remove PCI_SET_POWERSTATE method from acpi.c and eradicate all PCI-specific
knowledges from the file.  All PCI devices enumerated in ACPI tree must use
correct one from acpi_pci.c any way.  Reduce duplicate codes as we did for
pci.c in r213905.  Do not return ESRCH from PCIB_POWER_FOR_SLEEP method.
When the method is not found, just return zero without modifying the given
default value as it is completely optional.  As a side effect, the return
state must not be NULL.  Note there is actually no functional change by
removing ESRCH because acpi_pcib_power_for_sleep() always returns zero.
Adjust debugging messages and add new ones under bootverbose to help
debugging device power state related issues.

Reviewed by:	jhb, imp (earlier versions)

Revision 1.288: download - view: text, markup, annotated - select for diffs
Wed Oct 13 00:21:53 2010 UTC (15 months, 4 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +10 -10 lines
SVN rev 213755 on 2010-10-13 00:21:53Z by jkim

Use AcpiReset() from ACPICA instead of rolling our own, which is actually
incomplete.  If FADT says the register is available, enable the capability
by default.  Remove the previous default value from acpi(4).

Revision 1.243.2.9: download - view: text, markup, annotated - select for diffs
Wed Sep 29 09:25:22 2010 UTC (16 months, 1 week ago) by avg
Branches: RELENG_7
CVS tags: RELENG_7_4_BP
Branch point for: RELENG_7_4
Diff to: previous 1.243.2.8: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.2.8: +0 -23 lines
SVN rev 213266 on 2010-09-29 09:25:22Z by avg

MFC r212993: acpi_attach: do not explicitly install default handlers for
default address spaces

Revision 1.265.2.13: download - view: text, markup, annotated - select for diffs
Wed Sep 29 09:20:18 2010 UTC (16 months, 1 week ago) by avg
Branches: RELENG_8
Diff to: previous 1.265.2.12: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.12: +0 -23 lines
SVN rev 213264 on 2010-09-29 09:20:18Z by avg

MFC r212993: acpi_attach: do not explicitly install default handlers for
default address spaces

Revision 1.287: download - view: text, markup, annotated - select for diffs
Wed Sep 22 06:10:22 2010 UTC (16 months, 2 weeks ago) by avg
Branches: MAIN
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +0 -23 lines
SVN rev 212993 on 2010-09-22 06:10:22Z by avg

acpi_attach: do not explicitly install default handlers for default
address spaces

There has been no need to do that starting with ACPICA 20040427 as
AcpiEnableSubsystem() installs the handlers automatically.
Additionaly, explicitly calling AcpiInstallAddressSpaceHandler before
AcpiEnableSubsystem is not supported by ACPICA and leads to too early
execution of _REG methods in some DSDTs, which may result in problems.

Big thanks to Robert Moore of ACPICA/Intel for explaining the above.

Reported by:	Daniel Bilik <daniel.bilik@neosystem.cz>
Tested by:	Daniel Bilik <daniel.bilik@neosystem.cz>
Reviewed by:	jkim
Suggested by:	"Moore, Robert" <robert.moore@intel.com>
MFC after:	1 week

Revision 1.243.2.8: download - view: text, markup, annotated - select for diffs
Mon Sep 20 11:09:31 2010 UTC (16 months, 2 weeks ago) by avg
Branches: RELENG_7
Diff to: previous 1.243.2.7: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.2.7: +2 -2 lines
SVN rev 212893 on 2010-09-20 11:09:31Z by avg

MFC r212413: bus_add_child: change type of order parameter to u_int

Revision 1.265.2.12: download - view: text, markup, annotated - select for diffs
Mon Sep 20 07:31:08 2010 UTC (16 months, 2 weeks ago) by avg
Branches: RELENG_8
Diff to: previous 1.265.2.11: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.11: +2 -2 lines
SVN rev 212892 on 2010-09-20 07:31:08Z by avg

MFC r212413: bus_add_child: change type of order parameter to u_int

Revision 1.286: download - view: text, markup, annotated - select for diffs
Fri Sep 10 11:19:03 2010 UTC (17 months ago) by avg
Branches: MAIN
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +2 -2 lines
SVN rev 212413 on 2010-09-10 11:19:03Z by avg

bus_add_child: change type of order parameter to u_int

This reflects actual type used to store and compare child device orders.
Change is mostly done via a Coccinelle (soon to be devel/coccinelle)
semantic patch.
Verified by LINT+modules kernel builds.

Followup to:	r212213
MFC after:	10 days

Revision 1.265.2.11: download - view: text, markup, annotated - select for diffs
Mon Sep 6 07:24:43 2010 UTC (17 months ago) by avg
Branches: RELENG_8
Diff to: previous 1.265.2.10: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.10: +5 -6 lines
SVN rev 212250 on 2010-09-06 07:24:43Z by avg

MFC r212172: acpi: update stale comments about order of cpu devices
probing

Revision 1.285: download - view: text, markup, annotated - select for diffs
Fri Sep 3 08:07:04 2010 UTC (17 months, 1 week ago) by avg
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +5 -6 lines
SVN rev 212172 on 2010-09-03 08:07:04Z by avg

acpi: update stale comments about order of cpu devices probing

These comments should have been updated in r203776 when the order was
changed.

Pointyhat to:	avg
MFC after:	3 days

Revision 1.284: download - view: text, markup, annotated - select for diffs
Tue Aug 17 15:44:52 2010 UTC (17 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +1 -3 lines
SVN rev 211430 on 2010-08-17 15:44:52Z by jhb

Add a new method to the PCI bridge interface, PCIB_POWER_FOR_SLEEP().  This
method is used by the PCI bus driver to query the power management system
to determine the proper device state to be used for a device during suspend
and resume.  For the ACPI PCI bridge drivers this calls
acpi_device_pwr_for_sleep().  This removes ACPI-specific knowledge from
the PCI and PCI-PCI bridge drivers.

Reviewed by:	jkim

Revision 1.265.2.10: download - view: text, markup, annotated - select for diffs
Tue Jul 20 20:15:32 2010 UTC (18 months, 3 weeks ago) by jkim
Branches: RELENG_8
Diff to: previous 1.265.2.9: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.9: +10 -12 lines
SVN rev 210315 on 2010-07-20 20:15:32Z by jkim

MFC:	r209957, r210003, r210005

- Move i386-inherited logic of building ACPI headers for acpi_wakeup.c into
better places and remove intermediate makefile and shell scripts.  This
makes parallel kernel build little bit safer for amd64.
- Make SMP code path in acpi.c conditional at run-time.
- Define SMP unconditionally for amd64 and remove opt_global.h from SRCS in
sys/modules/acpi/acpi/Makefile.  Note it is done just for correctness sake
because we do not build, ship, or support acpi.ko on amd64.

Revision 1.283: download - view: text, markup, annotated - select for diffs
Thu Jul 15 23:24:06 2010 UTC (18 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +12 -14 lines
SVN rev 210150 on 2010-07-15 23:24:06Z by jkim

If there is any pending sleep request, disallow entering S5 state.
Otherwise, bad things may happen. ;-)

Revision 1.282: download - view: text, markup, annotated - select for diffs
Tue Jul 13 16:35:41 2010 UTC (18 months, 4 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +10 -12 lines
SVN rev 210003 on 2010-07-13 16:35:41Z by jkim

Make SMP code path conditional at run-time.

Revision 1.281: download - view: text, markup, annotated - select for diffs
Tue Jul 6 21:41:08 2010 UTC (19 months ago) by jkim
Branches: MAIN
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +2 -2 lines
SVN rev 209747 on 2010-07-06 21:41:08Z by jkim

Fix mis-merges in the previous commit.

Revision 1.280: download - view: text, markup, annotated - select for diffs
Tue Jul 6 20:57:28 2010 UTC (19 months ago) by jkim
Branches: MAIN
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +4 -6 lines
SVN rev 209746 on 2010-07-06 20:57:28Z by jkim

Merge ACPICA 20100702.

Revision 1.265.2.9.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.265.2.9: preferred, colored; next MAIN 1.265.2.10: preferred, colored
Changes since revision 1.265.2.9: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)

Revision 1.243.2.7: download - view: text, markup, annotated - select for diffs
Thu Jun 10 20:02:13 2010 UTC (20 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.243.2.6: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.2.6: +1 -1 lines
SVN rev 209001 on 2010-06-10 20:02:13Z by jhb

MFC 208925:
The lock associated with the /dev/apm knote is already held, so use
KNOTE_LOCKED() instead of KNOTE_UNLOCKED().

Revision 1.265.2.9: download - view: text, markup, annotated - select for diffs
Thu Jun 10 20:01:33 2010 UTC (20 months ago) by jhb
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.265.2.8: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.8: +1 -1 lines
SVN rev 209000 on 2010-06-10 20:01:33Z by jhb

MFC 208925:
The lock associated with the /dev/apm knote is already held, so use
KNOTE_LOCKED() instead of KNOTE_UNLOCKED().

Approved by:	re (kib)

Revision 1.279: download - view: text, markup, annotated - select for diffs
Tue Jun 8 21:27:05 2010 UTC (20 months ago) by jhb
Branches: MAIN
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +1 -1 lines
SVN rev 208925 on 2010-06-08 21:27:05Z by jhb

The lock associated with the /dev/apm knote is already held, so use
KNOTE_LOCKED() instead of KNOTE_UNLOCKED().

Reported by:	mav
MFC after:	3 days

Revision 1.278: download - view: text, markup, annotated - select for diffs
Sun May 23 07:53:22 2010 UTC (20 months, 2 weeks ago) by mav
Branches: MAIN
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +1 -2 lines
SVN rev 208436 on 2010-05-23 07:53:22Z by mav

Make table-based HPET identification more clever. Before creating fake
device, make sure we have no real HPET device entry with same ID.
As side effect, it potentially allows several HPETs to be attached.
Use first of them for timecounting, rest (if ever present) could later
be used as event sources.

Revision 1.265.2.8: download - view: text, markup, annotated - select for diffs
Mon Apr 26 20:55:03 2010 UTC (21 months, 2 weeks ago) by jkim
Branches: RELENG_8
Diff to: previous 1.265.2.7: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.7: +51 -25 lines
SVN rev 207250 on 2010-04-26 20:55:03Z by jkim

MFC:	r204773
Merge ACPICA 20100304.

MFC:	r204874
Update module Makefile for ACPICA 20100304.

MFC:	r204877
Allow ACPI module build on amd64.  Although we strongly recommend building
it into kernel, there is no need to prevent it from building at all.

MFC:	r204916
- Allow users to enable dumping Debug objects without ACPI debugger.
Setting the new sysctl MIB "debug.acpi.enable_debug_objects" to a non-zero
value enables us to print Debug object when something is written to it.
- Allow users to disable interpreter slack mode.  Setting the new tunable
"debug.acpi.interpreter_slack" to zero disables some workarounds for common
BIOS mistakes and enables strict ACPI implementations by the specification.

MFC:	r204920
Since the interpreter slack mode is a tunable now, enable a local hack only
when it is set.  Note the default behaviour does not change by this change.

MFC:	r204965
Fix white spaces.

MFC:	r206117
Merge ACPICA 20100331 (and four additional upstream patches).

Revision 1.277: download - view: text, markup, annotated - select for diffs
Fri Apr 2 23:04:31 2010 UTC (22 months, 1 week ago) by jkim
Branches: MAIN
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +6 -23 lines
SVN rev 206117 on 2010-04-02 23:04:31Z by jkim

Merge ACPICA 20100331 (and four additional upstream patches).

Revision 1.265.2.7: download - view: text, markup, annotated - select for diffs
Thu Mar 11 08:58:13 2010 UTC (23 months ago) by avg
Branches: RELENG_8
Diff to: previous 1.265.2.6: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.6: +1 -8 lines
SVN rev 205007 on 2010-03-11 08:58:13Z by avg

MFC r203785: acpi: drop the second bus_generic_attach pass

X-MFCto7 after: 1 week

Revision 1.265.2.6: download - view: text, markup, annotated - select for diffs
Thu Mar 11 08:55:03 2010 UTC (23 months ago) by avg
Branches: RELENG_8
Diff to: previous 1.265.2.5: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.5: +5 -5 lines
SVN rev 205006 on 2010-03-11 08:55:03Z by avg

MFC r203776: acpi cpu: probe+attach before all other enumerated children

X-MFCto7 after:	1 week

Revision 1.276: download - view: text, markup, annotated - select for diffs
Tue Mar 9 19:02:02 2010 UTC (23 months ago) by jkim
Branches: MAIN
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +45 -4 lines
SVN rev 204916 on 2010-03-09 19:02:02Z by jkim

- Allow users to enable dumping Debug objects without ACPI debugger.
Setting the new sysctl MIB "debug.acpi.enable_debug_objects" to a non-zero
value enables us to print Debug object when something is written to it.
- Allow users to disable interpreter slack mode.  Setting the new tunable
"debug.acpi.interpreter_slack" to zero disables some workarounds for common
BIOS mistakes and enables strict ACPI implementations by the specification.

Revision 1.275: download - view: text, markup, annotated - select for diffs
Fri Mar 5 21:39:16 2010 UTC (23 months ago) by jkim
Branches: MAIN
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +2 -0 lines
SVN rev 204773 on 2010-03-05 21:39:16Z by jkim

Merge ACPICA 20100304.

Revision 1.274: download - view: text, markup, annotated - select for diffs
Thu Feb 11 18:24:00 2010 UTC (23 months, 4 weeks ago) by avg
Branches: MAIN
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +1 -8 lines
SVN rev 203785 on 2010-02-11 18:24:00Z by avg

acpi: drop the second bus_generic_attach pass

It is belived that that pass s not needed anymore.
Specifically it is not required now for the reasons that were given
in the removed comment.

Discussed with:	jhb
MFC after:	4 weeks

Revision 1.273: download - view: text, markup, annotated - select for diffs
Thu Feb 11 08:50:21 2010 UTC (23 months, 4 weeks ago) by avg
Branches: MAIN
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +5 -5 lines
SVN rev 203776 on 2010-02-11 08:50:21Z by avg

acpi cpu: probe+attach before all other enumerated children on acpi bus

Some current systems dynamically load SSDT(s) when _PDC/_OSC method
of Processor is evaluated.  Other devices in ACPI namespace may access
objects defined in the dynamic SSDT.  Drivers for such devices might
have to have a rather high priority, because of other dependencies.
Good example is acpi_ec driver for EC.
Thus we attach to Processors as early as possible to load the SSDTs
before any other drivers may try to evaluate control methods.
It also seems to be a natural order for a processor in a device
hierarchy.

On the other hand, some child devices on acpi cpu bus need to access
other system resources like PCI configuration space of chipset devices,
so they need to be probed and attached rather late.
For this reason we probe and attach the cpu bus at
SI_SUB_CONFIGURE:SI_ORDER_MIDDLE SYSINIT level.
In the future this could be done more elegantly via multipass.

Please note that acpi drivers that might access ACPI namespace from
device_identify will do that before _PDC/_OSC of Processors are evaluated.

Legacy cpu driver is not affected by this change.

PR:		kern/142561 (in part)
Reviewed by:	jhb
Silence from:	acpi@
MFC after:	5 weeks

Revision 1.243.2.6.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (23 months, 4 weeks ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.243.2.6: preferred, colored; next MAIN 1.243.2.7: preferred, colored
Changes since revision 1.243.2.6: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)

Revision 1.265.2.5: download - view: text, markup, annotated - select for diffs
Sat Feb 6 12:03:25 2010 UTC (2 years ago) by avg
Branches: RELENG_8
Diff to: previous 1.265.2.4: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.4: +75 -121 lines
SVN rev 203544 on 2010-02-06 12:03:25Z by avg

MFC r197104,197105,197106,197107,197688,198237,199337,199338,200553,200554,
202771,202773: bring acpica version to 20100121

MFC details:
r197104 | jkim | 2009-09-12 01:48:53 +0300 (Sat, 12 Sep 2009) | 4 lines
MFV:    r196804
Import ACPICA 20090903

r197105 | jkim | 2009-09-12 01:49:34 +0300 (Sat, 12 Sep 2009) | 2 lines
Catch up with ACPICA 20090903.

r197106 | jkim | 2009-09-12 01:50:15 +0300 (Sat, 12 Sep 2009) | 2 lines
Catch up with ACPICA 20090903.

r197107 | jkim | 2009-09-12 01:56:08 +0300 (Sat, 12 Sep 2009) | 2 lines
Canonify include paths for newly added files.

r197688 | jkim | 2009-10-01 23:56:15 +0300 (Thu, 01 Oct 2009) | 4 lines
Compile ACPI debugger and disassembler for kernel modules
unconditionally.
These files will generate almost empty object files without
ACPI_DEBUG/DDB
options.  As a result, size of acpi.ko will increase slightly.

r198237 | jkim | 2009-10-19 19:12:58 +0300 (Mon, 19 Oct 2009) | 2 lines
Merge ACPICA 20091013.

r199337 | jkim | 2009-11-16 23:47:12 +0200 (Mon, 16 Nov 2009) | 2 lines
Merge ACPICA 20091112.

r199338 | jkim | 2009-11-16 23:53:56 +0200 (Mon, 16 Nov 2009) | 2 lines
Add a forgotten module Makefile change from the previous commit.

r200553 | jkim | 2009-12-15 00:24:04 +0200 (Tue, 15 Dec 2009) | 2 lines
Merge ACPICA 20091214.

r200554 | jkim | 2009-12-15 00:28:32 +0200 (Tue, 15 Dec 2009) | 3 lines
Remove _FDE quirk handling as these quirks are automatically repaired
by ACPICA layer since ACPICA 20091214.

r202771 | jkim | 2010-01-21 23:14:28 +0200 (Thu, 21 Jan 2010) | 2 lines
Merge ACPICA 20100121.

r202773 | jkim | 2010-01-21 23:31:39 +0200 (Thu, 21 Jan 2010) | 2 lines
Fix a new header inclusion.

Discussed with:		jkim, jhb
No objections from:	acpi@

Revision 1.272: download - view: text, markup, annotated - select for diffs
Mon Nov 16 21:47:12 2009 UTC (2 years, 2 months ago) by jkim
Branches: MAIN
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +3 -3 lines
SVN rev 199337 on 2009-11-16 21:47:12Z by jkim

Merge ACPICA 20091112.

Revision 1.271: download - view: text, markup, annotated - select for diffs
Sat Nov 7 11:46:38 2009 UTC (2 years, 3 months ago) by avg
Branches: MAIN
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +0 -6 lines
SVN rev 199016 on 2009-11-07 11:46:38Z by avg

acpi: remove 'magic' ivar

o acpi_hpet: auto-added 'wildcard' devices can be identified by
  non-NULL handle attribute.
o acpi_ec: auto-add 'wildcard' devices can be identified by
  unset (NULL) private attribute.
o acpi_cpu: use private instead of magic to store cpu id.

Reviewed by:	jhb
Silence from:	acpi@
MFC after:	2 weeks
X-MFC-Note:	perhaps the ivar should stay for ABI stability

Revision 1.243.2.6: download - view: text, markup, annotated - select for diffs
Thu Oct 29 17:15:22 2009 UTC (2 years, 3 months ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_3_BP
Branch point for: RELENG_7_3
Diff to: previous 1.243.2.5: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.2.5: +22 -0 lines
SVN rev 198618 on 2009-10-29 17:15:22Z by jhb

MFC 197439:
Extract the code to find and map the MADT ACPI table during early kernel
startup and genericize it so it can be reused to map other tables as well:
- Add a routine to walk a list of ACPI subtables such as those used in the
  APIC and SRAT tables in the MI acpi(4) driver.
- Move the routines for mapping and unmapping an ACPI table as well as
  mapping the RSDT or XSDT and searching for a table with a given signature
  out into acpica_machdep.c for both amd64 and i386.

Revision 1.265.2.4: download - view: text, markup, annotated - select for diffs
Thu Oct 29 16:00:27 2009 UTC (2 years, 3 months ago) by jhb
Branches: RELENG_8
Diff to: previous 1.265.2.3: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.3: +22 -0 lines
SVN rev 198610 on 2009-10-29 16:00:27Z by jhb

MFC 197439:
Extract the code to find and map the MADT ACPI table during early kernel
startup and genericize it so it can be reused to map other tables as well:
- Add a routine to walk a list of ACPI subtables such as those used in the
  APIC and SRAT tables in the MI acpi(4) driver.
- Move the routines for mapping and unmapping an ACPI table as well as
  mapping the RSDT or XSDT and searching for a table with a given signature
  out into acpica_machdep.c for both amd64 and i386.

Revision 1.265.2.3.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.265.2.3: preferred, colored; next MAIN 1.265.2.4: preferred, colored
Changes since revision 1.265.2.3: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)

Revision 1.270: download - view: text, markup, annotated - select for diffs
Sun Sep 27 14:00:16 2009 UTC (2 years, 4 months ago) by jkim
Branches: MAIN
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +1 -7 lines
SVN rev 197536 on 2009-09-27 14:00:16Z by jkim

Copy apm(4) emulation from sys/i386/acpica/acpi_machdep.c and
install apm(8) and apm_bios.h on amd64.

Revision 1.269: download - view: text, markup, annotated - select for diffs
Wed Sep 23 15:42:35 2009 UTC (2 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +22 -0 lines
SVN rev 197439 on 2009-09-23 15:42:35Z by jhb

Extract the code to find and map the MADT ACPI table during early kernel
startup and genericize it so it can be reused to map other tables as well:
- Add a routine to walk a list of ACPI subtables such as those used in the
  APIC and SRAT tables in the MI acpi(4) driver.
- Move the routines for mapping and unmapping an ACPI table as well as
  mapping the RSDT or XSDT and searching for a table with a given signature
  out into acpica_machdep.c for both amd64 and i386.

Revision 1.268: download - view: text, markup, annotated - select for diffs
Fri Sep 11 22:49:34 2009 UTC (2 years, 4 months ago) by jkim
Branches: MAIN
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +72 -118 lines
SVN rev 197105 on 2009-09-11 22:49:34Z by jkim

Catch up with ACPICA 20090903.

Revision 1.265.2.3: download - view: text, markup, annotated - select for diffs
Thu Aug 27 16:34:04 2009 UTC (2 years, 5 months ago) by jhb
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.265.2.2: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.2: +18 -2 lines
SVN rev 196593 on 2009-08-27 16:34:04Z by jhb

MFC 196520:
Tweak the way that the ACPI and ISA bus drivers match hint devices to
BIOS-enumerated devices:
- Assume a device is a match if the memory and I/O ports match even if the
  IRQ or DRQ is wrong or missing.  Some BIOSes don't include an IRQ for
  the atrtc device for example.
- Add a hack to better match floppy controller devices.  Many BIOSes do not
  include the starting port of the floppy controller listed in the hints
  (0x3f0) in the resources for the device.  So far, however, all the BIOS
  variations encountered do include the 'port + 2' resource (0x3f2), so
  adjust the matching for "fdc" devices to look for 'port + 2'.

Approved by:	re (kib)

Revision 1.267: download - view: text, markup, annotated - select for diffs
Mon Aug 24 21:51:46 2009 UTC (2 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +18 -2 lines
SVN rev 196520 on 2009-08-24 21:51:46Z by jhb

Tweak the way that the ACPI and ISA bus drivers match hint devices to
BIOS-enumerated devices:
- Assume a device is a match if the memory and I/O ports match even if the
  IRQ or DRQ is wrong or missing.  Some BIOSes don't include an IRQ for
  the atrtc device for example.
- Add a hack to better match floppy controller devices.  Many BIOSes do not
  include the starting port of the floppy controller listed in the hints
  (0x3f0) in the resources for the device.  So far, however, all the BIOS
  variations encountered do include the 'port + 2' resource (0x3f2), so
  adjust the matching for "fdc" devices to look for 'port + 2'.

Reviewed by:	imp
MFC after:	3 days

Revision 1.265.2.2: download - view: text, markup, annotated - select for diffs
Thu Aug 20 20:23:28 2009 UTC (2 years, 5 months ago) by jhb
Branches: RELENG_8
Diff to: previous 1.265.2.1: preferred, colored; branchpoint 1.265: preferred, colored
Changes since revision 1.265.2.1: +12 -2 lines
SVN rev 196405 on 2009-08-20 20:23:28Z by jhb

MFC 196403: Temporarily revert the new-bus locking for 8.0 release.

Approved by:	re (kib)

Revision 1.266: download - view: text, markup, annotated - select for diffs
Thu Aug 20 19:17:53 2009 UTC (2 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +12 -2 lines
SVN rev 196403 on 2009-08-20 19:17:53Z by jhb

Temporarily revert the new-bus locking for 8.0 release.  It will be
reintroduced after HEAD is reopened for commits by re@.

Approved by:	re (kib), attilio

Revision 1.265.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)

Revision 1.265: download - view: text, markup, annotated - select for diffs
Sun Aug 2 14:28:40 2009 UTC (2 years, 6 months ago) by attilio
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +2 -12 lines
SVN rev 196037 on 2009-08-02 14:28:40Z by attilio

Make the newbus subsystem Giant free by adding the new newbus sxlock.
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.

Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.

For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.

Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.

Bump __FreeBSD_version in order to reflect the newbus lock introduction.

Reviewed by:    ed, hps, jhb, imp, mav, scottl
No answer by:   ariff, thompsa, yongari
Tested by:      pho,
                G. Trematerra <giovanni dot trematerra at gmail dot com>,
                Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by:   Yahoo! Incorporated
Approved by:	re (ksmith)

Revision 1.264: download - view: text, markup, annotated - select for diffs
Fri Jun 5 18:44:36 2009 UTC (2 years, 8 months ago) by jkim
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +6 -16 lines
SVN rev 193530 on 2009-06-05 18:44:36Z by jkim

Import ACPICA 20090521.

Revision 1.263: download - view: text, markup, annotated - select for diffs
Wed May 20 17:29:21 2009 UTC (2 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +3 -3 lines
SVN rev 192450 on 2009-05-20 17:29:21Z by imp

We no longer need to use d_thread_t, migrate to struct thread *.

Revision 1.243.2.5: download - view: text, markup, annotated - select for diffs
Mon May 4 21:04:29 2009 UTC (2 years, 9 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.243.2.4: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.2.4: +41 -0 lines
SVN rev 191799 on 2009-05-04 21:04:29Z by jhb

MFC: Expand the support for PCI-e memory mapped configuration space access.
Note that unlike in HEAD, this defaults to off and must be explicitly
enabled by setting the loader tunable hw.pci.mcfg=1.
- Add support for the Intel 915GM chipsets by reading the BAR.
- Add parsing of the ACPI MCFG table to discover memory mapped configuration
  access on modern machines.
- Port the memory mapped config acess to amd64.  On amd64 it uses the direct
  map.
- For config requests to busses not listed in ACPI's min/max valid buses,
  fall back to using type #1 configuration access instead.
- Add a workaround for some K8 chipsets that do not expose all devices on
  bus 0 via MCFG and fall back to type #1 for those devices instead.

Revision 1.262: download - view: text, markup, annotated - select for diffs
Thu Apr 30 18:00:53 2009 UTC (2 years, 9 months ago) by jkim
Branches: MAIN
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +1 -1 lines
SVN rev 191699 on 2009-04-30 18:00:53Z by jkim

Fix off-by-one bug.  S5 state must be checked as well.

Revision 1.261: download - view: text, markup, annotated - select for diffs
Thu Apr 30 17:45:43 2009 UTC (2 years, 9 months ago) by jkim
Branches: MAIN
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +2 -2 lines
SVN rev 191697 on 2009-04-30 17:45:43Z by jkim

Fix style(9).

Revision 1.260: download - view: text, markup, annotated - select for diffs
Thu Apr 30 17:42:11 2009 UTC (2 years, 9 months ago) by jkim
Branches: MAIN
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +29 -25 lines
SVN rev 191696 on 2009-04-30 17:42:11Z by jkim

Prefer device_printf() over printf() where ever possible.

Revision 1.259: download - view: text, markup, annotated - select for diffs
Thu Apr 30 17:35:44 2009 UTC (2 years, 9 months ago) by jkim
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +110 -68 lines
SVN rev 191695 on 2009-04-30 17:35:44Z by jkim

General sleep state change clean up.

- Probe supported sleep states from acpi_attach() just once and do not
call AcpiGetSleepTypeData() again.  It is redundant because
AcpiEnterSleepStatePrep() does it any way.
- Treat UNKNOWN sleep state as NONE, i.e., "do nothing", and remove obscure
NONE state (ACPI_S_STATES_MAX + 1) to avoid confusions.
- Do not set unsupported sleep states as default button/switch events.
If the default sleep state is not supported, just set it as UNKNOWN/NONE.
- Do not allow sleep state change if the system is not fully up and running.
This should prevent entering S5 state multiple times, which causes strange
behaviours later.
- Make sleep states case-insensitive when they are used with sysctl(8).
For example,

	sysctl hw.acpi.lid_switch_state=s1
	sysctl hw.acpi.sleep_button_state=none

are now legal and equivalent to the uppercase ones.

Revision 1.258: download - view: text, markup, annotated - select for diffs
Tue Apr 28 11:56:54 2009 UTC (2 years, 9 months ago) by avg
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +67 -74 lines
SVN rev 191627 on 2009-04-28 11:56:54Z by avg

acpi: do not run resume/backout code when entering S0/S5 states

This change adds (possibly redundant) early check for invalid
state input parameter (including S0). Handling of S5 request
is reduced to simply calling shutdown_nice(). As a result
control flow of acpi_EnterSleepState is somewhat simplified
and resume/backout half of the function is not executed
for S5 (soft poweroff) request and invalid state requests.

Note: it seems that shutdown_nice may act as nop when initproc
is already initialized (to grab pid of 1), but init process is in
"pre-natal" state.

Tested by:	Fabian Keil <fk@fabiankeil.de>
Reviewed by:	njl, jkim
Approved by:	rpaulo

Revision 1.243.2.4.4.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.243.2.4: preferred, colored; next MAIN 1.243.2.5: preferred, colored
Changes since revision 1.243.2.4: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)

Revision 1.257: download - view: text, markup, annotated - select for diffs
Mon Mar 23 22:12:33 2009 UTC (2 years, 10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +21 -4 lines
SVN rev 190340 on 2009-03-23 22:12:33Z by jkim

Add a function to reset system time after resuming, which will be used
by amd64 shortly.  It can be turned off by setting "debug.acpi.reset_clock"
tunable to zero.

Revision 1.256: download - view: text, markup, annotated - select for diffs
Mon Mar 23 22:06:09 2009 UTC (2 years, 10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +34 -19 lines
SVN rev 190339 on 2009-03-23 22:06:09Z by jkim

Check whether devd is running before calling resume notifier and
reshuffle code to reduce unnecessary locking coverage.

Revision 1.255: download - view: text, markup, annotated - select for diffs
Tue Mar 17 00:48:11 2009 UTC (2 years, 10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +41 -12 lines
SVN rev 189903 on 2009-03-17 00:48:11Z by jkim

Initial suspend/resume support for amd64.

This code is heavily inspired by Takanori Watanabe's experimental SMP patch
for i386 and large portion was shamelessly cut and pasted from Peter Wemm's
AP boot code.

Revision 1.243.2.4.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.243.2.4: preferred, colored; next MAIN 1.243.2.5: preferred, colored
Changes since revision 1.243.2.4: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)

Revision 1.254: download - view: text, markup, annotated - select for diffs
Tue Nov 18 21:01:54 2008 UTC (3 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +86 -0 lines
SVN rev 185059 on 2008-11-18 21:01:54Z by jhb

Allow device hints to wire the unit numbers of devices.
- An "at" hint now reserves a device name.
- A new BUS_HINT_DEVICE_UNIT method is added to the bus interface.  When
  determining the unit number of a device, this method is invoked to
  let the bus driver specify the unit of a device given a specific
  devclass.  This is the only way a device can be given a name reserved
  via an "at" hint.
- Implement BUS_HINT_DEVICE_UNIT() for the acpi(4) and isa(4) bus drivers.
  Both of these busses implement this by comparing the resources for a
  given hint device with the resources enumerated by ACPI/PnPBIOS and
  wire a unit if the hint resources are a subset of the "real" resources.
- Use bus_hinted_children() for adding hinted devices on isa(4) busses
  now instead of doing it by hand.
- Remove the unit kludging from sio(4) as it is no longer necessary.

Prodding from:	peter, imp
OK'd by:	marcel
MFC after:	1 month

Revision 1.253: download - view: text, markup, annotated - select for diffs
Sun Nov 2 17:35:15 2008 UTC (3 years, 3 months ago) by imp
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +9 -4 lines
SVN rev 184563 on 2008-11-02 17:35:15Z by imp

Make the no driver stuff an ifdef.

Revision 1.214.2.12.4.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.214.2.12: preferred, colored; next MAIN 1.214.4.1: preferred, colored
Changes since revision 1.214.2.12: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)

Revision 1.243.2.4: download - view: text, markup, annotated - select for diffs
Tue Sep 16 20:07:08 2008 UTC (3 years, 4 months ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_2_BP, RELENG_7_1_BP
Branch point for: RELENG_7_2, RELENG_7_1
Diff to: previous 1.243.2.3: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.2.3: +4 -9 lines
SVN rev 183099 on 2008-09-16 20:07:08Z by jhb

MFC: Adjust the probe order further so that Host-PCI bridges are probed
in the same order that they used to be probed.  Now we just give CPUs a
rediculously high order to ensure they are last.

Approved by:	re (kib)

Revision 1.252: download - view: text, markup, annotated - select for diffs
Sat Aug 23 16:38:20 2008 UTC (3 years, 5 months ago) by imp
Branches: MAIN
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +9 -4 lines
SVN rev 182071 on 2008-08-23 16:38:20Z by imp

Handle errors from device_get_children.

Revision 1.251: download - view: text, markup, annotated - select for diffs
Fri Aug 22 02:14:23 2008 UTC (3 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +41 -0 lines
SVN rev 181987 on 2008-08-22 02:14:23Z by jhb

Extend the support for PCI-e memory mapped configuration space access:
- Rename pciereg_cfgopen() to pcie_cfgregopen() and expose it to the
  rest of the kernel.  It now also accepts parameters via function
  arguments rather than global variables.
- Add a notion of minimum and maximum bus numbers and reject requests for
  an out of range bus.
- Add more range checks on slot/func/reg/bytes parameters to the cfg reg
  read/write routines.  Don't panic on any invalid parameters, just fail
  the request (writes do nothing, reads return -1).  This matches the
  behavior of the other cfg mechanisms.
- Port the memory mapped configuration space access to amd64.  On amd64
  we simply use the direct map (via pmap_mapdev()) for the memory mapped
  window.
- During acpi_attach() just after loading the ACPI tables, check for a
  MCFG table.  If it exists, call pciereg_cfgopen() on each subtable
  (memory mapped window).  For now we only support windows for domain 0
  that start with bus 0.  This removes the need for more chipset-specific
  quirks in the MD code.
- Remove the chipset-specific quirks for the Intel 5000P/V/Z chipsets
  since these machines should all have MCFG tables via ACPI.
- Updated pci_cfgregopen() to DTRT if ACPI had invoked pcie_cfgregopen()
  earlier.

MFC after:	2 weeks

Revision 1.250: download - view: text, markup, annotated - select for diffs
Mon Aug 4 19:45:15 2008 UTC (3 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +1 -1 lines
SVN rev 181299 on 2008-08-04 19:45:15Z by jhb

Fix a typo.

Revision 1.249: download - view: text, markup, annotated - select for diffs
Wed Jul 23 15:13:06 2008 UTC (3 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +4 -9 lines
SVN rev 180760 on 2008-07-23 15:13:06Z by jhb

Further refine the probe order of devices to more closely match the previous
behavior.  Specifically, probe Host-PCI bridges in the order they are
encountered in the tree.  For CPUs, just use an order of 100000 and assume
that no Host-PCI bridges will be more than 10000 levels deep in the
namespace.  This fixes an issue on some boxes where the HPET timer stopped
attaching.

Revision 1.243.2.3: download - view: text, markup, annotated - select for diffs
Thu Jul 10 17:06:54 2008 UTC (3 years, 7 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.243.2.2: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.2.2: +11 -18 lines
SVN rev 180432 on 2008-07-10 17:06:54Z by jhb

MFC: After probing the available frequency settings, restore the CPU to run
at whatever frequency it started at.

Revision 1.243.2.2: download - view: text, markup, annotated - select for diffs
Fri Jun 27 03:49:22 2008 UTC (3 years, 7 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.243.2.1: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.2.1: +22 -6 lines
SVN rev 180056 on 2008-06-27 03:49:22Z by jhb

MFC: Probe CPUs after the PCI hierarchy on i386, amd64, and ia64.  This
allows the cpufreq drivers to reliably use properties of PCI devices for
quirks, etc.

Revision 1.248: download - view: text, markup, annotated - select for diffs
Mon Apr 7 18:35:11 2008 UTC (3 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +11 -18 lines
Revert back to probing Host-PCI bridges in the order we encounter them in
the tree rather than sorting them by their address on PCI bus 0.

Reported by:	kan

Revision 1.247: download - view: text, markup, annotated - select for diffs
Thu Mar 13 20:39:03 2008 UTC (3 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +38 -45 lines
Rework how the nexus(4) device works on x86 to better handle the idea of
different "platforms" on x86 machines.  The existing code already handles
having two platforms: ACPI and legacy.  However, the existing approach was
rather hardcoded and difficult to extend.  These changes take the approach
that each x86 hardware platform should provide its own nexus(4) driver (it
can inherit most of its behavior from the default legacy nexus(4) driver)
which is responsible for probing for the platform and performing
appropriate platform-specific setup during attach (such as adding a
platform-specific bus device).  This does mean changing the x86 platform
busses to no longer use an identify routine for probing, but to move that
logic into their matching nexus(4) driver instead.
- Make the default nexus(4) driver in nexus.c on i386 and amd64 handle the
  legacy platform.  It's probe routine now returns BUS_PROBE_GENERIC so it
  can be overriden.
- Expose a nexus_init_resources() routine which initializes the various
  resource managers so that subclassed nexus(4) drivers can invoke it from
  their attach routine.
- The legacy nexus(4) driver explicitly adds a legacy0 device in its
  attach routine.
- The ACPI driver no longer contains an new-bus identify method.  Instead
  it exposes a public function (acpi_identify()) which is a probe routine
  that the MD nexus(4) drivers can use to probe for ACPI.  All of the
  probe logic in acpi_probe() is now moved into acpi_identify() and
  acpi_probe() is just a stub.
- On i386 and amd64, an ACPI-specific nexus(4) driver checks for ACPI via
  acpi_identify() and claims the nexus0 device if the probe succeeds.  It
  then explicitly adds an acpi0 device in its attach routine.
- The legacy(4) driver no longer knows anything about the acpi0 device.
- On ia64 if acpi_identify() fails you basically end up with no devices.
  This matches the previous behavior where the old acpi_identify() would
  fail to add an acpi0 device again leaving you with no devices.

Discussed with:	imp
Silence on:	arch@

Revision 1.246: download - view: text, markup, annotated - select for diffs
Mon Mar 10 22:18:07 2008 UTC (3 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +22 -6 lines
Probe CPUs after the PCI hierarchy on i386, amd64, and ia64.  This allows
the cpufreq drivers to reliably use properties of PCI devices for quirks,
etc.
- For the legacy drivers, add CPU devices via an identify routine in the
  CPU driver itself rather than in the legacy driver's attach routine.
- Add CPU devices after Host-PCI bridges in the acpi bus driver.
- Change the ichss(4) driver to use pci_find_bsf() to locate the ICH and
  check its device ID rather than having a bogus PCI attachment that only
  checked for the ID in probe and always failed.  As a side effect, you
  can now kldload ichss after boot.
- Fix the ichss(4) driver to use the correct device_t for the ICH (and not
  for ichss0) when doing PCI config space operations to enable SpeedStep.

MFC after:	2 weeks
Reviewed by:	njl, Andriy Gapon  avg of icyb.net.ua

Revision 1.243.4.1: download - view: text, markup, annotated - select for diffs
Wed Feb 6 03:35:40 2008 UTC (4 years ago) by iwasaki
Branches: RELENG_7_0
CVS tags: RELENG_7_0_0_RELEASE
Diff to: previous 1.243: preferred, colored; next MAIN 1.244: preferred, colored
Changes since revision 1.243: +10 -0 lines
MFC revision:	subr_bus.c:1.204,  bus.h:1.79, acpi.c:1.244

o Add devctl_process_running() so that power management system driver
  can check whether devd(8) is running.
o Enter the sleep state immediately without waiting for timeout if
  devd(8) is not running such as the system in single user mode.

Approved by:	re (kensmith)

Revision 1.243.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 6 01:38:04 2008 UTC (4 years ago) by iwasaki
Branches: RELENG_7
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +10 -0 lines
MFC revistion:	1.244

Enter the sleep state immediately without waiting for timeout if
devd(8) is not running such as the system in single user mode.

Approved by:	re (kensmith)

Revision 1.245: download - view: text, markup, annotated - select for diffs
Mon Jan 28 01:57:48 2008 UTC (4 years ago) by iwasaki
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +6 -2 lines
Return errno value rather than boolean in this context.

MFC after:	1 week

Revision 1.244: download - view: text, markup, annotated - select for diffs
Sun Jan 27 16:11:04 2008 UTC (4 years ago) by iwasaki
Branches: MAIN
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +6 -0 lines
Enter the sleep state immediately without waiting for timeout if
devd(8) is not running such as the system in single user mode.

MFC after:	1 week

Revision 1.214.2.12: download - view: text, markup, annotated - select for diffs
Thu Nov 8 21:22:20 2007 UTC (4 years, 3 months ago) by njl
Branches: RELENG_6
CVS tags: RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3
Branch point for: RELENG_6_4
Diff to: previous 1.214.2.11: preferred, colored; branchpoint 1.214: preferred, colored; next MAIN 1.215: preferred, colored
Changes since revision 1.214.2.11: +4 -4 lines
MFC: improve HPET table probe and give it a lower priority as a timer,
fix divide by zero if battery status invalid

Approved by:	re

Revision 1.243: download - view: text, markup, annotated - select for diffs
Tue Oct 9 07:48:07 2007 UTC (4 years, 4 months ago) by njl
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_0_BP
Branch point for: RELENG_7_0, RELENG_7
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +4 -4 lines
Fix the HPET table probe routine to run from device_identify() instead
of directly from acpi0.  Before it would attach prior to the sysresource
devices, causing the later allocation of its memory range to fail and
print a warning like "acpi0: reservation of fed00000, 1000 (3) failed".
Use an explicit define for our probe order base value of 10.

Help from:	jhb
Tested by:	Abdullah Ibn Hamad Al-Marri <almarrie / gmail.com>
MFC after:	3 days
Approved by:	re

Revision 1.242: download - view: text, markup, annotated - select for diffs
Thu Sep 13 01:37:17 2007 UTC (4 years, 4 months ago) by njl
Branches: MAIN
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +10 -0 lines
Reject requests to start or ack a suspend sequence on platforms that do not
support suspend/resume, currently all except i386.

Tested by:	jkim
Approved by:	re

Revision 1.241: download - view: text, markup, annotated - select for diffs
Sat Jun 30 17:27:31 2007 UTC (4 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +4 -0 lines
My previous commit introduced a spurious warning for the case where a
switch (i.e. lid) is set to have an action of NONE.  This is not an
invalid state, so silently return.  This fixes the warning:
"acpi: request to enter state S6 failed (err 22)"

Approved by:	re

Revision 1.240: download - view: text, markup, annotated - select for diffs
Thu Jun 21 22:50:37 2007 UTC (4 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +179 -12 lines
Update the suspend/resume user API while maintaining backwards compat.

Improvements:
* /etc/rc.suspend,rc.resume are always run, no matter the source of the
  suspend request (user or kernel, apm or acpi)
* suspend now requires positive user acknowledgement.  If a user program
  wants to cancel the suspend, they can.  If one of the user programs
  hangs or doesn't respond within 10 seconds, the system suspends anyway.
* /dev/apm is clonable, allowing multiple listeners for suspend events.
  In the future, xorg-server can use this to be informed about suspend
  even if there are other listeners (i.e. apmd).

Changes:
* Two new ACPI ioctls:  REQSLPSTATE and ACKSLPSTATE.  Request begins the
  process of suspending by notifying all listeners.  acpi is monitored by
  devd(8) and /dev/apm listener(s) are also counted.  Users register their
  approval or disapproval via Ack.  If anyone disapproves, suspend is vetoed.
* Old user programs or kernel modules that used SETSLPSTATE continue to
  work.  A message is printed once that this interface is deprecated.
* acpiconf gains the -k flag to ack the suspend request.  This flag is
  undocumented on purpose since it's only used by /etc/rc.suspend.  It is
  not intended to be a permanent change and will be removed once a better
  power API is implemented.
* S5 (power off) is no longer supported via acpiconf -s 5 or apm -z/-Z.
  This restores previous behavior of halt/shutdown -p being the interface.
* Miscellaneous improvements to error reporting

Approved by:	re

Revision 1.214.2.11: download - view: text, markup, annotated - select for diffs
Sun Jun 17 17:28:41 2007 UTC (4 years, 7 months ago) by njl
Branches: RELENG_6
Diff to: previous 1.214.2.10: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.10: +1 -0 lines
MFC: add hooks for HPET missed in previous commit

Revision 1.239: download - view: text, markup, annotated - select for diffs
Fri Jun 15 18:02:33 2007 UTC (4 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +2 -2 lines
Convert magic to a uintptr_t.  This should get rid of some warnings on
gcc4.

Revision 1.214.2.10: download - view: text, markup, annotated - select for diffs
Sat May 26 00:48:55 2007 UTC (4 years, 8 months ago) by njl
Branches: RELENG_6
Diff to: previous 1.214.2.9: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.9: +8 -0 lines
MFC: add the debug.acpi.suspend_bounce sysctl.

Revision 1.238: download - view: text, markup, annotated - select for diffs
Fri May 25 05:26:21 2007 UTC (4 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +8 -0 lines
Add a sysctl, 'debug.acpi.suspend_bounce', that causes the system to bounce
back in a simulated resume instead of entering the requested suspend state.
This helps in testing drivers separately from the acpi suspend code.  To
test your drivers, set debug.acpi.suspend_bounce=1 and then run
acpiconf -s3 (or 4).

MFC after:	1 day

Revision 1.237: download - view: text, markup, annotated - select for diffs
Tue May 15 08:41:05 2007 UTC (4 years, 8 months ago) by takawata
Branches: MAIN
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +1 -0 lines
Add ACPI HPET table support.

Reviewed by:njl

Revision 1.236: download - view: text, markup, annotated - select for diffs
Tue May 8 14:31:49 2007 UTC (4 years, 9 months ago) by marks
Branches: MAIN
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +2 -2 lines
Set the debug.acpi.acpi_ca_version sysctl even if ACPI support is not
available.

Revision 1.235: download - view: text, markup, annotated - select for diffs
Wed Apr 25 16:22:18 2007 UTC (4 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +1 -1 lines
Use a tighter check to see if a resource allocation request is for a
specific request and thus should first try to be allocated from the
sys_resource pool.  This avoids using the sys_resource pool for wildcard
requests that have bounded ranges coming from cbb(4) and Host-PCI pcib(4)
drivers.

Tested by:	Andrea Bittau <a.bittau of cs.ucl.ac.uk fame>
Sleuthing by:	Andrea Bittau as well

Revision 1.234: download - view: text, markup, annotated - select for diffs
Thu Mar 22 18:16:40 2007 UTC (4 years, 10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +96 -65 lines
Catch up with ACPI-CA 20070320 import.

Revision 1.233: download - view: text, markup, annotated - select for diffs
Wed Mar 21 15:39:11 2007 UTC (4 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +39 -55 lines
Change acpi's handling of suballocating system resources to be a little
simpler.  It now can just use rman_is_region_manager() during
acpi_release_resource() to see if the the resource is suballocated from
a system resource.  Also, the driver no longer needs MD knowledge about
how to setup bus space tags and handles when doing a suballocation, but
can simply rely on bus_activate_resource() in the parent setting all that
up.

Revision 1.232: download - view: text, markup, annotated - select for diffs
Tue Mar 20 20:21:44 2007 UTC (4 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +1 -1 lines
Tweak the probe/attach order of devices on the x86 nexus devices.
Various BIOS-related psuedo-devices are added at an order of 5.  acpi0 is
added at an order of 10, and legacy0 is added at an order of 11.

Revision 1.231: download - view: text, markup, annotated - select for diffs
Thu Feb 22 05:59:23 2007 UTC (4 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +1 -1 lines
Improve readability of the version string.

Revision 1.214.2.9: download - view: text, markup, annotated - select for diffs
Tue Jan 23 07:21:23 2007 UTC (5 years ago) by njl
Branches: RELENG_6
Diff to: previous 1.214.2.8: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.8: +2 -2 lines
MFC: support for separate CPU Cx idle states

Revision 1.230: download - view: text, markup, annotated - select for diffs
Sun Jan 7 21:53:42 2007 UTC (5 years, 1 month ago) by njl
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +2 -2 lines
Re-work Cx handling to be per-cpu and asymmetrical, fixing support on
modern dual-core systems as well.

- Parse the _CST packages for each cpu and track all the states individually,
on a per-cpu basis.

- Revert to generic FADT/P_BLK based Cx control if the _CST package
is not present on all cpus. In that case, the new driver will
still support per-cpu Cx state handling. The driver will determine the
highest Cx level that can be supported by all the cpus and configure the
available Cx state based on that.

- Fixed the case where multiple cpus in the system share the same
registers for Cx state handling. To do that, added a new flag
parameter to the acpi_PkgGas and acpi_bus_alloc_gas functions that
enable the caller to add the RF_SHAREABLE flag.  This flag could also be
useful to other callers (acpi_throttle?) in the tree but this change is
not yet made.

- For Core Duo cpus, both cores seems to be taken out of C3 state when
any one of the cores need to transition out. This broke the short sleep
detection logic.  It is disabled now if there is more than one cpu in
the system for now as it fixed it in my case.  This quirk may need to
be re-enabled later differently.

- Added support to control cx_lowest on a per-cpu basis. There is still
a generic cx_lowest to enable changing cx_lowest for all cpus with a single
sysctl and for ease of use.  Sample output for the new sysctl:

dev.cpu.0.cx_supported: C1/1 C2/1 C3/57
dev.cpu.0.cx_lowest: C3
dev.cpu.0.cx_usage: 0.00% 43.16% 56.83%
dev.cpu.1.cx_supported: C1/1 C2/1 C3/57
dev.cpu.1.cx_lowest: C3
dev.cpu.1.cx_usage: 0.00% 45.65% 54.34%
hw.acpi.cpu.cx_lowest: C3

This work was done by Stephane E. Potvin with some simple reworking by
myself.  Thank you.

Submitted by:	Stephane E. Potvin <sepotvin / videotron.ca>
MFC after:	2 weeks

Revision 1.214.2.8: download - view: text, markup, annotated - select for diffs
Wed Oct 4 19:08:23 2006 UTC (5 years, 4 months ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Diff to: previous 1.214.2.7: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.7: +1 -1 lines
MFC: Fix sign bug in acpi_release_resource().

Approved by:	re (mux)

Revision 1.229: download - view: text, markup, annotated - select for diffs
Thu Sep 21 18:56:03 2006 UTC (5 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +1 -1 lines
Fix a sign bug in acpi_release_resource().  acpi_sysres_find() returns !=
NULL if the specified resource is a sub-alloc of a system resource.

Revision 1.214.2.7: download - view: text, markup, annotated - select for diffs
Tue Sep 19 19:08:52 2006 UTC (5 years, 4 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.214.2.6: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.6: +2 -2 lines
MFC: Give the ACPI I/O rman's unique description strings.

Approved by:	re (bmah)

Revision 1.228: download - view: text, markup, annotated - select for diffs
Mon Sep 11 19:32:54 2006 UTC (5 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +2 -2 lines
Give the ACPI I/O rman's unique description strings to make 'devinfo -u'
output less confusing.

MFC after:	3 days

Revision 1.214.2.6: download - view: text, markup, annotated - select for diffs
Wed Aug 2 07:21:24 2006 UTC (5 years, 6 months ago) by njl
Branches: RELENG_6
Diff to: previous 1.214.2.5: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.5: +5 -1 lines
MFC: add control of thermal zone setpoints, add sysctl to enable ACPI-based
rebooting, fix sysctl printing of negative decimals, document it all.

Revision 1.227: download - view: text, markup, annotated - select for diffs
Sat Jul 29 21:46:16 2006 UTC (5 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +5 -1 lines
Add a new sysctl, hw.acpi.handle_reboot.  If set, acpi will attempt to
perform the reboot action via the reset register instead of our legacy
method.  Default is 0 (use legacy).  This is needed because some systems
hang on reboot even though they claim to support the reset register.

MFC after:	2 days

Revision 1.214.2.5: download - view: text, markup, annotated - select for diffs
Sun Jun 11 20:50:08 2006 UTC (5 years, 8 months ago) by njl
Branches: RELENG_6
Diff to: previous 1.214.2.4: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.4: +31 -13 lines
MFC: reduce diffs to current and include changes to allow the
eventual acpi_dock MFC and enabling reset register support.

Revision 1.226: download - view: text, markup, annotated - select for diffs
Sun Jun 11 20:31:41 2006 UTC (5 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +13 -3 lines
By default, don't disable ACPI during reboot.  This appears to hang some
systems.  Introduce a new sysctl "hw.acpi.disable_on_reboot" that allows
users to re-enable the old behavior in case it's needed for some systems.
We never disable in the power-off path.

Original approach submitted by Alexander Logvinov <abuse@akavia.ru> with
reworking by Jung-uk Kim and myself.

Revision 1.225: download - view: text, markup, annotated - select for diffs
Sat Jun 10 08:04:38 2006 UTC (5 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +5 -7 lines
Minor sysctl cleanup.  The RW flag means read|write and so it is redundant
to add the RD flag.  Also, the debug node does not need to be writable.

Revision 1.214.2.4: download - view: text, markup, annotated - select for diffs
Mon Jun 5 15:19:59 2006 UTC (5 years, 8 months ago) by njl
Branches: RELENG_6
Diff to: previous 1.214.2.3: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.3: +11 -0 lines
MFC 1.220: Add support for reset_register rebooting.

Note that this is not the exact right place for this code since it runs
a little earlier than the normal reset SYSINIT.  However, it appears to
work fine and can be backed out if it causes problems.

Revision 1.224: download - view: text, markup, annotated - select for diffs
Tue May 16 14:36:22 2006 UTC (5 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +0 -1 lines
Since DELAY() was moved,  most <machine/clock.h> #includes have been
unnecessary.

Revision 1.214.2.3: download - view: text, markup, annotated - select for diffs
Thu May 11 17:41:00 2006 UTC (5 years, 9 months ago) by njl
Branches: RELENG_6
Diff to: previous 1.214.2.2: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.2: +25 -17 lines
MFC: sync up various changes from HEAD
* Improve sysresource probing
* Use CTR for the EC logging
* Remove unused variables
* Add an AML IO port blacklist, prints warning only for now
* Fallback to the RSDT if the XSDT is invalid in APIC probe

Revision 1.223: download - view: text, markup, annotated - select for diffs
Sun May 7 03:28:10 2006 UTC (5 years, 9 months ago) by njl
Branches: MAIN
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +25 -17 lines
Don't attach special devices in the order they appear in the AML tree.
If the embedded controller exists before the sysresource devices, for
example, it will be attached first.  Instead, let the normal device
order function work as we first desired. [1]

There still remained a problem where we couldn't allocate resources in
acpi0 that were passed up by the sysresource pseudo-devices.  These
devices had to probe/attach first to give their resources to acpi, then
acpi would allocate them before probing/attaching other devices.  To
work around this, we attach them from acpi_sysres_alloc().  A better
approach would be to implement multi-pass probe/attach in newbus but
that's a much bigger task.

Suggested by:	jhb [1]
Hardware from:	Centaur Technologies
MFC after:	1 week

Revision 1.222: download - view: text, markup, annotated - select for diffs
Thu Apr 20 04:21:27 2006 UTC (5 years, 9 months ago) by imp
Branches: MAIN
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +1 -0 lines
Set the rid for the resoruce obtained from rman_reserve_resource.

Revision 1.221: download - view: text, markup, annotated - select for diffs
Sat Apr 15 12:31:32 2006 UTC (5 years, 9 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +12 -2 lines
Import ACPI Dock Station support.  Note that this is still very young.
Additional detach implementaions (or maybe improvement) for other
deivce drivers is required.

Reviewed by:	njl, imp
MFC after:	1 week

Revision 1.220: download - view: text, markup, annotated - select for diffs
Wed Mar 29 06:30:47 2006 UTC (5 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +11 -0 lines
Add reset register support.  This is the only method to reboot some new
systems (blade servers).  On most systems, this is implemented as an IO
write to the SMI port and the BIOS generates the actual reset.

PR:		kern/94939
Submitted by:	dodell@ixsystems.com
Reviewed by:	jhb
MFC after:	3 weeks

Revision 1.219: download - view: text, markup, annotated - select for diffs
Mon Nov 7 21:52:06 2005 UTC (6 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +3 -3 lines
*sigh*  Revert stuff that wasn't supposed to be committed.  The
acpi_resource change was a minor nit offered as an early candidate for
the recent ACPICA import problem and the acpi.c change is one I need to
test still that makes the ordered probing of system devices actually work
as advertised (probe devices in order based on the type of device rather
than in the order we encounter them in the device tree).

Revision 1.218: download - view: text, markup, annotated - select for diffs
Mon Nov 7 21:48:44 2005 UTC (6 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +3 -3 lines
Work around at least one busted BIOS.  If we get a source index in a _PRT
entry that is not zero, assume that it is really a hard-wired IRQ (commonly
used for APIC routing) and not a source index.  In practice, we've only
ever seen source indices of 0 for legitimate non-hard-wired _PRT entries.

Reviewed by:	njl
Tested by:	Alex Lyashkov shadow at psoft dot net
MFC after:	2 weeks

Revision 1.214.2.2: download - view: text, markup, annotated - select for diffs
Mon Nov 7 09:53:22 2005 UTC (6 years, 3 months ago) by obrien
Branches: RELENG_6
CVS tags: RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Diff to: previous 1.214.2.1: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.1: +1 -1 lines
MFC: canonify the include of acpi.h.

Revision 1.217: download - view: text, markup, annotated - select for diffs
Tue Nov 1 22:44:07 2005 UTC (6 years, 3 months ago) by jkim
Branches: MAIN
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +7 -7 lines
Catch up with ACPI-CA 20051021 import

Revision 1.214.4.1: download - view: text, markup, annotated - select for diffs
Tue Oct 25 20:51:58 2005 UTC (6 years, 3 months ago) by njl
Branches: RELENG_6_0
CVS tags: RELENG_6_0_0_RELEASE
Diff to: previous 1.214: preferred, colored; next MAIN 1.215: preferred, colored
Changes since revision 1.214: +6 -1 lines
MFC rev 1.214.2.1: Don't disable PCI link devices even when they're !enabled

Approved by:	re (scottl)

Revision 1.214.2.1: download - view: text, markup, annotated - select for diffs
Tue Oct 25 20:51:25 2005 UTC (6 years, 3 months ago) by njl
Branches: RELENG_6
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +6 -1 lines
MFC rev 1.216: Don't disable PCI link devices even when they're !enabled

Approved by:	re (scottl)

Revision 1.216: download - view: text, markup, annotated - select for diffs
Sun Oct 23 00:28:39 2005 UTC (6 years, 3 months ago) by njl
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +6 -1 lines
Add a hack to get around PCI link devices that report "present" but not
"functional" (i.e., if they are disabled).  We should probe them anyway
since we may enable them later.

Tested by:	thompsa
MFC after:	3 days

Revision 1.215: download - view: text, markup, annotated - select for diffs
Sun Sep 11 18:39:01 2005 UTC (6 years, 5 months ago) by obrien
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +1 -1 lines
Canonize the include of acpi.h.

Revision 1.186.2.13: download - view: text, markup, annotated - select for diffs
Sun Jun 19 20:02:24 2005 UTC (6 years, 7 months ago) by dwhite
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.186.2.12: preferred, colored; branchpoint 1.186: preferred, colored; next MAIN 1.187: preferred, colored
Changes since revision 1.186.2.12: +1 -1 lines
MFC rev 1.214: Fix passthrough allocation case

Revision 1.214: download - view: text, markup, annotated - select for diffs
Fri Jun 3 20:12:12 2005 UTC (6 years, 8 months ago) by imp
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6_0_BP
Branch point for: RELENG_6_0, RELENG_6
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +1 -1 lines
In newbus land, ivars can only be accessed for direct child, or when
the driver has unholy private knowledge of its great-*cgrandchildren.
The ACPI allocation routine lacked such knowledge when it tried to do
a default allocation for all descendants, rather than just its
immeidate children, so would access grandchild's ivar in an unsafe
way.  This could lead to a panic when devices were present which had
no addresses setup by the BIOS, but which were later allocated in a
lazy manner via pci_alloc_map.  As such, only do the default
allocation adjustments for immediate children.  The manner that
acpi_sysres_find accesses the resource list, used later in
acpi_alloc_resource, is safe and proper so no additional test is
needed there.

This fixes a panic when probing an disabled ata controller on some
newer intel blades.

Reported by: dwhite

Revision 1.213: download - view: text, markup, annotated - select for diffs
Fri May 20 05:00:43 2005 UTC (6 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +4 -1 lines
If devclass_get_devices() returns success but a count of 0, free the
pointer.  If kernel malloc(0) returns a valid pointer, it needs to be
freed.  If it returns NULL, it's ok to free this also.

Submitted by:	pjd
Reviewed by:	imp, dfr
Obtained from:	Coverity Prevent

Revision 1.212: download - view: text, markup, annotated - select for diffs
Mon May 9 07:34:04 2005 UTC (6 years, 9 months ago) by marks
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +0 -3 lines
Simplify the ACPI taskqueue implementation. Use a thread queue type instead
of swi. This allows us to use the taskqueue_thread_* functions instead of
rolling our own. It also avoids a double trip through the queue.

Submitted by:	njl
Reviewed by:	sam

Revision 1.211: download - view: text, markup, annotated - select for diffs
Thu Apr 14 06:45:24 2005 UTC (6 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +4 -0 lines
Probe PCI link devices early so that we turn them all off via _DIS before
we start turning any of them back on again.  This works around a bug in
some BIOSen that alias two different link devices for APIC vs ATPIC modes
onto the same physical hardware link.

Submitted by:	njl
Tested by:	Antoine Brodin antoine dot brodin at laposte dot net

Revision 1.210: download - view: text, markup, annotated - select for diffs
Thu Mar 31 19:07:26 2005 UTC (6 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +3 -2 lines
Always free the returned env pointer even it doesn't indicate we're in
verbose mode.

Found by:	Coverity Prevent (via sam)

Revision 1.209: download - view: text, markup, annotated - select for diffs
Sun Mar 27 22:38:28 2005 UTC (6 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +3 -7 lines
Clean up resources properly if acpi_perf fails to attach.  First, change
acpi_bus_alloc_gas() to delete the resource it set if alloc fails.  Then,
change acpi_perf to delete the resource after releasing it if alloc fails.
This should make probe and attach both fully restartable if either fails.

Revision 1.208: download - view: text, markup, annotated - select for diffs
Sun Mar 27 03:37:43 2005 UTC (6 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +2 -0 lines
If a device_add_child fails (i.e. low memory situation), be sure to free
the unused ivars also.

Submitted by:	pjd
Obtained from:	Coverity Prevent analysis

Revision 1.207: download - view: text, markup, annotated - select for diffs
Tue Mar 22 20:00:57 2005 UTC (6 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +18 -0 lines
Add support for bus_delete_resource() and make acpi_bus_alloc_gas() do
this before setting a new resource.

Revision 1.206: download - view: text, markup, annotated - select for diffs
Fri Mar 18 11:57:44 2005 UTC (6 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +2 -2 lines
s/SLIST/STAILQ/
/imp/a\
pointy hat
.

Revision 1.186.2.12: download - view: text, markup, annotated - select for diffs
Wed Mar 2 09:26:43 2005 UTC (6 years, 11 months ago) by obrien
Branches: RELENG_5
CVS tags: RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.186.2.11: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.11: +3 -2 lines
MFC: fix SCM ID's.

Revision 1.205: download - view: text, markup, annotated - select for diffs
Wed Mar 2 09:22:34 2005 UTC (6 years, 11 months ago) by obrien
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +3 -2 lines
Fix SCM ID's.

Revision 1.204: download - view: text, markup, annotated - select for diffs
Fri Feb 25 22:01:58 2005 UTC (6 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +0 -2 lines
Remove unused variable.

Noticed by:	Coverity tool

Revision 1.186.2.11: download - view: text, markup, annotated - select for diffs
Fri Feb 25 21:43:37 2005 UTC (6 years, 11 months ago) by njl
Branches: RELENG_5
Diff to: previous 1.186.2.10: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.10: +42 -13 lines
MFC: Bring acpi up to -current except for the PCI link changes and add
the acpi_throttle cpufreq driver.

Revision 1.203: download - view: text, markup, annotated - select for diffs
Fri Feb 25 16:57:34 2005 UTC (6 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +5 -10 lines
Instead of assuming units of bytes, it seems more likely that this is
a bitfield.

Revision 1.202: download - view: text, markup, annotated - select for diffs
Wed Feb 23 03:20:00 2005 UTC (6 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +12 -0 lines
If a register width is less than 8, assume the BIOS author thought it was
in units of bytes and adjust accordingly.  This is found at least on the
Sony PCG-505BX.

Revision 1.201: download - view: text, markup, annotated - select for diffs
Thu Feb 17 19:00:14 2005 UTC (6 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +6 -2 lines
Check for the address space type first before validating it.  In particular,
we want to return EOPNOTSUPP for FFixedHW no matter what the address.

Submitted by:	Bruno Ducrot

Revision 1.200: download - view: text, markup, annotated - select for diffs
Sun Feb 13 20:10:28 2005 UTC (6 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +6 -2 lines
Allow users to manually override quirks with the tunable "debug.acpi.quirks".
Suggested by:	Jung-uk Kim

Revision 1.199: download - view: text, markup, annotated - select for diffs
Sat Feb 5 22:28:36 2005 UTC (7 years ago) by njl
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +19 -11 lines
Convert the acpi_bus_alloc_gas() and acpi_PkgGas() APIs to output the memory
type.  This is needed if the resource is to be released later.  The RID is
still also present, though less necessary since rman_get_rid() can be used
to obtain it from the resource.

Revision 1.186.2.10: download - view: text, markup, annotated - select for diffs
Sat Jan 29 19:52:39 2005 UTC (7 years ago) by njl
Branches: RELENG_5
Diff to: previous 1.186.2.9: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.9: +210 -3 lines
MFC: Enable power state support for ACPI and PCI devices for suspend and
resume.

Revision 1.186.2.9: download - view: text, markup, annotated - select for diffs
Thu Jan 27 20:55:11 2005 UTC (7 years ago) by njl
Branches: RELENG_5
Diff to: previous 1.186.2.8: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.8: +29 -22 lines
MFC v1.198: Probe devices from \ (root) since some systems put PCI link
devices there.  Since the new PCI irq routing code hasn't been MFCd yet,
this shouldn't affect any systems.

Revision 1.198: download - view: text, markup, annotated - select for diffs
Sat Jan 8 09:10:20 2005 UTC (7 years, 1 month ago) by njl
Branches: MAIN
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +26 -19 lines
In total violation of at least 4 sections in the ACPI spec, some systems
place device objects in \ (in this case, PCI links.)  Work around this by
starting our probe from \.  To avoid attaching system scope objects,
explicitly skip them.  (I think it's an ACPI-CA bug that \_SB and \_TZ have
device and thermal object types.)  Thanks to pjd@ for testing.

MFC after:	2 weeks

Revision 1.197: download - view: text, markup, annotated - select for diffs
Mon Dec 27 05:36:47 2004 UTC (7 years, 1 month ago) by njl
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +3 -3 lines
Remove trailing whitespace.

Revision 1.186.2.8: download - view: text, markup, annotated - select for diffs
Sun Dec 19 04:11:44 2004 UTC (7 years, 1 month ago) by marks
Branches: RELENG_5
Diff to: previous 1.186.2.7: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.7: +2 -1 lines
MFC 1.195: Enable the relaxed behavior for op regions and other workarounds for
           non-standard BIOSen.

Revision 1.186.2.7: download - view: text, markup, annotated - select for diffs
Wed Dec 8 06:31:18 2004 UTC (7 years, 2 months ago) by njl
Branches: RELENG_5
Diff to: previous 1.186.2.6: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.6: +6 -0 lines
MFC 1.196:  Hold Giant around DEVICE_SUSPEND/RESUME.

Revision 1.196: download - view: text, markup, annotated - select for diffs
Sun Dec 5 01:35:18 2004 UTC (7 years, 2 months ago) by njl
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +12 -0 lines
Grab Giant around calls to DEVICE_SUSPEND/RESUME in acpi_SetSleepState().
If we are resuming non-MPSAFE drivers, they need Giant held for them.
This may fix some obscure suspend/resume problems.  It has fixed keyrate
setting problems that were triggered by cardbus (MPSAFE) changing the
ordering for syscons resume (non-MPSAFE).  Also, add some asserts that
Giant is held in our suspend/resume and shutdown methods.

Found by:	iedowse
MFC after:	2 days

Revision 1.195: download - view: text, markup, annotated - select for diffs
Fri Dec 3 08:01:09 2004 UTC (7 years, 2 months ago) by njl
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +2 -1 lines
Enable the relaxed behavior for op regions and other workarounds for
non-standard BIOSen.  We used to implement this in local patches but
now that ACPI-CA has merged/re-implemented most of our fixes, they were
no longer needed and we just needed to turn this knob on.  Also, remove
an unnecessary cast.

Tested by:	phk

Revision 1.194: download - view: text, markup, annotated - select for diffs
Thu Dec 2 08:07:12 2004 UTC (7 years, 2 months ago) by njl
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +210 -3 lines
Turn ACPI and PCI devices off or to a lower power state in suspend and
back on again in resume.  Override the default of D3 with the value the
BIOS specifies in _SxD, if present.  Skip serial devices (PNP05xx) since
they seem to hang when set to D3 and may require special driver support.
Also, skip non-type 0 PCI devices (i.e., bridges) since our we don't yet
save/restore their config space and that seems to be necessary.

If this gives you trouble with suspend/resume, you can disable the new
ACPI and PCI power behavior separately with these tunables & sysctls:
    debug.acpi.do_powerstate
    hw.pci.do_powerstate

Approved by:	imp (pci)
Tested by:	acpi@ (numerous)

Revision 1.186.2.6: download - view: text, markup, annotated - select for diffs
Sun Nov 7 20:24:05 2004 UTC (7 years, 3 months ago) by njl
Branches: RELENG_5
Diff to: previous 1.186.2.5: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.5: +1 -1 lines
MFC: Bring most of ACPI up to HEAD.

Revision 1.186.2.5: download - view: text, markup, annotated - select for diffs
Fri Oct 15 16:02:43 2004 UTC (7 years, 3 months ago) by njl
Branches: RELENG_5
CVS tags: RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Diff to: previous 1.186.2.4: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.4: +2 -0 lines
MFC: Print flags options for acpi devices.

* Note, previous commit message should have been:
Set device description for devices that attach via isa_pnp_probe().

Approved by:	re (kensmith)

Revision 1.186.2.4: download - view: text, markup, annotated - select for diffs
Fri Oct 15 05:20:20 2004 UTC (7 years, 3 months ago) by njl
Branches: RELENG_5
Diff to: previous 1.186.2.3: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.3: +3 -0 lines
MFC: print flags values in device announcement.

Approved by:	re (kensmith)

Revision 1.193: download - view: text, markup, annotated - select for diffs
Wed Oct 13 07:29:29 2004 UTC (7 years, 3 months ago) by njl
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +1 -1 lines
Print before the footer, not after.

Revision 1.192: download - view: text, markup, annotated - select for diffs
Wed Oct 13 07:27:21 2004 UTC (7 years, 3 months ago) by njl
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +2 -0 lines
If flags are present, print them like ISA does.

MFC after:	1 day

Revision 1.191: download - view: text, markup, annotated - select for diffs
Tue Oct 12 21:33:08 2004 UTC (7 years, 3 months ago) by njl
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +3 -0 lines
Attach the device description for ISA devices on the ACPI bus.

MFC after:	1 day

Revision 1.190: download - view: text, markup, annotated - select for diffs
Tue Sep 21 17:19:38 2004 UTC (7 years, 4 months ago) by njl
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +1 -1 lines
Don't disable acpi in shutdown if we're panicing (panicstr != NULL).  This
may help with double panics.

Revision 1.186.2.3: download - view: text, markup, annotated - select for diffs
Tue Aug 31 05:26:37 2004 UTC (7 years, 5 months ago) by njl
Branches: RELENG_5
Diff to: previous 1.186.2.2: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.2: +82 -7 lines
MFC:  Rework sysresource allocation to merge all resources presented by
sysresource objects before allocating.  This includes adding a
bus_get_resource_list() method to all archs as well.  Includes:

    Revision  Changes    Path
    1.189     +82 -7     src/sys/dev/acpica/acpi.c
    1.31      +59 -115   src/sys/dev/acpica/acpi_resource.c
    1.81      +0 -2      src/sys/dev/acpica/acpivar.h

Approved by:	re (scottl)

Revision 1.189: download - view: text, markup, annotated - select for diffs
Mon Aug 23 16:28:42 2004 UTC (7 years, 5 months ago) by njl
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +82 -7 lines
Rework sysresource management.  Instead of having each sysresource object
hold its own values, pass them up to the parent (acpi0) and merge/uniq them
on the way.  After the namespace evaluation, acpi will reserve these
resources and manage them via rman before bus_generic_probe() and
bus_generic_attach().  This is necessary because some systems specify
conflicting resources in separate sysresource objects.  It's also cleaner
in that the interface between sysresource and acpi is now merely the parent's
resource list.  This code handles the following cases:

1. Unique resource:  add it to the parent via bus_set_resource().
2. New wholly contained in old:  discard new.
3. New tail overlaps old head:  grow old head downward.
   AND/OR
4. New head overlaps old tail:  grow old tail upward.

Tested by:	Pawel Worach <sajd_at_telia.com>
Tested by:	Radek Kozlowski <radek_at_raadradd.com>
MFC after:	5 days

Revision 1.186.2.2: download - view: text, markup, annotated - select for diffs
Thu Aug 19 19:15:30 2004 UTC (7 years, 5 months ago) by njl
Branches: RELENG_5
Diff to: previous 1.186.2.1: preferred, colored; branchpoint 1.186: preferred, colored
Changes since revision 1.186.2.1: +2 -2 lines
MFC: rev 1.188, Use original order in resuming.

Approved by:	re (scottl)

Revision 1.186.2.1: download - view: text, markup, annotated - select for diffs
Thu Aug 19 19:08:57 2004 UTC (7 years, 5 months ago) by njl
Branches: RELENG_5
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +6 -57 lines
MFC: Remove the ACPIIO_ENABLE and ACPIIO_DISABLE ioctls.  Includes:

  Revision     Path
  1.187        src/sys/dev/acpica/acpi.c
  1.11         src/sys/dev/acpica/acpiio.h
  1.80         src/sys/dev/acpica/acpivar.h
  1.14         src/usr.sbin/acpi/acpiconf/acpiconf.8
  1.16         src/usr.sbin/acpi/acpiconf/acpiconf.c

Approved by:	re (scottl)

Revision 1.188: download - view: text, markup, annotated - select for diffs
Wed Aug 18 07:00:43 2004 UTC (7 years, 5 months ago) by njl
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +2 -2 lines
Call AcpiLeaveSleepState() before DEVICE_RESUME().  The former calls the
BFS and WAK methods, which are needed to initialize some devices before
the driver can resume them.  This was the original order.

MFC after:	2 days

Revision 1.187: download - view: text, markup, annotated - select for diffs
Wed Aug 18 05:48:24 2004 UTC (7 years, 5 months ago) by njl
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +6 -57 lines
Remove the ACPIIO_ENABLE and ACPIIO_DISABLE ioctls as well as all
callers.  These ioctls attempted to enable and disable the ACPI
interpreter at runtime.  In practice, it is not possible to boot with
ACPI and then disable it on many systems and trying to do so can cause
crashes, interrupt storms, etc.  Binary compatibility with userland is
retained.

MFC after:	2 days

Revision 1.186: download - view: text, markup, annotated - select for diffs
Fri Aug 13 06:21:32 2004 UTC (7 years, 5 months ago) by njl
Branches: MAIN
CVS tags: RELENG_5_BP
Branch point for: RELENG_5
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +79 -35 lines
MPSAFE locking

* Serialize calls to acpi_alloc_resource(), acpi_release_resource(),
  acpi_Enable(), acpi_Disable(), and acpi_debug_sysctl().
* Acquire the ACPI mutex in acpi_register_ioctl(), acpi_deregister_ioctl(),
  and acpiioctl().
* Acquire the mutex while disabling subsequent requests to enter a
  sleep state in acpi_SetSleepState().
* Be sure to re-enable sleep requests and don't run resume methods when
  the current request fails.
* Don't check if sleep requests are disabled in the ACPIIO_SETSLPSTATE
  ioctl.  acpi_SetSleepState() does this for us.
* Remove the acquisition of Giant from the struct cdevsw.
* Remove the ACPI_USE_THREADS option.

Revision 1.185: download - view: text, markup, annotated - select for diffs
Thu Aug 12 17:02:53 2004 UTC (7 years, 5 months ago) by njl
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +1 -1 lines
Allow null handles to be passed into acpi_name().

Revision 1.184: download - view: text, markup, annotated - select for diffs
Tue Aug 10 22:02:52 2004 UTC (7 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +10 -11 lines
Don't call DEVICE_RESUME a second time if DEVICE_SUSPEND fails.  The
bus_generic_suspend method does this for us.  Disable interrupts before
entering S1.  This may help some systems suspend to S1 successfully.

Revision 1.183: download - view: text, markup, annotated - select for diffs
Fri Aug 6 00:38:50 2004 UTC (7 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +3 -3 lines
Add flags for _STA (status) methods and convenience macros for checking
the presence of batteries and devices.

Revision 1.182: download - view: text, markup, annotated - select for diffs
Tue Aug 3 17:16:30 2004 UTC (7 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +0 -3 lines
Fix the ACPI_DEBUG case by removing a now unused variable.

Revision 1.181: download - view: text, markup, annotated - select for diffs
Tue Aug 3 14:14:53 2004 UTC (7 years, 6 months ago) by obrien
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +2 -0 lines
Initialize variables to fix kernel build on AMD64.

Revision 1.180: download - view: text, markup, annotated - select for diffs
Tue Aug 3 05:15:56 2004 UTC (7 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +0 -0 lines
Forced commit to note intended log message for previous revision:

Cleanup to prepare for locking commit.  Add comments, clarify printfs,
remove old unused locking macros.  Additional changes:

* Remove an old workaround for the bug in AcpiEnterSleepState() that
  caused it to return with the hardware mutex still held.  It no longer
  can fail this way.
* Remove ACPI_DEBUGGER checkpoints in the probe.  We have a reasonably
  stable probe/attach process now.
* Use an sbuf instead of sprintf/strcat for a sysctl.  Also, use strlcpy
  instead of a bzero/strncpy.
* Simplify acpi_name, acpi_Enable, and acpi_Disable.
* Don't bzero the softc

Revision 1.179: download - view: text, markup, annotated - select for diffs
Tue Aug 3 05:13:56 2004 UTC (7 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +69 -188 lines
/tmp/m

Revision 1.178: download - view: text, markup, annotated - select for diffs
Mon Jul 26 06:04:35 2004 UTC (7 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +0 -3 lines
Don't force an immediate probe/attach for all devices when compiled with
ACPI_DEBUG.  This upset the ordering that acpi_probe_order() was meant to
provide, causing devices to attach before the sysresource object.  This
debugging feature has been unnecessary for a while so just remove it.

Testing by:	marcel

Revision 1.177: download - view: text, markup, annotated - select for diffs
Thu Jul 15 16:29:08 2004 UTC (7 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +77 -11 lines
Update the interface for child drivers.  Add acpi_scan_children, which
allows a bus to re-enumerate its child handles and optionally replace
them with new children, arranged to the bus's liking.  (The current device
space is flat with all devices immediately under acpi0).  Add comments
for each interface.

Revision 1.176: download - view: text, markup, annotated - select for diffs
Tue Jul 13 18:59:49 2004 UTC (7 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +5 -7 lines
Clean up our pnpinfo and location strings.

Revision 1.175: download - view: text, markup, annotated - select for diffs
Tue Jul 13 17:57:41 2004 UTC (7 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +6 -8 lines
Call device_identify routines after doing the namespace walk.  This is
needed so that sysresource objects are created first to reserve all regions,
then other devices can allocate from them.  Otherwise, acpi_timer (the only
ACPI device with an identify routine), would allocate its resources from
the nexus, causing the later sysresource reserve to fail.

Debugging by:	Taku YAMAMOTO, Andrea Campi

Revision 1.174: download - view: text, markup, annotated - select for diffs
Thu Jul 1 17:21:18 2004 UTC (7 years, 7 months ago) by imp
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +0 -1 lines
After re-exporting rman, et al, __RMAN_RESOURCE_VISIBLE is no longer
necessary for this file.  It just needed the size and guts of struct
rman.

Revision 1.173: download - view: text, markup, annotated - select for diffs
Wed Jun 30 16:54:10 2004 UTC (7 years, 7 months ago) by imp
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +1 -0 lines
Hide struct resource and struct rman.  You must define
__RMAN_RESOURCE_VISIBLE to see inside these now.

Reviewed by: dfr, njl (not njr)

Revision 1.172: download - view: text, markup, annotated - select for diffs
Wed Jun 30 16:08:03 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +92 -107 lines
Move flags into a private ivar so it can't collide with device flags.
Unify the code to disable GPEs with the enable code.  Shutdown is handled
the same way.  ACPI now does all wake/sleep prep for child devices so
now they no longer need to call external functions in the suspend/resume
path.  Add the flags to non-ACPI busses (i.e., pci).

Revision 1.171: download - view: text, markup, annotated - select for diffs
Wed Jun 30 15:10:02 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +3 -6 lines
Diff reduction for style.

Revision 1.170: download - view: text, markup, annotated - select for diffs
Wed Jun 30 04:49:54 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +19 -74 lines
Add new quirk code that disables problem BIOS versions.  Remove old quirk
code that was never really used.  Print a message when disabling ACPI via
a quirk.  Allow the user to override the blacklist decision by setting
hint.acpi.0.disabled="0".  Add missing AcpiTerminate() calls; they are
needed to clean up if bailing out after AcpiInitializeSubsystem().

Revision 1.169: download - view: text, markup, annotated - select for diffs
Tue Jun 29 19:00:36 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +58 -5 lines
Add implementation of the ACPI methods which hands them off to ACPI-CA.
acpi_id_probe() returns NULL for no match or the ID string that matched
if the driver should attach.

Revision 1.168: download - view: text, markup, annotated - select for diffs
Tue Jun 29 01:33:35 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +2 -13 lines
Include isa/pnpvar.h and remove a duplicate copy of PNP_EISAID.

Revision 1.167: download - view: text, markup, annotated - select for diffs
Mon Jun 28 03:36:37 2004 UTC (7 years, 7 months ago) by imp
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +1 -1 lines
rman_reserve_resource doesn't set the bushandle, so we have to do it here.

Badness noted by: njl
Perforce reply not read by: imp

Revision 1.166: download - view: text, markup, annotated - select for diffs
Sun Jun 27 13:04:19 2004 UTC (7 years, 7 months ago) by imp
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +2 -3 lines
MFp4: Set the bus handle to the bus handle of the resource, not the
starting value.  This is more pedantically correct (since the handle
isn't always identical to the start of the resource) and also doesn't
access the innards of struct resource direct (which I forbid in my
tree).  We need to do this for all resource types, not just ioport.

Reviewed by: njl

Revision 1.165: download - view: text, markup, annotated - select for diffs
Thu Jun 24 00:48:45 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +11 -28 lines
Run the power off code directly instead of using indirection through
smp_rendezvous() to ensure we run on the BSP.  This reverts rev 1.128.
Add a comment indicating that MI code should be the one that runs all
shutdown functions on the BSP with the APs halted.  This should work
around problems in power off while waiting for the MI code to be improved.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Wed Jun 23 17:21:02 2004 UTC (7 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +47 -32 lines
- Defer BUS_CONFIG_INTR() on ACPI IRQ resources until the resources are
  actually used.  For most ACPI devices this means deferring the call
  until bus_alloc_resource().
  - Add a function acpi_config_intr() to call BUS_CONFIG_INTR() for an
    ACPI IRQ resource using the trigger mode and polarity information
    stored in the ACPI resource object.
  - Add a function acpi_lookup_irq_resource() to lookup the ACPI IRQ
    resource that corresponds to a specified rid and new-bus resource.
  - Have the ACPI PCI bridge driver call BUS_CONFIG_INTR() on interrupts
    that it routes through link devices.
- Remove needactivate variable from acpi_alloc_resource() by changing the
  function not modify the flags variable but just mask off RF_ACTIVE when
  calling rman_reserve_resource().

Reviewed by:	njl (1, an earlier version)

Revision 1.163: download - view: text, markup, annotated - select for diffs
Wed Jun 16 09:46:35 2004 UTC (7 years, 7 months ago) by phk
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +3 -3 lines
Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.

Revision 1.162: download - view: text, markup, annotated - select for diffs
Mon Jun 14 04:37:45 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +1 -30 lines
Remove disable_on_poweroff and our pre-sync shutdown handler.  Disabling
of GPEs is now done in acpi_shutdown() and so we no longer need the option
of disabling ACPI in the poweroff case.

Revision 1.161: download - view: text, markup, annotated - select for diffs
Mon Jun 14 04:01:12 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +19 -9 lines
Clean up acpi_probe_order() a bit and clarify some comments.

Revision 1.160: download - view: text, markup, annotated - select for diffs
Mon Jun 14 03:52:19 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +1 -2 lines
Don't probe/attach in the ACPI_DEBUG case.

Revision 1.159: download - view: text, markup, annotated - select for diffs
Sun Jun 13 22:52:30 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +137 -52 lines
Add support to ACPI to manage its own resources.  Previously, resource
allocation was passed up to nexus.  Now, we probe sysresource objects and
manage the resources they describe in a local rman pool.  This helps
devices which attach/detach varying resources (like the _CST object) and
module loads/unloads.  The allocation/release routines now check to see if
the resource is described in a child sysresource object and if so,
allocate from the local rman.  Sysresource objects add their resources to
the pool and reserve them upon boot.  This means sysresources need to be
probed before other ACPI devices.

Changes include:
* Add ordering to the child device probe.  The current order is:  system
resource objects, embedded controllers, then everything else.
* Make acpi_MatchHid take a handle instead of a device_t arg.
* Replace acpi_{get,set}_resource with the generic equivalents.

Revision 1.158: download - view: text, markup, annotated - select for diffs
Sun Jun 13 17:29:35 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +12 -0 lines
Associate a device_t with an ACPI_HANDLE.  This make AcpiWalkNamespace more
useful.  If ACPI-CA allowed null object handlers, we wouldn't need the
placeholder function.

Revision 1.157: download - view: text, markup, annotated - select for diffs
Sat Jun 5 09:56:04 2004 UTC (7 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +3 -0 lines
Don't forget to pass shutdown events down to children first now that we
handle them at the bus level too.

Revision 1.156: download - view: text, markup, annotated - select for diffs
Sat Jun 5 07:25:58 2004 UTC (7 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +11 -4 lines
Disable wake GPEs in the reboot path as well as poweroff path.  This fixes
"stray irq 9" messages on my Thinkpad.  It may also help with general
reboot consistency although the recent hang on reboot was solved by
acpi_cpu.c rev 1.39.

Revision 1.155: download - view: text, markup, annotated - select for diffs
Sun May 30 20:08:23 2004 UTC (7 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +1 -0 lines
Add missing <sys/module.h> includes

Revision 1.154: download - view: text, markup, annotated - select for diffs
Sat May 29 05:34:04 2004 UTC (7 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +2 -2 lines
Decrease sleep_delay default to 1 second now that the machines that
required the 5 second delay have been fixed.

Revision 1.153: download - view: text, markup, annotated - select for diffs
Fri May 28 07:16:52 2004 UTC (7 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +1 -1 lines
Now that we properly disable GPEs before entering a sleep state, including
S5 (soft off), we don't need to disable ACPI when powering off.  This may
fix some systems that don't power off correctly.

Revision 1.152: download - view: text, markup, annotated - select for diffs
Fri May 28 07:04:09 2004 UTC (7 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +62 -16 lines
Update the new suspend/resume GPE methods to properly limit the GPE
based on the destination sleep state.  Add a method to restore the old
state on resume.  This is needed for the case of suspending to a very low
state disabling a GPE (i.e. S4), resuming, and then suspending to a higher
state (i.e. S3).  This case should now keep the proper GPEs enabled.

Revision 1.151: download - view: text, markup, annotated - select for diffs
Fri May 28 06:32:16 2004 UTC (7 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +4 -4 lines
Pass a pointer to the sleep state instead of casting gymnastics to pass
the value itself in the pointer.

Revision 1.150: download - view: text, markup, annotated - select for diffs
Fri May 28 06:29:30 2004 UTC (7 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +1 -1 lines
Fix paste-o.

Revision 1.149: download - view: text, markup, annotated - select for diffs
Fri May 28 06:28:55 2004 UTC (7 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +52 -0 lines
Attach per-device sysctls to allow users to set whether or not a given
device can wake the system.  For example:

    dev.root0.nexus0.acpi0.acpi_lid0.wake: 1
    dev.root0.nexus0.acpi0.acpi_button0.wake: 1
    dev.root0.nexus0.acpi0.pcib0.wake: 0
    dev.root0.nexus0.acpi0.sio0.wake: 0

Revision 1.148: download - view: text, markup, annotated - select for diffs
Fri May 28 02:50:43 2004 UTC (7 years, 8 months ago) by marcel
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +2 -2 lines
Fix LP64 environments: cast a pointer type to intptr_t before casting
to int and vice versa.

Revision 1.147: download - view: text, markup, annotated - select for diffs
Thu May 27 18:38:45 2004 UTC (7 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +236 -120 lines
Restructure the wake GPE API.  Now there are three functions:

acpi_wake_init:
    Evaluate _PRW and set the GPE type
acpi_wake_set_enable:
    Enable or disable a device's GPE.
acpi_wake_sleep_prep:
    Perform any last-minute changes to the device to prepare it for
    entering the given sleep state.

Also, walk the entire namespace when transitioning to a sleep state,
disabling any GPEs which aren't appropriate for the given state.  Transition
acpi_lid and acpi_button to the new API.

This clears the way for non-ACPI-aware devices to wake the system (i.e.
modems) and fixes a problem where systems power up after shutdown when a
GPE is triggered.

Revision 1.146: download - view: text, markup, annotated - select for diffs
Tue May 25 02:47:35 2004 UTC (7 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +16 -17 lines
Changes to implement 20040514:

* Add calls to AcpiSetGpeType.  We use wake/run as the type for lid and
button switches since wake-only causes Thinkpads to immediately wake on
the second suspend.  Note that with wake/run, some systems return both
wake and device-specific notifies so we don't register for system notifies
for lid and button switches.
* Remove the hw.acpi.osi_method tunable since it is not needed.
* Always print unknown notifies for all types.
* Add more cleanup for the EC if it fails to attach.
* Use the GPE handle now that we parse it.  This allows GPEs to be defined
in AML GPE blocks.
* Always use ACPI_NOT_ISR since it's ok to acquire a mutex in our thread
which processes queued requests.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Thu May 6 08:04:34 2004 UTC (7 years, 9 months ago) by njl
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +16 -8 lines
Select the highest valid (i.e., S3) sleep state for the default for the
sleep button.  Change the default for the lid switch to NONE.  This can
be overridden in /etc/sysctl.conf as desired.

Revision 1.144: download - view: text, markup, annotated - select for diffs
Thu May 6 02:05:45 2004 UTC (7 years, 9 months ago) by njl
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +21 -15 lines
Fix setting debug strings via sysctl.  Also, clean up the way we print
debug strings.

Revision 1.143: download - view: text, markup, annotated - select for diffs
Mon Apr 26 08:49:11 2004 UTC (7 years, 9 months ago) by takawata
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +1 -1 lines
Fix build breakage.

Submitted by: Xin LI <delphij@frontfree.net>
PR: 65979

Revision 1.142: download - view: text, markup, annotated - select for diffs
Mon Apr 26 05:25:06 2004 UTC (7 years, 9 months ago) by njl
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +10 -6 lines
Move the call to AcpiEnterSleepStatePrep() to before we select the BSP
(cpuid 0) as the processor.  It mallocs some data and smp_rendezvous
calls functions with locks held.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:38:54 2004 UTC (7 years, 9 months ago) by njl
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +1 -1 lines
Remove extran parens.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:36:15 2004 UTC (7 years, 9 months ago) by njl
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +15 -0 lines
Move the timer difference convenience function from acpi_cpu.c to make it
globally available.  acpi_TimerDelta() subtracts two readings from the
ACPI PM timer and returns the difference.  It properly distinguishes between
24-bit and 32-bit timers and handles wraparound.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Fri Apr 16 16:27:37 2004 UTC (7 years, 9 months ago) by njl
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +1 -0 lines
Disable the new wake GPE behavior.  With it enabled, my laptop won't stay
suspended after the second try.  Intel is working on a fix to properly
differentiate the non-standard wake/runtime GPEs from wake-only GPEs.

Revision 1.138: download - view: text, markup, annotated - select for diffs
Wed Apr 14 17:48:33 2004 UTC (7 years, 9 months ago) by njl
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +5 -8 lines
Remove a non-variable static and move other static variables to the same
location.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Wed Apr 14 03:30:09 2004 UTC (7 years, 9 months ago) by njl
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +1 -2 lines
Use TRUE for a boolean and a style nit.

Revision 1.136: download - view: text, markup, annotated - select for diffs
Fri Apr 9 06:40:03 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +33 -26 lines
Add support for packages as the first element of _PRW.  This may allow
some machines to enable wake events for more devices although I haven't
seen a system yet that uses this form.  Also, introduce acpi_GetReference()
which retrieves an object reference from various types.

Revision 1.135: download - view: text, markup, annotated - select for diffs
Thu Apr 8 16:45:12 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +1 -1 lines
Unify on version 1 to be similar to the rest of the tree.  After 5-stable
branches, increment version on any API change visible to other modules.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Thu Apr 1 04:21:33 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +0 -76 lines
Move the ivar accessing routines back to inlines (reverting acpivar.h
rev 1.44 and acpi.c rev 1.96).  Now gcc can handle larger inlines and we
really need external drivers to be able to read their acpi ivars.

Revision 1.133: download - view: text, markup, annotated - select for diffs
Wed Mar 31 17:35:28 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +12 -18 lines
Staticize pnp methods, style fixes.  Remove unused variable to unbreak
kernel build.

Revision 1.132: download - view: text, markup, annotated - select for diffs
Wed Mar 31 17:23:46 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +1 -1 lines
Add an interface to pass an argument to the resource parsing functions.
This is just groundwork for changing sysresource behavior.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:

Revision 1.131: download - view: text, markup, annotated - select for diffs
Wed Mar 31 17:21:14 2004 UTC (7 years, 10 months ago) by takawata
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +49 -39 lines
Style fix.

Pointed out by: njl

Revision 1.130: download - view: text, markup, annotated - select for diffs
Tue Mar 30 07:35:18 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +14 -5 lines
Disable serialize_methods and enable _OSI support by default.  The former
is necessary because some IBMs use recursive methods (pointed out by
Robert Moore from Intel).  The latter was a typo on my part.  It was disabled
by default when it should have been enabled.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Sat Mar 27 16:26:00 2004 UTC (7 years, 10 months ago) by takawata
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +46 -0 lines
Add ACPI PnP string. This affects devinfo(8) output with -v option.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Fri Mar 19 07:05:01 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +35 -15 lines
Move the poweroff handler to a separate function.  Make sure it is run
on the boot processor (cpuid == 0).  Some chipsets do not power off the
system if the shutdown handler runs on an AP.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Thu Mar 18 18:42:22 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +19 -0 lines
Add tunables for disabling serialized method execution and disabling the
new _OSI method.  These can be used if these new features end up causing
regression for users.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Wed Mar 17 17:50:24 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +1 -1 lines
Convert callers to the new bus_alloc_resource_any(9) API.

Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde

Revision 1.125: download - view: text, markup, annotated - select for diffs
Tue Mar 9 05:44:47 2004 UTC (7 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +3 -1 lines
Simplify some logic in converting a buffer to an integer.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Tue Mar 9 05:41:28 2004 UTC (7 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +3 -3 lines
Use an unsigned int instead of an int for the Get/Set Integer interface.

Pointed out by:	le

Revision 1.123: download - view: text, markup, annotated - select for diffs
Thu Mar 4 04:42:59 2004 UTC (7 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +15 -5 lines
Add a "quirks" value to disable quirks handling for a given boot.
Also, disable quirks if booting with a custom DSDT.  Add a quirk
to disable loading ACPI so known bad systems can be completely
blacklisted.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Wed Mar 3 18:34:42 2004 UTC (7 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +19 -18 lines
Change to acpi_{Get,Set}Integer to provide both methods.  Convert all
callers to the new API.

Submitted by:	Mark Santcroos <marks@ripe.net>

Revision 1.121: download - view: text, markup, annotated - select for diffs
Wed Mar 3 03:02:16 2004 UTC (7 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +77 -16 lines
Add support for quirks for acpi tables.  Key off OEM vendor and revision.
Sort acpi debug values.  Change "disable" to "disabled" to match rest of
the kernel.  Remove debugging from acpi_toshiba since it was only used for
probe/attach.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Sat Feb 21 21:10:39 2004 UTC (7 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +2 -0 lines
Device megapatch 4/6:

Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Sat Feb 21 19:42:50 2004 UTC (7 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +0 -2 lines
Device megapatch 1/6:

Free approx 86 major numbers with a mostly automatically generated patch.

A number of strategic drivers have been left behind by caution, and a few
because they still (ab)use their major number.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Thu Feb 19 18:20:03 2004 UTC (7 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +3 -3 lines
Use ACPI_NEXT_RESOURCE instead of defining our own copy.  The one provided
with ACPI-CA is identical now.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Thu Feb 19 05:35:20 2004 UTC (7 years, 11 months ago) by njl
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +0 -2 lines
Fix problem caused by previous commit where some users' buttons
stopped returning events.  Don't disable the event when removing
the handler because it still needs to be enabled for the other
handler.  Also, remove duplicate AcpiEnableEvent calls since the
install function now does this for us.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Wed Feb 11 02:57:33 2004 UTC (8 years ago) by njl
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +6 -8 lines
Prefer buttons defined in the AML over the ones in the FADT.  Some
systems define power/sleep buttons in both places but only deliver
notifies to the ones defined in the AML.

Also, reduce length of various function handler names.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:

Revision 1.115: download - view: text, markup, annotated - select for diffs
Wed Jan 28 07:48:03 2004 UTC (8 years ago) by roam
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +2 -0 lines
Add an ACPI_FUNCTION_TRACE() to the newly-added acpi_Startup() routine
to get the ACPI_DEBUG case (and LINT in particular) to build.

Reviewed by:	jhb, njl
Approved by:	jhb

Revision 1.114: download - view: text, markup, annotated - select for diffs
Mon Jan 26 19:29:03 2004 UTC (8 years ago) by jhb
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +41 -24 lines
Move the code to initialize ACPI-CA into a separate acpi_Startup() function
that other modules can call to initialize ACPI-CA before the new-bus probe
and change acpi_identify() to call it.

Reviewed by:	njl

Revision 1.113: download - view: text, markup, annotated - select for diffs
Fri Jan 9 21:04:28 2004 UTC (8 years, 1 month ago) by njl
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +11 -3 lines
Clean up the acpi announce message of trailing spaces.

Revision 1.108.2.2: download - view: text, markup, annotated - select for diffs
Mon Dec 29 15:48:16 2003 UTC (8 years, 1 month ago) by jhb
Branches: RELENG_5_2
CVS tags: RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE
Diff to: previous 1.108.2.1: preferred, colored; branchpoint 1.108: preferred, colored; next MAIN 1.109: preferred, colored
Changes since revision 1.108.2.1: +3 -3 lines
MFC: Fix acpi_MatchHid() to check compatability IDs.

Approved by:	re (scottl)

Revision 1.112: download - view: text, markup, annotated - select for diffs
Fri Dec 26 15:42:13 2003 UTC (8 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +3 -3 lines
Fix acpi_MatchHid() to check the compatibility ID's if the hardware ID
doesn't match.

Submitted by:	marcel

Revision 1.111: download - view: text, markup, annotated - select for diffs
Tue Dec 23 18:47:31 2003 UTC (8 years, 1 month ago) by njl
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +15 -10 lines
Fix locking broken by recent _CID changes.  Always be sure to unlock
in the error case.

Revision 1.108.2.1: download - view: text, markup, annotated - select for diffs
Fri Dec 19 00:03:02 2003 UTC (8 years, 1 month ago) by njl
Branches: RELENG_5_2
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +98 -50 lines
MFC:  Add support for _CID package types and use dynamic storage for
all of our devinfo structs.

Revisions:	acpi.c:1.110; acpi_pcib.c:1.35,1.36; acpi_pci_link.c:1.11

Approved by:	re (scottl, in a new record time)

Revision 1.110: download - view: text, markup, annotated - select for diffs
Thu Dec 18 03:25:22 2003 UTC (8 years, 1 month ago) by njl
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +98 -50 lines
Add support for multiple CIDs since _CID can contain a package of values.
Implement this in acpi_MatchHid() and acpi_isa_get_compatid().  This
should fix mouse support for some users.

Move all users of AcpiGetObjectInfo() to use dynamic storage instead of
a devinfo on the stack.  This is necessary since ACPI-CA needs to
allocate different sized arrays for the CompatList.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Tue Dec 9 06:29:57 2003 UTC (8 years, 2 months ago) by njl
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +12 -13 lines
Use sbufs instead of snprintf for parsing debug strings.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Wed Nov 19 20:27:06 2003 UTC (8 years, 2 months ago) by njl
Branches: MAIN
CVS tags: RELENG_5_2_BP
Branch point for: RELENG_5_2
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +1 -0 lines
* Add a DEVMETHOD for acpi so that child detach methods get called.  Add
  an acpi_cpu method for shutdown that disables entry to acpi_cpu_idle
  and then IPIs/waits for threads to exit.  This fixes a panic late in
  reboot in the SMP case.

* In the !SMP case, don't use the processor id filled out by the MADT
  since there can only be one processor.  This was causing a panic in
  acpi_cpu_idle if the id was 1 since the data was being dereferenced from
  cpu_softc[1] even though the actual data was in cpu_softc[0] (which is
  correct).

* Rework the initialization functions so that cpu_idle_hook is written
  late in the boot process.

* Make the P_BLK, P_BLK_LEN, and cpu_cx_count all softc-local variables.
  This will help SMP boxes that have _CST or multiple P_BLKs.  No such
  boxes are known at this time.

* Always allocate the C1 state, even if the P_BLK is invalid.  This means
  we will always take over idling if enabled.  Remove the value -1 as
  valid for cx_lowest since this is redundant with machdep.cpu_idle_hlt.

* Reduce locking for the throttle initialization case to around the write
  to the smi_cmd port.  Add disabled code to write the CST_CNT.  It will
  be enabled once _CST re-evaluation is tested (post 5.2R).

Thank you:	dfr, imp, jhb, marcel, peter
Tested by:	rwatson, Harald Schmalzbauer <h@schmalzbauer.de>
Approved by:	re (rwatson)

Revision 1.107: download - view: text, markup, annotated - select for diffs
Sat Nov 15 19:18:29 2003 UTC (8 years, 2 months ago) by njl
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +28 -1 lines
Add acpi_bus_alloc_gas() for allocating a memory or IO resource from its
Generic Address Structure.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Sat Oct 25 05:03:24 2003 UTC (8 years, 3 months ago) by njl
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +22 -0 lines
Add devctl(4) notify support to ACPI.  Various subsystems now notify
userland whenever events occur.  See the example in devd.conf below
to see how to use it.

Revision 1.105: download - view: text, markup, annotated - select for diffs
Sun Oct 19 05:56:59 2003 UTC (8 years, 3 months ago) by njl
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +1 -0 lines
Disable irqs before entering the power-off state.  This is not known
to fix any problems but is similar to how Linux implements this
function.

Revision 1.104: download - view: text, markup, annotated - select for diffs
Fri Sep 26 21:22:10 2003 UTC (8 years, 4 months ago) by njl
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +63 -13 lines
Make debug.acpi.level and debug.acpi.layer sysctls that can be set with
the strings found in acpi(4).  Also make acpi_ca_version a string so it
is more readable.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Fri Sep 26 04:32:40 2003 UTC (8 years, 4 months ago) by njl
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +2 -3 lines
Sort debugging levels and update the man page to match reality.  Also
update man page to reflect iasl(8) import.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Thu Sep 18 05:12:45 2003 UTC (8 years, 4 months ago) by njl
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +2 -2 lines
Add necessary newlines.

Revision 1.101: download - view: text, markup, annotated - select for diffs
Thu Sep 18 05:01:03 2003 UTC (8 years, 4 months ago) by njl
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +2 -3 lines
Shorten the message announcing fixed power/sleep buttons.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Mon Sep 15 06:29:31 2003 UTC (8 years, 4 months ago) by njl
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +9 -4 lines
Only enable S4BIOS by default if the FACS says it is available.  The
user can override this with a sysctl.

Be sure to return the acpi_SetSleepState return value to userland.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Tue Sep 9 04:09:25 2003 UTC (8 years, 5 months ago) by njl
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +11 -10 lines
Disallow attempts to suspend to S0.  It was only enabled for testing.
Print a more informative message if a sleep state is not supported by BIOS.
Add comments.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Thu Sep 4 15:55:41 2003 UTC (8 years, 5 months ago) by njl
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +1 -1 lines
Don't free the buffer if it wasn't actually allocated.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Fri Aug 29 04:02:19 2003 UTC (8 years, 5 months ago) by njl
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +0 -1 lines
Use the ACPICA AcpiEnterSleepStateS4bios instead of rolling our own.  This
change also disables interrupts around non-S4 suspends whereas before we
did not do this.  Our version of AcpiEnterSleepStateS4bios was almost
identical to the ACPICA version.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Thu Aug 28 16:06:30 2003 UTC (8 years, 5 months ago) by njl
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +417 -360 lines
Style and whitespace changes.  Also, make the ivar functions non-inline
since inlining failed due to the size of BUS_*

Revision 1.95.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 22 20:49:20 2003 UTC (8 years, 5 months ago) by jhb
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11, RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Diff to: previous 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95: +28 -44 lines
MFC: FreeBSD OSPM ACPI driver.  Note that this driver does not include
support for PCI interrupt routing or enumeration of ISA bridges or
Host to PCI bridges.  While functional on some machines, this driver
should be considered experimental and should be tested prior to being
deployed in a production environment.

Sponsored by:	The Weather Channel

Revision 1.95: download - view: text, markup, annotated - select for diffs
Fri Aug 15 02:10:38 2003 UTC (8 years, 5 months ago) by njl
Branches: MAIN
Branch point for: RELENG_4
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +7 -1 lines
Fix a couple changes that were incorrect in updating for 0619.  Only unlock
the hardware mutex if it is held.  Re-add calls to Enable/Clear fixed events.

This is not known to have caused problems.  Bug symptoms might have included
instability after an aborted suspend attempt or power/sleep buttons not
being enabled.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Fri Aug 8 03:19:22 2003 UTC (8 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +6 -1 lines
Default to 5 seconds before sleeping to give some machines time to stabilize.
This doesn't break anything on my laptop and some claim it helps them.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Sun Jul 20 00:52:57 2003 UTC (8 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +2 -2 lines
Clarify the ACPI shutdown messages.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Sun Jul 20 00:48:38 2003 UTC (8 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +6 -0 lines
Add ECDT (ACPI 2.0) support.  This allows the EC to be enabled before the
namespace has been evaluated.  Machines with ACPI 2.0 expect this behavior
and have AML which calls EC functions early in the boot process.  If the
ECDT is not available, fall back to original probe behavior.

Other minor changes:
* Add GPE bit and GLK usage to the device announcement
* Always use the global lock in the ECDT case, but potentially downgrade to
  not using it if _GLK is 0 once the namespace is available.  This is
  announced with "Changing GLK from 1 to 0"
* Remove the acpi_object_list definitions which were earlier deprecated

Ideas from:	takawata

Revision 1.91: download - view: text, markup, annotated - select for diffs
Sun Jul 13 22:57:16 2003 UTC (8 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +22 -20 lines
Update code to work with 0619 dist

* Use ACPI_BUFFER as the type for AcpiGetObjectInfo
* Remove AcpiEnableEvent/AcpiClearEvent for ACPI_EVENT_FIXED (power/sleep
  buttons) as they are no longer needed
* Change calls to use the new GPE functions
* Add AcpiOs*Lock functions

Revision 1.90: download - view: text, markup, annotated - select for diffs
Wed Jul 2 16:09:00 2003 UTC (8 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +2 -5 lines
- Use the new resource_disabled() helper function to see if devices are
  disabled.
- Change the apm driver to match the acpi driver's behavior by checking to
  see if the device is disabled in the identify routine instead of in the
  probe routine.  This way if the device is disabled it is never created.

Note that a few places (ips(4), Alpha SMP) used "disable" instead of
"disabled" for their hint names, and these hints must be changed to
"disabled".  If this is a big problem, resource_disabled() can always be
changed to honor both names.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Thu May 1 18:51:43 2003 UTC (8 years, 9 months ago) by jhb
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +4 -5 lines
Catch up to reworked debugging levels in latest Intel import.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Fri Apr 11 16:53:56 2003 UTC (8 years, 10 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +23 -0 lines
Add new sysctl MIB (hw.acpi.supported_sleep_state) to indicate
the list of supported sleep state.
This should help people understand what following message means.

acpi0: AcpiGetSleepTypeData failed - AE_NOT_FOUND

MFC after:	3 days

Revision 1.87: download - view: text, markup, annotated - select for diffs
Thu Mar 6 14:40:15 2003 UTC (8 years, 11 months ago) by takawata
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +33 -3 lines
Add integer value of _CID handling.
If _CID is string, it will need more complicated
handling to distinguish bus other than ISA.

Submitted by: Paul Wankadia <junyer@gmx.net>

Revision 1.86: download - view: text, markup, annotated - select for diffs
Mon Mar 3 12:15:40 2003 UTC (8 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +5 -13 lines
Gigacommit to improve device-driver source compatibility between

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by:    re(scottl)

Revision 1.85: download - view: text, markup, annotated - select for diffs
Sun Mar 2 18:47:38 2003 UTC (8 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +13 -13 lines
Use canonical form for cdevsw initialization.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Sat Feb 15 01:46:22 2003 UTC (8 years, 11 months ago) by takawata
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +11 -1 lines
Allow non-privilaged user to retrive battery or AC line information.

Reviewed by: rwatson

Revision 1.82.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 10 05:18:08 2003 UTC (9 years, 1 month ago) by rwatson
Branches: RELENG_5_0
CVS tags: RELENG_5_0_0_RELEASE
Diff to: previous 1.82: preferred, colored; next MAIN 1.83: preferred, colored
Changes since revision 1.82: +2 -1 lines
Normalize devfs permissions in RELENG_5_0; MFC of earlier changes
to HEAD:

    iir_ctrl.c:1.4
    pcfclock.c:1.11
    pps.c:1.36
    tdfx_pci.c:1.22
    tga_pci.c:1.3
    kern_descrip.c:2.7
    asr.c:1.27
    aac.c:1.45
    acpi.c:1.83
    rf_freebsdkintf.c:1.4

Approved by:	re (scottl)

Revision 1.83: download - view: text, markup, annotated - select for diffs
Sat Dec 28 14:58:50 2002 UTC (9 years, 1 month ago) by rwatson
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +2 -1 lines
Change ACPI make_dev() calls to use UID_ and GID_ constants rather
than hard-coded uids and gids.

Switch the device to a group of wheel instead of operator.

Narrow down the permissions on the device to require root privilege
to manipulate the system power state.  It may be that we can broaden
access to the device after review of the access control in ACPI.

Submitted by:	kris
Reviewed by:	takawata

Revision 1.82: download - view: text, markup, annotated - select for diffs
Wed Dec 11 18:48:50 2002 UTC (9 years, 2 months ago) by takawata
Branches: MAIN
CVS tags: RELENG_5_0_BP
Branch point for: RELENG_5_0
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +9 -2 lines
Add sysctl knob to stop disabling acpi on shutdown.

Approved by: re(jhb)

Revision 1.81: download - view: text, markup, annotated - select for diffs
Sun Nov 24 02:27:07 2002 UTC (9 years, 2 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +13 -7 lines
Add `if (!cold)' checkings for functions which is called via SYSINIT.
Loading acpi.ko with kldload is disallowed, however some
functions were executed unexpectedly.

Approved by:	re

Revision 1.80: download - view: text, markup, annotated - select for diffs
Thu Oct 31 20:23:41 2002 UTC (9 years, 3 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +6 -2 lines
Interpret new loader tunable "hw.acpi.verbose" to turn
verbose mode on at boot time.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Thu Oct 31 17:58:38 2002 UTC (9 years, 3 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +1 -1 lines
Invoke 3 ACPI task threads as default if option ACPI_MAX_THREADS is
not defined.
To make previous default behavior (ACPI_MAX_THREADS undefined), define
option ACPI_MAX_THREADS as 0.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Wed Oct 16 17:28:52 2002 UTC (9 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +10 -2 lines
Catch up to changes in acpivar.h to add support for using ACPI on
4-stable systems.

Sponsored by:	The Weather Channel

Revision 1.77: download - view: text, markup, annotated - select for diffs
Wed Oct 9 20:39:26 2002 UTC (9 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -3 lines
Use d_thread_t for cdevsw functions instead of struct thread * so that it
is easier to share this code with 4-stable.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue Oct 8 15:44:35 2002 UTC (9 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +0 -1 lines
Don't panic for a bad ivar request, just return ENOENT.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Fri Sep 6 17:01:06 2002 UTC (9 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +3 -2 lines
Attach ACPI children a bit later in attach(), specifically after performing
any machine dependent initialization.  This allows the MD code to set the
interrupt routing model so that PCI interrupts are routed correctly when
using an APIC or SAPIC for example.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Fri Sep 6 16:08:08 2002 UTC (9 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +16 -0 lines
Add a helper routine acpi_SetIntrModel() to call the _PIC method to set
the interrupt model in use so that ACPI can properly route interrupts for
machines using APIC's or SAPIC's.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Wed Sep 4 03:11:20 2002 UTC (9 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +4 -40 lines
Use resource_list_print_types() instead of duplicating the code.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Fri Aug 30 11:11:07 2002 UTC (9 years, 5 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +5 -0 lines
s/hint.acpi.0.disable/hint.acpi.0.disabled/

Fix device hints entry for disabling acpi(4).
This also should fix the arbitration with apm(4) when both drivers
are enabled.

Note that your /boot/device.hints needs to be updated if you want to
stop auto-loading acpi.ko or disable acpi(4).

Revision 1.71: download - view: text, markup, annotated - select for diffs
Thu Aug 29 01:52:26 2002 UTC (9 years, 5 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +29 -16 lines
Resolve conflicts arising from the ACPI CA 20020815 import.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Wed Aug 28 18:46:09 2002 UTC (9 years, 5 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +1 -1 lines
Change default value of hw.acpi.sleep_delay to 0.
This caused problems (reset or lock up) at wakeup.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Sun Aug 25 06:13:53 2002 UTC (9 years, 5 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +8 -0 lines
Add new sysctl MIB (hw.acpi.sleep_delay) to specify the delay (in
seconds) before ACPI sleep.  Some machines might need this to sleep
by Hot-key.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Mon Aug 12 22:36:18 2002 UTC (9 years, 6 months ago) by imp
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +2 -2 lines
don't include redunant \n in panic message

Revision 1.67: download - view: text, markup, annotated - select for diffs
Tue Jul 30 19:35:29 2002 UTC (9 years, 6 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +5 -0 lines
Resolve conflicts arising from the ACPI CA 20020725 import.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Mon Jul 22 12:52:54 2002 UTC (9 years, 6 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +128 -5 lines
Add device(power/sleep button and lid) wake function from sleeping state.
This is required for some Thinkpad (and maybe VAIO) machines to wake
the system up from sleep.

Currently partially implemented, more complete implementation will come later.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Tue Jul 9 17:53:54 2002 UTC (9 years, 7 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +7 -19 lines
Resolve conflicts arising from the ACPI CA 20020611 import.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sun May 19 15:12:40 2002 UTC (9 years, 8 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -0 lines
Terminate ACPI subsystem on reboot.
Some machines stuck on reboot if ACPI sleep/wakeup was executed.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sun May 19 06:16:45 2002 UTC (9 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +16 -16 lines
Brutally deal with __func__ being 'const char *' on gcc-3.1.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Thu May 9 21:13:37 2002 UTC (9 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +5 -4 lines
Fix acpi_avoid() to call freeenv() on the original char * returned from
getenv().

Reported by:	joe
Tested by:	joe

Revision 1.61: download - view: text, markup, annotated - select for diffs
Wed Apr 24 17:49:21 2002 UTC (9 years, 9 months ago) by mux
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +7 -6 lines
Don't call freeenv() on a modified pointer.

Submitted by:	Alexander Kabaev <ak03@gte.com>
Reviewed by:	phk
Pointy hat to:	mux

Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri Apr 19 23:36:38 2002 UTC (9 years, 9 months ago) by mike
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +7 -2 lines
Fix compiling of acpica when debugging is enabled.  In the previous
revision, two getenv()s were accidentally changed to use testenv().

Pointy hat to:	mux

Revision 1.59: download - view: text, markup, annotated - select for diffs
Wed Apr 17 13:06:32 2002 UTC (9 years, 9 months ago) by mux
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +52 -21 lines
Rework the kernel environment subsystem.  We now convert the static
environment needed at boot time to a dynamic subsystem when VM is
up.  The dynamic kernel environment is protected by an sx lock.

This adds some new functions to manipulate the kernel environment :
freeenv(), setenv(), unsetenv() and testenv().  freeenv() has to be
called after every getenv() when you have finished using the string.
testenv() only tests if an environment variable is present, and
doesn't require a freeenv() call. setenv() and unsetenv() are self
explanatory.

The kenv(2) syscall exports these new functionalities to userland,
mainly for kenv(1).

Reviewed by:	peter

Revision 1.58: download - view: text, markup, annotated - select for diffs
Mon Apr 8 06:58:17 2002 UTC (9 years, 10 months ago) by takawata
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +1 -0 lines
Print DRQ resource in boot message.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Thu Apr 4 21:03:13 2002 UTC (9 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +1 -1 lines
Change callers of mtx_init() to pass in an appropriate lock type name.  In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Feb 23 05:21:56 2002 UTC (9 years, 11 months ago) by msmith
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +78 -125 lines
Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.
The AcpiGetInto* interfaces are obsoleted by ACPI_ALLOCATE_BUFFER.

Add AcpiBatteryIsPresent helper to determine whether a battery device
is inserted.

Add ACPI_ALL_DRIVERS to the list of debug layers, now that we own the
namespace for this.

Pr:

Revision 1.55: download - view: text, markup, annotated - select for diffs
Tue Jan 8 06:45:56 2002 UTC (10 years, 1 month ago) by msmith
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +1 -1 lines
Staticise devclasses and some unnecessarily global variables.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Dec 22 16:05:34 2001 UTC (10 years, 1 month ago) by iwasaki
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +32 -18 lines
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.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sun Dec 9 18:02:36 2001 UTC (10 years, 2 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +16 -0 lines
Disable sleep requests for 5 sec after wakeup.  This is needed for
some Toshiba and Thinkpad laptops.
Wakeup event is generated by power button or sleep button on some
laptops but this also generates SCI interrupt, and shutdown the system
as result.  So this is introduced so that acpi driver ignore given
requests for certain period.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Nov 30 16:06:00 2001 UTC (10 years, 2 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +5 -2 lines
Add a couple of minor changes.
 - set sc->acpi_s4bios to 1 by default for hibernation until
   OS-initiated S4 transition is implemented.
 - change the behavior of acpi_sleep_state_sysctl() if new value is
   the same as old one, do nothing instead of EINVAL.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Wed Nov 28 12:09:42 2001 UTC (10 years, 2 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +14 -0 lines
Yet another synch with minor changes in the ACPI CA 20011120 snapshot.
We need to call AcpiEnterSleepStatePrep() before AcpiEnterSleepState().

Revision 1.50: download - view: text, markup, annotated - select for diffs
Fri Nov 23 05:57:03 2001 UTC (10 years, 2 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -0 lines
Validate requested sleep state in acpi_SetSleepState() to avoid reentry
during wakeup procedure.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Nov 15 15:12:08 2001 UTC (10 years, 2 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -3 lines
Fix re-enabling ACPI on wakeup from hibernation.  The problem was that
acpi_Disable() cleared all GPE events.
Some old ACPI implementaions still need current re-enabling code.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Thu Nov 15 11:59:25 2001 UTC (10 years, 2 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +5 -4 lines
Remove "S4B" from sleep_state_names and add "NONE" instead.
Now you can say;
 # sysctl hw.acpi.lid_switch_state=NONE
instead of specifying unsupported _Sx object in the system.

Actually, S4B is going to disappear in ACPICA and we already have
hw.acpi.s4bios to distinguish BIOS hibernation or OS hibernation.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Tue Nov 6 15:00:18 2001 UTC (10 years, 3 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +20 -0 lines
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.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Nov 5 14:51:58 2001 UTC (10 years, 3 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +0 -14 lines
Remove unnecessary WAK_STS bit waiting code for S1 sleep.
It was duplicated with AcpiEnterSleepState() since acpica-unix-20010816.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Thu Nov 1 16:33:17 2001 UTC (10 years, 3 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +74 -1 lines
Some fix for the recent apm module changes.
 - Now that apm loadable module can inform its existence to other kernel
   components  (e.g. i386/isa/clock.c:startrtclock()'s TCS hack).
 - Exchange priority of SI_SUB_CPU and SI_SUB_KLD for above purpose.
 - Add simple arbitration mechanism for APM vs. ACPI.  This prevents
   the kernel enables both of them.
 - Remove obsolete `#ifdef DEV_APM' related code.
 - Add abstracted interface for Powermanagement operations.  Public apm(4)
   functions, such as apm_suspend(), should be replaced new interfaces.
   Currently only power_pm_suspend (successor of apm_suspend) is implemented.

Reviewed by:	peter, arch@ and audit@

Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Oct 29 18:09:43 2001 UTC (10 years, 3 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +5 -0 lines
Some small improvements of ACPI thermal driver.
 - Give a guaranteed minimum cooling run time to avoid too frequent
   cooling system On/Off switching.  The minimum cooling run time can be
   specified by hw.acpi.thermal.min_runtime in sec.
 - Refine message printing (_AC-1 -> NONE).
 - Add verbose mode enable/disable capability by hw.acpi.verbose in bool.

Reviewed by:	acpi-jp@ folks

Revision 1.43: download - view: text, markup, annotated - select for diffs
Fri Oct 26 17:42:46 2001 UTC (10 years, 3 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +14 -3 lines
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

Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Oct 4 23:21:09 2001 UTC (10 years, 4 months ago) by msmith
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +8 -5 lines
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.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Thu Oct 4 08:31:17 2001 UTC (10 years, 4 months ago) by dfr
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +6 -1 lines
Check the compatible ID as well as the hardware ID in acpi_MatchHid.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Mon Sep 17 15:11:55 2001 UTC (10 years, 4 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -2 lines
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

Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Sep 15 04:14:31 2001 UTC (10 years, 4 months ago) by msmith
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +11 -1 lines
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.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Wed Sep 12 08:37:00 2001 UTC (10 years, 5 months ago) by julian
Branches: MAIN
CVS tags: KSE_MILESTONE_2
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +4 -4 lines
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

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Sep 7 03:54:37 2001 UTC (10 years, 5 months ago) by msmith
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -2 lines
Should check debug.acpi.avoid, not .disable.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Sep 7 02:57:29 2001 UTC (10 years, 5 months ago) by msmith
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +60 -20 lines
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.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Thu Sep 6 23:16:55 2001 UTC (10 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +38 -2 lines
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

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Sep 2 06:28:20 2001 UTC (10 years, 5 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
Fix typo; CTLFLAG_RO -> CTLFLAG_RD.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sat Sep 1 22:41:53 2001 UTC (10 years, 5 months ago) by msmith
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +4 -1 lines
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.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Fri Aug 31 05:36:48 2001 UTC (10 years, 5 months ago) by takawata
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -76 lines
Call OS-independent resume routine to execute _WAK .. etc.
This should also recover GPE bit,comment says, though not implemented yet.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Aug 30 00:50:58 2001 UTC (10 years, 5 months ago) by msmith
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +75 -2 lines
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.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Aug 26 22:50:15 2001 UTC (10 years, 5 months ago) by msmith
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +62 -64 lines
Updates to match the ACPI CA 20010816 import:

 - New debug macro (ACPI_DEBUG_PRINT), reducing debug-case code size.
 - New debug level/subsystem codes.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Aug 3 08:38:11 2001 UTC (10 years, 6 months ago) by msmith
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +3 -1 lines
Move the resource pointer when we reallocate the buffer.

Submitted by:	"neckpain@nettaxi.com" <neckpain@nettaxi.com>

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Jul 30 08:59:43 2001 UTC (10 years, 6 months ago) by msmith
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +120 -11 lines
 - 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.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Jul 22 19:13:49 2001 UTC (10 years, 6 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +9 -1 lines
Don't do sleep state transition if specified sleep state is not
supported by the system.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Jul 21 10:24:32 2001 UTC (10 years, 6 months ago) by msmith
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +11 -11 lines
Convert from acpi_strerror() to AcpiFormatException()

Fix dangling include of the dear departed acpi_ecreg.h

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Jul 21 04:04:03 2001 UTC (10 years, 6 months ago) by msmith
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +3 -18 lines
The API for loading tables changed (we no longer explicitly search for the
RSDP, it's now found via a callback).

AcpiOsSleepUsec() went away, use AcpiOsSleep() instead (we could use
AcpiOsStall() too)

AcpiFormatException() was changed to make more sense (it behaves like
our old acpi_strerror() did), so throw acpi_strerror() away (still
#defined in acpivar.h though, we need to sweep these seperately).

Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Jul 20 06:07:29 2001 UTC (10 years, 6 months ago) by takawata
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +38 -24 lines
Add ACPI S2-S4BIOS Suspend/Resume code.
Some problems may remain.

Reviewed by:iwasaki

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sat Jul 7 10:20:17 2001 UTC (10 years, 7 months ago) by msmith
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +25 -4 lines
Add acpi_GetTableIntoBuffer, to aid in fetching tables.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Jul 5 07:14:30 2001 UTC (10 years, 7 months ago) by msmith
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +24 -199 lines
Add a new helper function for finding resources in resource buffers.

Move the ACPI generic battery code into a new file.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Fri Jun 29 20:29:59 2001 UTC (10 years, 7 months ago) by msmith
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +184 -130 lines
Update to synch with the 20010615 ACPI CA import.

Add an ACPI subsystem mutex, and macros for handling it.  Because it's
not possible to differentiate between ACPI CA acquiring mutexes for
internal use and for use by AML, and because AML in the field doesn't
handle mutexes correctly, we can't use the ACPI subsystem's internal
locking.  In addition, we have other private data of our own to lock.

Add initial locking to the ACPI driver code and the thermal module.
These locks are currently inoperative.

Pull some errant style back into line.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Jun 28 06:17:15 2001 UTC (10 years, 7 months ago) by msmith
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +183 -108 lines
Sync to my work in progress:

 - Reorder the acpi_* functions in a sensible fashion
 - Add acpi_ForeachPackageObject and acpi_GetHandleInScope
 - Use the new debugging layer/level names
 - Implement most of the guts of the acpi_thermal module; passive cooling
   isn't there yet, but active cooling should work.
 - Implement power resource handling (acpi_powerres.c)

This compiles and mostly works, but my test coverage is small, so feedback
is welcome.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sun Jun 24 02:37:38 2001 UTC (10 years, 7 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +7 -7 lines
- Swap order of "S4B" and "S5" in sleep_state_names.  They already
  changed in ACPICA actypes.h.
- Use ACPI_S_STATES_MAX instead of ACPI_STATE_S5.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Jun 23 10:38:25 2001 UTC (10 years, 7 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +200 -1 lines
Add sysctl interface (Read-only) for temprature, AC-line and Battery.
Patches for acpi_cmbat.c submitted by Munehiro Matsuda.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue May 29 20:13:33 2001 UTC (10 years, 8 months ago) by msmith
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +30 -31 lines
 - Updates for new constant naming in the ACPI CA 20010518 update.
 - Use __func__ instead of __FUNCTION.
 - Support power-off to S3 or S5 (takawata)
 - Enable ACPI debugging earlier (with a sysinit)
 - Fix a deadlock in the EC code (takawata)
 - Improve arithmetic and reduce the risk of spurious wakeup in
   AcpiOsSleep.
 - Add AcpiOsGetThreadId.
 - Simplify mutex code (still disabled).

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue May 1 08:11:55 2001 UTC (10 years, 9 months ago) by markm
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -1 lines
Undo part of the tangle of having sys/lock.h and sys/mutex.h included in
other "system" header files.

Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.

Sort sys/*.h includes where possible in affected files.

OK'ed by:	bde (with reservations)

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Apr 2 23:36:36 2001 UTC (10 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -3 lines
Remove bogus block device major now that bdev majors are gone.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed Mar 28 09:17:50 2001 UTC (10 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -1 lines
Catch up to header include changes:
- <sys/mutex.h> now requires <sys/systm.h>
- <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>

Revision 1.13: download - view: text, markup, annotated - select for diffs
Wed Mar 7 15:22:14 2001 UTC (10 years, 11 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +89 -1 lines
Bring our local hack for wakeup back from
sys/contrib/dev/acpica/Subsystem/Hardware/Attic/hwxface.c to the proper
location after AcpiEnterSleepState().

 - Wait for the WAK_STS bit
 - Evaluate the _WAK method and check result code

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Jan 31 09:30:57 2001 UTC (11 years ago) by msmith
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +12 -12 lines
ACPI_NUMBER becomes ACPI_INTEGER.  acpi_EvaluateNumber becomes
acpi_EvaluateInteger.

Use acpi_EvaluateInteger instead of doing things the hard way where
possible.

AcpiSetSystemSleepState (unofficial) becomes AcpiEnterSleepState.

Use the AcpiGbl_FADT pointer rather than searching for the FADT.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Jan 13 21:28:57 2001 UTC (11 years ago) by jhb
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +51 -1 lines
Add 3 new dynamic sysctl's to control the sleep states switched to on a
power button, sleep button, or lid close event.  The sysctl's use the
ACPI sleep state names S0, S1, S2, S3, S4, S4B, and S5.

Reviewed by:	iwasaki

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Jan 10 18:01:51 2001 UTC (11 years, 1 month ago) by iwasaki
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +34 -14 lines
Enable fixed event at not only boot but also wakeup.

Reported and patch tested by:	Peter Dufault <dufault@hda.hda.com>

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Dec 24 19:12:10 2000 UTC (11 years, 1 month ago) by iwasaki
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -1 lines
Add ioctls to acpi_cmbat and acpi_acad.  These use mike's acpi_register_ioctl().
Fix wrong AML method calling in acpi_cmbat.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Dec 19 15:45:11 2000 UTC (11 years, 1 month ago) by iwasaki
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
Fix testing reboot howto flags in acpi_shutdown_final().
This sould make the system power-off correctly where the howto had
more bits set than RB_POWEROFF, e.g. RB_NOSYNC.

Submitted by:	Peter Pentchev <roam@orbitel.bg>

Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue Dec 12 14:20:27 2000 UTC (11 years, 2 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -1 lines
Catch up with the recent conversion the per-eventhandler list mutex to
a lockmgr lock.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Dec 8 09:16:19 2000 UTC (11 years, 2 months ago) by msmith
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +222 -47 lines
 - Convert a lot of homebrew debugging output to use the ACPI CA debugging
   infrastructure.  It's not perfect, but it's a lot better than what
   we've been using so far.  The following rules apply to this:
    o BSD component names should be capitalised
    o Layer names should be taken from the non-CA set for now.  We
      may elect to add some new BSD-specific layers later.

 - Make it possible to turn off selective debugging flags or layers
   by listing them in debug.acpi.layer or debug.acpi.level prefixed
   with !.

 - Fully implement support for avoiding nodes in the ACPI namespace.
   Nodes may be listed in the debug.acpi.avoid environment variable;
   these nodes and all their children will be ignored (although still
   scanned over) by ACPI functions which scan the namespace.  Multiple
   nodes can be specified, separated by whitespace.

 - Implement support for selectively disabling ACPI subsystem components
   via the debug.acpi.disable environment variable.  The following
   components can be disabled:
    o bus	creation/scanning of the ACPI 'bus'
    o children	attachment of children to the ACPI 'bus'
    o button	the acpi_button control-method button driver
    o ec	the acpi_ec embedded-controller driver
    o isa	acpi replacement of PnP BIOS for ISA device discovery
    o lid	the control-method lid switch driver
    o pci	pci root-bus discovery
    o processor CPU power/speed management
    o thermal	system temperature detection and control
    o timer	ACPI timecounter
   Multiple components may be disabled by specifying their name(s)
   separated by whitespace.

 - Add support for ioctl registration.  ACPI subsystem components may
   register ioctl handlers with the /dev/acpi generic ioctl handler,
   allowing us to avoid the need for a multitude of /dev/acpi* control
   devices, etc.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Dec 5 00:19:10 2000 UTC (11 years, 2 months ago) by msmith
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +3 -3 lines
ACPI HID's aren't limited to 7 characters.  Don't check the length of the
HID passed in as an argument at all; callers are typically going to be
sending us static strings anyway.

Submitted by:	Munehiro Matsuda <haro@tk.kubota.co.jp>

Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Dec 1 10:18:57 2000 UTC (11 years, 2 months ago) by msmith
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +9 -9 lines
Update to work with the new ACPI CA snapshot.

 - Use ACPI_PHYSICAL_ADDRESS
 - RSDT -> XSDT
 - FACP -> FADT
 - No APIC table support
 - Don't install a global EC handler; this has bad side-effects
   (it invokes _REG in *all* EC spaces in the namespace!)
 - Check for PCI bus instances already existing before adding them

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Nov 6 22:33:49 2000 UTC (11 years, 3 months ago) by msmith
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -4 lines
Remove unused PCI includes.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Oct 31 11:54:10 2000 UTC (11 years, 3 months ago) by takawata
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +6 -1 lines
If acpica driver is loaded using kldload(8), warn and just ignore.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Oct 28 06:59:47 2000 UTC (11 years, 3 months ago) by msmith
Branches: MAIN
Initial FreeBSD OSPM (operating system power management) modules for
ACPICA.  Most of these are still works in progress.  Support exists for:

 - Fixed feature and control method power, lid and sleep buttons.
 - Detection of ISA PnP devices using ACPI namespace.
 - Detection of PCI root busses using ACPI namespace.
 - CPU throttling and sleep states (incomplete)
 - Thermal monitoring and cooling control (incomplete)
 - Interface to platform embedded controllers (mostly complete)
 - ACPI timer (incomplete)
 - Simple userland control of sleep states.
 - Shutdown and poweroff.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options