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

CVS log for src/sys/i386/acpica/acpi_machdep.c

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.50.2.1.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.50.2.1: preferred, colored
Changes since revision 1.50.2.1: +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.50.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
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +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.44.2.5: download - view: text, markup, annotated - select for diffs
Thu Sep 15 12:27:26 2011 UTC (4 months, 3 weeks ago) by attilio
Branches: RELENG_8
Diff to: previous 1.44.2.4: preferred, colored; branchpoint 1.44: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44.2.4: +1 -0 lines
SVN rev 225585 on 2011-09-15 12:27:26Z by attilio

MFC r225177,225181:
Introduce and use seldrain() function for dealing with fast
selrecord/selinfo destruction.

Sponsored by:	Sandvine Incorporated

Revision 1.37.2.3.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.37.2.3: preferred, colored; next MAIN 1.37.6.1: preferred, colored
Changes since revision 1.37.2.3: +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.44.2.4.4.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.44.2.4: preferred, colored; next MAIN 1.44.2.5: preferred, colored
Changes since revision 1.44.2.4: +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.50: download - view: text, markup, annotated - select for diffs
Wed Nov 10 18:50:12 2010 UTC (14 months, 4 weeks ago) by jkim
Branches: MAIN
CVS tags: RELENG_9_BP, HEAD
Branch point for: RELENG_9
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +2 -3 lines
SVN rev 215097 on 2010-11-10 18:50:12Z by jkim

Make APM emulation look more closer to its origin.  Use device_get_softc(9)
instead of hardcoding acpi(4) unit number as we have device_t for it.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Wed Nov 10 01:29:56 2010 UTC (15 months ago) by jkim
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +9 -451 lines
SVN rev 215072 on 2010-11-10 01:29:56Z by jkim

Refactor acpi_machdep.c for amd64 and i386, move APM emulation into a new
file acpi_apm.c, and place it on sys/x86/acpica.

Revision 1.44.2.4.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.44.2.4: preferred, colored; next MAIN 1.44.2.5: preferred, colored
Changes since revision 1.44.2.4: +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.37.2.3: download - view: text, markup, annotated - select for diffs
Fri Mar 26 19:00:17 2010 UTC (22 months, 2 weeks ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_4_BP
Branch point for: RELENG_7_4
Diff to: previous 1.37.2.2: preferred, colored; branchpoint 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37.2.2: +2 -0 lines
SVN rev 205709 on 2010-03-26 19:00:17Z by jhb

MFC 205332:
Use the same policy for rejecting / not-reject ACPI tables with incorrect
checksums as the base acpi(4) driver.  This fixes a problem where the MADT
parser would reject the MADT table during early boot causing the MP Table
to be, but then the acpi(4) driver would attach and use non-SMP interrupt
routing.

Revision 1.44.2.4: download - view: text, markup, annotated - select for diffs
Fri Mar 26 18:58:22 2010 UTC (22 months, 2 weeks ago) by jhb
Branches: RELENG_8
CVS tags: RELENG_8_2_BP, RELENG_8_1_BP
Branch point for: RELENG_8_2, RELENG_8_1
Diff to: previous 1.44.2.3: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.3: +2 -0 lines
SVN rev 205708 on 2010-03-26 18:58:22Z by jhb

MFC 205332:
Use the same policy for rejecting / not-reject ACPI tables with incorrect
checksums as the base acpi(4) driver.  This fixes a problem where the MADT
parser would reject the MADT table during early boot causing the MP Table
to be, but then the acpi(4) driver would attach and use non-SMP interrupt
routing.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Fri Mar 19 12:43:18 2010 UTC (22 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -0 lines
SVN rev 205332 on 2010-03-19 12:43:18Z by jhb

Use the same policy for rejecting / not-reject ACPI tables with incorrect
checksums as the base acpi(4) driver.  This fixes a problem where the MADT
parser would reject the MADT table during early boot causing the MP Table
to be, but then the acpi(4) driver would attach and use non-SMP interrupt
routing.

Tested by:	Alastair Hogge  agh of coolrhaug com
MFC after:	1 week

Revision 1.37.2.2.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.37.2.2: preferred, colored; next MAIN 1.37.2.3: preferred, colored
Changes since revision 1.37.2.2: +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.37.2.2: download - view: text, markup, annotated - select for diffs
Fri Jan 22 17:02:07 2010 UTC (2 years ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_3_BP
Branch point for: RELENG_7_3
Diff to: previous 1.37.2.1: preferred, colored; branchpoint 1.37: preferred, colored
Changes since revision 1.37.2.1: +1 -1 lines
SVN rev 202814 on 2010-01-22 17:02:07Z by jhb

MFC 193951:
Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use
vnode interlock to protect the knote fields. The locking assumes
that shared vnode lock is held, thus we get exclusive access to knote
either by exclusive vnode lock protection, or by shared vnode lock +
vnode interlock.

Unlike the change in HEAD, this does not remove kl_locked() and replace it
with kl_assert_locked() and kl_assert_unlocked().  Instead, the kl_locked
can now be set to NULL in which case no assertion checks are performed on
the lock.  The vfs kqfilter code uses this mode to disable assertion checks.
This preserves the existing ABI for knlist_init().

Add convenience function knlist_init_mtx to reduce number of arguments
for typical knlist initialization.

Reviewed by:	kib

Revision 1.37.2.1: 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
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +240 -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.44.2.3: 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.44.2.2: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.2: +240 -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.44.2.2.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.44.2.2: preferred, colored; next MAIN 1.44.2.3: preferred, colored
Changes since revision 1.44.2.2: +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.47: 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.46: preferred, colored
Changes since revision 1.46: +240 -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.46: download - view: text, markup, annotated - select for diffs
Sat Sep 12 20:03:45 2009 UTC (2 years, 4 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +5 -2 lines
SVN rev 197134 on 2009-09-12 20:03:45Z by rwatson

Use C99 initialization for struct filterops.

Obtained from:	Mac OS X
Sponsored by:	Apple Inc.
MFC after:	3 weeks

Revision 1.44.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
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.44.2.1: preferred, colored; branchpoint 1.44: preferred, colored
Changes since revision 1.44.2.1: +0 -6 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.45: 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.44: preferred, colored
Changes since revision 1.44: +0 -6 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.44.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.44: preferred, colored
Changes since revision 1.44: +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.44: 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.43: preferred, colored
Changes since revision 1.43: +6 -0 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.43: download - view: text, markup, annotated - select for diffs
Wed Jun 10 20:59:32 2009 UTC (2 years, 8 months ago) by kib
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +1 -1 lines
SVN rev 193951 on 2009-06-10 20:59:32Z by kib

Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use
vnode interlock to protect the knote fields [1]. The locking assumes
that shared vnode lock is held, thus we get exclusive access to knote
either by exclusive vnode lock protection, or by shared vnode lock +
vnode interlock.

Do not use kl_locked() method to assert either lock ownership or the
fact that curthread does not own the lock. For shared locks, ownership
is not recorded, e.g. VOP_ISLOCKED can return LK_SHARED for the shared
lock not owned by curthread, causing false positives in kqueue subsystem
assertions about knlist lock.

Remove kl_locked method from knlist lock vector, and add two separate
assertion methods kl_assert_locked and kl_assert_unlocked, that are
supposed to use proper asserts. Change knlist_init accordingly.

Add convenience function knlist_init_mtx to reduce number of arguments
for typical knlist initialization.

Submitted by:	jhb [1]
Noted by:	jhb [2]
Reviewed by:	jhb
Tested by:	rnoland

Revision 1.42: 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.41: preferred, colored
Changes since revision 1.41: +2 -1 lines
SVN rev 193530 on 2009-06-05 18:44:36Z by jkim

Import ACPICA 20090521.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Wed May 20 16:47:40 2009 UTC (2 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +4 -4 lines
SVN rev 192442 on 2009-05-20 16:47:40Z by imp

We don't need d_thread_t for cross-branch portability here anymore.
Move do struct thread * instead.

Revision 1.37.8.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.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37: +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.37.6.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.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37: +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.28.2.4.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.28.2.4: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.4: +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.40: download - view: text, markup, annotated - select for diffs
Fri Sep 26 14:19:52 2008 UTC (3 years, 4 months ago) by ed
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -2 lines
SVN rev 183381 on 2008-09-26 14:19:52Z by ed

Remove unit2minor() use from kernel code.

When I changed kern_conf.c three months ago I made device unit numbers
equal to (unneeded) device minor numbers. We used to require
bitshifting, because there were eight bits in the middle that were
reserved for a device major number. Not very long after I turned
dev2unit(), minor(), unit2minor() and minor2unit() into macro's.
The unit2minor() and minor2unit() macro's were no-ops.

We'd better not remove these four macro's from the kernel, because there
is a lot of (external) code that may still depend on them. For now it's
harmless to remove all invocations of unit2minor() and minor2unit().

Reviewed by:	kib

Revision 1.39: download - view: text, markup, annotated - select for diffs
Wed Jun 11 18:55:19 2008 UTC (3 years, 7 months ago) by ed
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +1 -1 lines
SVN rev 179726 on 2008-06-11 18:55:19Z by ed

Don't enforce unique device minor number policy anymore.

Except for the case where we use the cloner library (clone_create() and
friends), there is no reason to enforce a unique device minor number
policy. There are various drivers in the source tree that allocate unr
pools and such to provide minor numbers, without using them themselves.

Because we still need to support unique device minor numbers for the
cloner library, introduce a new flag called D_NEEDMINOR. All cdevsw's
that are used in combination with the cloner library should be marked
with this flag to make the cloning work.

This means drivers can now freely use si_drv0 to store their own flags
and state, making it effectively the same as si_drv1 and si_drv2. We
still keep the minor() and dev2unit() routines around to make drivers
happy.

The NTFS code also used the minor number in its hash table. We should
not do this anymore. If the si_drv0 field would be changed, it would no
longer end up in the same list.

Approved by:	philip (mentor)

Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu Mar 13 20:39:04 2008 UTC (3 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +43 -0 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.37: download - view: text, markup, annotated - select for diffs
Sat Jul 7 17:54:33 2007 UTC (4 years, 7 months ago) by njl
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_2_BP, RELENG_7_1_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Branch point for: RELENG_7_2, RELENG_7_1, RELENG_7
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +1 -9 lines
Now that we have a function that can be called from a cdevsw close()
entry point, use it.

Approved by:	re

Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu Jun 21 22:50:36 2007 UTC (4 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +216 -26 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.28.2.4: download - view: text, markup, annotated - select for diffs
Wed May 2 18:42:46 2007 UTC (4 years, 9 months ago) by jhb
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.28.2.3: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.3: +2 -2 lines
MFC: Initial PAT support including the following:
- New pmap_mapdev_attr() function for amd64 and i386.
- pmap_mapdev() on i386 and amd64 uses UC now rather than WB.
- New pmap_mapbios()/pmap_unmapbios() functions to map firmware tables.
- New pmap_change_attr() function for amd64 and i386.
- Bump __FreeBSD_version.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Mar 31 23:23:41 2007 UTC (4 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +1 -0 lines
Optimize sx locks to use simple atomic operations for the common cases of
obtaining and releasing shared and exclusive locks.  The algorithms for
manipulating the lock cookie are very similar to that rwlocks.  This patch
also adds support for exclusive locks using the same algorithm as mutexes.

A new sx_init_flags() function has been added so that optional flags can be
specified to alter a given locks behavior.  The flags include SX_DUPOK,
SX_NOWITNESS, SX_NOPROFILE, and SX_QUITE which are all identical in nature
to the similar flags for mutexes.

Adaptive spinning on select locks may be enabled by enabling the
ADAPTIVE_SX kernel option.  Only locks initialized with the SX_ADAPTIVESPIN
flag via sx_init_flags() will adaptively spin.

The common cases for sx_slock(), sx_sunlock(), sx_xlock(), and sx_xunlock()
are now performed inline in non-debug kernels.  As a result, <sys/sx.h> now
requires <sys/lock.h> to be included prior to <sys/sx.h>.

The new kernel option SX_NOINLINE can be used to disable the aforementioned
inlining in non-debug kernels.

The size of struct sx has changed, so the kernel ABI is probably greatly
disturbed.

MFC after:	1 month
Submitted by:	attilio
Tested by:	kris, pjd

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

Revision 1.28.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 16 04:01:49 2006 UTC (5 years, 5 months ago) by njl
Branches: RELENG_6
CVS tags: RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Diff to: previous 1.28.2.2: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.2: +8 -2 lines
MFC: bring resume code up to HEAD, including resume_beep and man page.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Fri Aug 11 19:22:56 2006 UTC (5 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
First pass at allowing memory to be mapped using cache modes other than
WB (write-back) on x86 via control bits in PTEs and PDEs (including making
use of the PAT MSR).  Changes include:
- A new pmap_mapdev_attr() function for amd64 and i386 which takes an
  additional parameter (relative to pmap_mapdev()) specifying the cache
  mode for this mapping.  Note that on amd64 only WB mappings are done with
  the direct map, all other modes result in a private mapping.
- pmap_mapdev() on i386 and amd64 now defaults to using UC (uncached)
  mappings rather than WB.  Previously we relied on the BIOS setting up
  MTRR's to enforce memio regions being treated as UC.  This might make
  hw.cbb_start_memory unnecessary in some cases now for example.
- A new pmap_mapbios()/pmap_unmapbios() API has been added to allow places
  that used pmap_mapdev() to map non-device memory (such as ACPI tables)
  to do so using WB as before.
- A new pmap_change_attr() function for amd64 and i386 that changes the
  caching mode for a range of KVA.

Reviewed by:	alc

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sat Jun 10 08:06:16 2006 UTC (5 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +6 -6 lines
Move the reset beep tunable/sysctl to debug.acpi.resume_beep.  This makes
more sense than under hw.acpi.  Also, document this in the man page.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Jun 8 17:54:10 2006 UTC (5 years, 8 months ago) by njl
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +7 -1 lines
Minor tweaks to the resume code that might help people debug.

* Add hw.acpi.resume_beep tunable and sysctl, default to 0.  Beeps the PC
speaker soon after waking to diagnose whether the wakeup code is even
getting run before other drivers possibly hang the system.  To stop the beep,
cause another beep (i.e. keyboard bell).  Submitted by takawata@, I changed
the frequency to be lower.

* Use 4096 instead of 4 byte alignment.  Might be useful although doesn't
seem to be necessary.

* Remove a useless assignment to acpi_reset_video.  It was overwritten by
the default sysctl value anyway.

Revision 1.28.2.2: download - view: text, markup, annotated - select for diffs
Mon Nov 7 09:53:24 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.28.2.1: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.1: +1 -1 lines
MFC: canonify the include of acpi.h.

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

Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Fri Jul 29 16:27:07 2005 UTC (6 years, 6 months ago) by njl
Branches: RELENG_6
CVS tags: RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +13 -8 lines
MFC: Bring acpi_battery support up to HEAD, changing the API slightly
and fixing various bugs.

Approved by:	re (kensmith)

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Jul 23 19:36:00 2005 UTC (6 years, 6 months ago) by njl
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +13 -8 lines
Rewrite the acpi_battery interface to allow for other battery types
(i.e., smart battery) and fix various bugs found during the cleanup.

API changes:
* kernel access:
Access to individual batteries is now via devclass_find("battery").
Introduce new methods ACPI_BATT_GET_STATUS (for _BST-formatted data) and
ACPI_BATT_GET_INFO (for _BIF-formatted data).  The helper function
acpi_battery_get_battinfo() now takes a device_t instead of a unit #
argument.  If dev is NULL, this signifies all batteries.

* ioctl access:
The ACPIIO_BATT_GET_TYPE and ACPIIO_BATT_GET_BATTDESC ioctls have been
removed.  Since there is now no need for a mapping between "virtual" unit
and physical unit, usermode programs can just specify the unit directly and
skip the old translation steps.  In fact, acpiconf(8) was actually already
doing this and virtual unit was the same as physical unit in all cases
since there was previously only one battery type (acpi_cmbat).  Additionally,
we now map the ACPIIO_BATT_GET_BIF and ACPIIO_BATT_GET_BST ioctls for all
batteries, if they provide the associated methods.

* apm compatibility device/ioctls:  no change
* sysctl:  no change

Since most third-party applications use the apm(4) compat interface, there
should be very few affected applications (if any).

Reviewed by:	bruno
MFC after:	5 days

Revision 1.25.2.1: 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
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5, RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.25: preferred, colored; next MAIN 1.26: preferred, colored
Changes since revision 1.25: +20 -15 lines
MFC: Bring most of ACPI up to HEAD.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri Oct 22 17:17:12 2004 UTC (7 years, 3 months ago) by njl
Branches: MAIN
CVS tags: RELENG_6_BP
Branch point for: RELENG_6
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +0 -1 lines
Remove a "needs Giant" flag from the /dev/apm compat device.

MFC after:	2 weeks

Revision 1.27: download - view: text, markup, annotated - select for diffs
Mon Oct 11 05:42:12 2004 UTC (7 years, 4 months ago) by njl
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +13 -13 lines
Match surrounding style, not style(msmith).

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Oct 11 05:39:14 2004 UTC (7 years, 4 months ago) by njl
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +6 -0 lines
Move the code for halting the CPU (acpi_cpu_c1) into machdep files.
This removes the last MD portion of acpi_cpu.c.

MFC after:	2 weeks

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Jul 24 22:41:30 2004 UTC (7 years, 6 months ago) by njl
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Branch point for: RELENG_5
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +8 -12 lines
Get the acpi softc via the devclass, not by caching the device.  Replace
apm_softc with a single integer since the whole softc is not used.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Wed Jun 30 04:42:29 2004 UTC (7 years, 7 months ago) by njl
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +24 -0 lines
Add machdep quirks functions.  On i386, this disables acpi on systems with
BIOS dates earlier than Jan 1, 1999.  Add prototypes and quirks flags.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Jun 28 02:38:20 2004 UTC (7 years, 7 months ago) by imp
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +9 -9 lines
Use APM_UNKNOWN instead of 0xff.  Use ~0U instead 0 for the number of
batteries.  This should be -1 to match other code, but since the api
is unsigned ~0U is the same thing.

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

Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Jun 10 20:43:01 2004 UTC (7 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +0 -6 lines
- Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 is
  present and thus that the PnPBIOS probe should be skipped instead of
  having ACPI zero out the PnPBIOStable pointer.
- Make the PnPBIOStable pointer static to i386/i386/bios.c now that that is
  the only place it is used.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Wed May 5 19:51:15 2004 UTC (7 years, 9 months ago) by njl
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +7 -19 lines
Style cleanups, u_intXX -> uintXX.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue May 4 21:04:24 2004 UTC (7 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +4 -1 lines
Have ACPI use BUS_CONFIG_INTR() to force the SCI to level trigger and
active low polarity when using the PIC interrupt model.  This should fix
broken SCI interrupts on machines when not using the APIC where the BIOS
doesn't program the ELCR to level trigger for the ACPI SCI.

Requested by:	njl

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Apr 21 02:10:58 2004 UTC (7 years, 9 months ago) by njl
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -4 lines
Don't check for NULL, device_get_softc() always succeeds.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat Feb 21 21:10:49 2004 UTC (7 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +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.16: download - view: text, markup, annotated - select for diffs
Sat Feb 21 19:42:54 2004 UTC (7 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +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.15: download - view: text, markup, annotated - select for diffs
Sat Nov 1 00:18:29 2003 UTC (8 years, 3 months ago) by njl
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +6 -5 lines
Change the reset video option to be positive (hw.acpi.reset_video).
Requested by:	jhb

Initialize the real mode stack.  This is needed at least for the return
address from the lcall.
Requested by:	takawata

Fix style bugs in acpi_wakecode.S
Requested by:	bde

Remove the kernel option now that we have the tunable.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Oct 30 16:14:55 2003 UTC (8 years, 3 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +10 -0 lines
Add sysctl MIB and loader tunable `hw.acpi.no_reset_video' as
the same effect as ACPI_NO_RESET_VIDEO kernel option.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Wed Sep 17 08:47:39 2003 UTC (8 years, 4 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +9 -0 lines
Add final adjustment code of battery status based on the battery capacity
rather than returning unknown status.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Sep 10 05:29:30 2003 UTC (8 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +11 -3 lines
Finish an earlier commit:

Add a acpi_SetDefaultIntrModel() method to allow drivers to set the
interrupt model prior to the acpi0 device being probed and attached.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Aug 28 16:26:24 2003 UTC (8 years, 5 months ago) by njl
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +24 -50 lines
Style cleanups.

Revision 1.10.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 22 20:49:21 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.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +0 -0 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.10: download - view: text, markup, annotated - select for diffs
Mon Jun 2 06:16:45 2003 UTC (8 years, 8 months ago) by obrien
Branches: MAIN
Branch point for: RELENG_4
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -2 lines
Use __FBSDID().

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue May 13 16:59:46 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.8: preferred, colored
Changes since revision 1.8: +4 -0 lines
Add some extra #ifdef stubs so that this compiles on 4.8.

Approved by:	re (rwatson/bmah)

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Mar 24 19:14:45 2003 UTC (8 years, 10 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -1 lines
Use repo-copied files in sys/i386/bios.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Mar 3 12:15:48 2003 UTC (8 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +7 -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.6: download - view: text, markup, annotated - select for diffs
Thu Nov 21 20:55:22 2002 UTC (9 years, 2 months ago) by jhb
Branches: MAIN
CVS tags: RELENG_5_0_BP, RELENG_5_0_0_RELEASE, RELENG_5_0
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +1 -1 lines
*sigh*.  It seems that in the ACPICA code, Intel defines its own APIC_IO
macro for use when parsing MADT tables, thus we always tried to set the
interrupt model to APIC.  This proved to be harmful on UP machines with
IO APIC's (or for UP kernels on SMP machines) since the wrong interrupt
routing information would be returned.

Pointy hat to:	jhb
Approved by:	re (rwatson)

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Oct 16 17:20:43 2002 UTC (9 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -0 lines
Include <sys/select.h> on -stable instead of <sys/selinfo.h> to get the
definition of struct selinfo.

Sponsored by:	The Weather Channel

Revision 1.4: 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.3: preferred, colored
Changes since revision 1.3: +4 -4 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.3: download - view: text, markup, annotated - select for diffs
Mon Sep 30 18:45:20 2002 UTC (9 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +6 -0 lines
Trash the PnPBIOStable pointer later on when we know that the acpi probe
and attach routines have succeeded so that if they fail we can still use
the PnP BIOS to find ISA on-board devices.  The fact that we do this here
is gross but fixing it properly involves a lot more work.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Fri Sep 6 17:02:01 2002 UTC (9 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -0 lines
If we are using APIC_IO tell ACPI so it can route interrupts properly.
This still doesn't work quite right because of other APIC_IO hacks in
the i386 PCI code.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Oct 26 17:42:53 2001 UTC (10 years, 3 months ago) by iwasaki
Branches: MAIN
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

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