The NetBSD Project

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

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / acpi

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.255 / (download) - annotate - [select for diffs], Sun Sep 23 00:31:06 2012 UTC (7 months, 3 weeks ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, tls-maxphys-nbase, tls-maxphys-base, khorben-n900, agc-symver-base, agc-symver, HEAD
Changes since 1.254: +21 -20 lines
Diff to previous 1.254 (colored)

locate PCI buses and determine their bus numbers using the info
previously extracted from ACPICA rather than trying to figure it out again.
allow PCI buses that don't have a _PRT method.

Revision 1.254 / (download) - annotate - [select for diffs], Tue Aug 14 14:38:02 2012 UTC (9 months ago) by jruoho
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.253: +3 -3 lines
Diff to previous 1.253 (colored)

Use KM_SLEEP.

Revision 1.253 / (download) - annotate - [select for diffs], Tue Apr 10 13:48:24 2012 UTC (13 months, 1 week ago) by jruoho
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Changes since 1.252: +3 -21 lines
Diff to previous 1.252 (colored)

Now that 6.0 is branched, remove the ACPI-related sysctl nodes in machdep.

Revision 1.252 / (download) - annotate - [select for diffs], Mon Nov 14 02:44:59 2011 UTC (18 months, 1 week ago) by jmcneill
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: netbsd-6, jmcneill-usbmp
Changes since 1.251: +3 -3 lines
Diff to previous 1.251 (colored)

add a machdep.dmi sysctl tree with the following read-only keys:
 system-vendor, system-product, system-version, system-serial, system-uuid
 bios-vendor, bios-version
 board-vendor, board-product, board-version, board-serial
the *-serial and *-uuid keys are marked with CTLFLAG_PRIVATE

a few of the pmf platform key names changed so update callers to match

Revision 1.251 / (download) - annotate - [select for diffs], Tue Oct 18 23:47:26 2011 UTC (19 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.250: +13 -2 lines
Diff to previous 1.250 (colored)

clear fixed events and disable GPEs before re-enabling interrupts on resume
from S1

Revision 1.250 / (download) - annotate - [select for diffs], Fri Aug 5 18:59:44 2011 UTC (21 months, 2 weeks ago) by jakllsch
Branch: MAIN
Changes since 1.249: +4 -16 lines
Diff to previous 1.249 (colored)

Turns out all we need is AcpiClearEvent in the right place,
and we don't really care if it fails.  Pointed out by jmcneill.

Revision 1.249 / (download) - annotate - [select for diffs], Fri Aug 5 18:27:48 2011 UTC (21 months, 2 weeks ago) by jakllsch
Branch: MAIN
Changes since 1.248: +17 -3 lines
Diff to previous 1.248 (colored)

As we add a handler for the ACPI fixed feature button events,
ensure they aren't going to trigger as soon as we enable interrupts,
furthermore ensure that the event is unmasked.

Revision 1.248 / (download) - annotate - [select for diffs], Mon Aug 1 11:25:59 2011 UTC (21 months, 2 weeks ago) by jmcneill
Branch: MAIN
Changes since 1.247: +42 -2 lines
Diff to previous 1.247 (colored)

add support for reset registers in PCI config space

Revision 1.247 / (download) - annotate - [select for diffs], Sun Jul 17 02:32:01 2011 UTC (22 months ago) by jakllsch
Branch: MAIN
Changes since 1.246: +3 -3 lines
Diff to previous 1.246 (colored)

"successfully" spell "succesfully" in a comment.

Revision 1.246 / (download) - annotate - [select for diffs], Tue Jun 21 03:37:21 2011 UTC (23 months ago) by jruoho
Branch: MAIN
Changes since 1.245: +3 -3 lines
Diff to previous 1.245 (colored)

Rename acpi_get_node() to acpi_match_node() for consistency.

Revision 1.245 / (download) - annotate - [select for diffs], Tue Jun 14 13:59:23 2011 UTC (23 months, 1 week ago) by jruoho
Branch: MAIN
Changes since 1.244: +22 -2 lines
Diff to previous 1.244 (colored)

Try to attach hpet(4) also via a specific HPET table. Fixes PR kern/43702.

Revision 1.244 / (download) - annotate - [select for diffs], Mon Jun 13 09:37:23 2011 UTC (23 months, 1 week ago) by jruoho
Branch: MAIN
Changes since 1.243: +8 -8 lines
Diff to previous 1.243 (colored)

Call _PDC only after AcpiInitializeObjects(ACPI_FULL_INITIALIZATION).

Revision 1.243 / (download) - annotate - [select for diffs], Sun Jun 12 10:11:52 2011 UTC (23 months, 1 week ago) by jruoho
Branch: MAIN
Changes since 1.242: +10 -4 lines
Diff to previous 1.242 (colored)

Move the evaluation of the _PDC control method out from the acpicpu(4)
driver to the main acpi(4) stack. Follow Linux and evaluate it early.
Should fix PR port-amd64/42895, possibly also PR kern/42583, and many
other comparable bugs.

A common sense explanation is that Intel supplies additional CPU tables to
OEMs. BIOS writers do not bother to modify their DSDTs, but instead load
these extra tables dynamically as secondary SSDT tables. The actual Load()
happens when the _PDC method is invoked, and thus namespace errors occur
when the CPU-specific ACPI methods are not yet present but referenced in the
AML by various drivers, including, but not limited to, acpitz(4).

Revision 1.242 / (download) - annotate - [select for diffs], Fri Jun 3 09:15:02 2011 UTC (23 months, 2 weeks ago) by jruoho
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Changes since 1.241: +11 -6 lines
Diff to previous 1.241 (colored)

Flush CPU caches before entering S1, as noted in the specifications.

Revision 1.241 / (download) - annotate - [select for diffs], Tue May 31 14:27:44 2011 UTC (23 months, 3 weeks ago) by jruoho
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.240: +13 -4 lines
Diff to previous 1.240 (colored)

Fix a bug where the S1 state was exited via AcpiLeaveSleepState() with
interrupts being off at machine-level. Also add some comments.

Revision 1.240 / (download) - annotate - [select for diffs], Sun Feb 27 17:10:33 2011 UTC (2 years, 2 months ago) by jruoho
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.239: +4 -5 lines
Diff to previous 1.239 (colored)

Move acpicpu(4) from "acpinodebus" to "cpufeaturebus".

Revision 1.239 / (download) - annotate - [select for diffs], Sun Feb 20 16:24:54 2011 UTC (2 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.238: +10 -19 lines
Diff to previous 1.238 (colored)

Use kmem(9). Also retire ACPI_PCI_FIXUP and PCI_INTR_FIXUP_DISABLED #ifdefs.

Revision 1.238 / (download) - annotate - [select for diffs], Sun Feb 20 06:45:32 2011 UTC (2 years, 3 months ago) by jruoho
Branch: MAIN
Changes since 1.237: +32 -83 lines
Diff to previous 1.237 (colored)

Add quirk support for _OSI strings introduced in ACPICA 20110211. While
here, clean up acpi_probe() and the quirk code. Remove #ifdef ACPI_DEBUGGER.

Revision 1.237 / (download) - annotate - [select for diffs], Sat Feb 19 09:52:32 2011 UTC (2 years, 3 months ago) by jruoho
Branch: MAIN
Changes since 1.236: +3 -2 lines
Diff to previous 1.236 (colored)

Revisit the wake-device code once more.

  1. Remove the AcpiEnableGpe() call. This was wrong.

  2. Only call _PSW or _DSW for devices that are scheduled for wake.
     This was an old bug.

  3. Only enable wake GPEs during suspend. Disabling these for
     devices not setup for wake was causing problems.

  4. No wake GPEs should be enabled at runtime.
     Unconditionally disable these during resume.

This should make the wake-device code work again. Note that waking via
pckbd(4) has always been unreliable; the _PRW object is not typically located
under the PC keyboard object, but in the parent of it (e.g. the LPC bridge).

Revision 1.236 / (download) - annotate - [select for diffs], Thu Feb 17 19:36:49 2011 UTC (2 years, 3 months ago) by jruoho
Branch: MAIN
Changes since 1.235: +19 -5 lines
Diff to previous 1.235 (colored)

As explained in the new ACPICA documentation, as of ACPICA 20101207, the
_PRW methods are no longer automatically executed as part of the ACPICA
initialization. Refactor and rewrite the wake-device code to account this.

Revision 1.235 / (download) - annotate - [select for diffs], Tue Feb 15 20:24:11 2011 UTC (2 years, 3 months ago) by jruoho
Branch: MAIN
CVS Tags: bouyer-quota2-base
Changes since 1.234: +5 -4 lines
Diff to previous 1.234 (colored)

Reset the firmware waking vector on resume. Adapted from FreeBSD and Linux.
No functional change intended.

Revision 1.234 / (download) - annotate - [select for diffs], Mon Jan 17 15:49:13 2011 UTC (2 years, 4 months ago) by jmcneill
Branch: MAIN
Branch point for: bouyer-quota2
Changes since 1.233: +8 -2 lines
Diff to previous 1.233 (colored)

Add a driver for ACPI "Watchdog Resource Table" devices.

  acpiwdrt0 at acpi0: mem 0xfed01000,0xfed01004
  acpiwdrt0: PCI 0:000:00:0 vendor 0x1106 product 0x3337
  acpiwdrt0: watchdog interval 1-1023 sec.

Revision 1.233 / (download) - annotate - [select for diffs], Thu Jan 13 05:58:05 2011 UTC (2 years, 4 months ago) by jruoho
Branch: MAIN
CVS Tags: jruoho-x86intr-base
Branch point for: jruoho-x86intr
Changes since 1.232: +44 -53 lines
Diff to previous 1.232 (colored)

Clean-up acpi_print(). XXX: The 'acpiverbose' module is still broken...

Revision 1.232 / (download) - annotate - [select for diffs], Thu Jan 13 05:14:48 2011 UTC (2 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.231: +10 -2 lines
Diff to previous 1.231 (colored)

Scan for docking stations.

Revision 1.231 / (download) - annotate - [select for diffs], Thu Jan 13 04:18:19 2011 UTC (2 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.230: +13 -9 lines
Diff to previous 1.230 (colored)

Do not try to attach more ACPI CPUs than the amount of "real" CPUs.

Revision 1.230 / (download) - annotate - [select for diffs], Tue Jan 11 20:35:24 2011 UTC (2 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.229: +7 -2 lines
Diff to previous 1.229 (colored)

Disable all GPEs when entering S5. Also add a comment that the function
acpi_enter_sleep_state() must be called with interrupts enabled.

Revision 1.229 / (download) - annotate - [select for diffs], Thu Jan 6 07:05:00 2011 UTC (2 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.228: +28 -21 lines
Diff to previous 1.228 (colored)

Split the code that makes a string from ACPI_DEVICE_INFO::Name to a function.

Revision 1.228 / (download) - annotate - [select for diffs], Thu Jan 6 06:49:12 2011 UTC (2 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.227: +169 -167 lines
Diff to previous 1.227 (colored)

Move the ACPI_ACTIVATE_DEV block around for clarity.

Revision 1.227 / (download) - annotate - [select for diffs], Wed Jan 5 08:08:47 2011 UTC (2 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.226: +6 -9 lines
Diff to previous 1.226 (colored)

Adjust previous slightly.

Revision 1.226 / (download) - annotate - [select for diffs], Wed Jan 5 07:58:04 2011 UTC (2 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.225: +52 -3 lines
Diff to previous 1.225 (colored)

Make a two-pass scan for acpinodebus. This should ensure that devices such
as acpiec(4) are attached before anything else. Numerous bugs are expected
to be fixed with this change.

Revision 1.225 / (download) - annotate - [select for diffs], Mon Jan 3 08:50:23 2011 UTC (2 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.224: +10 -2 lines
Diff to previous 1.224 (colored)

Scan for devices that are "hot-pluggable".

Revision 1.224 / (download) - annotate - [select for diffs], Sun Jan 2 06:05:47 2011 UTC (2 years, 4 months ago) by jruoho
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.223: +9 -5 lines
Diff to previous 1.223 (colored)

Use "real" device names for the hw.acpi.wake and hw.acpi.power sysctl(8)
trees. For instance, instead of hw.acpi.wake.DURT, we have hw.acpi.wake.wm0
for wm(4). This is a temporary solution, but without solving the big
abstraction questions, this is the best we can do.

Revision 1.223 / (download) - annotate - [select for diffs], Fri Dec 31 09:19:43 2010 UTC (2 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.222: +24 -5 lines
Diff to previous 1.222 (colored)

Move the ACPI sleep-specific sysctl variables to hw.acpi.sleep. The old
machdep-variables are provided for backwards compatibility (eventually these
should be removed). All ACPI sysctl variables are now under hw.acpi.

Revision 1.222 / (download) - annotate - [select for diffs], Sun Oct 24 07:53:04 2010 UTC (2 years, 6 months ago) by jruoho
Branch: MAIN
CVS Tags: uebayasi-xip-base4
Changes since 1.221: +17 -4 lines
Diff to previous 1.221 (colored)

Simplify acpi_enter_sleep_state() and guard it against NULL pointer
dereferences. Try to avoid referencing the global acpi_softc, which should
really be static or at least internal to acpi(4).

Revision 1.221 / (download) - annotate - [select for diffs], Tue Oct 12 19:10:50 2010 UTC (2 years, 7 months ago) by gsutre
Branch: MAIN
CVS Tags: uebayasi-xip-base3
Changes since 1.220: +3 -4 lines
Diff to previous 1.220 (colored)

Merge ACPI display driver.  Provides generic support for brightness
control and output switching, through ACPI video extensions.

TODO: use wsconsctl(8) instead of sysctl(8) for brightness control.

ok jruoho@
also discussed with cegger@ and jmcneill@

Revision 1.220 / (download) - annotate - [select for diffs], Sat Oct 2 18:06:47 2010 UTC (2 years, 7 months ago) by gsutre
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11
Changes since 1.219: +2 -11 lines
Diff to previous 1.219 (colored)

Drop _HID requirement for attachment under acpi(4).  From now on,
drivers attaching to the acpinodebus interface should not assume
that the passed acpi_devnode has a valid _HID.

ok jruoho@

Revision 1.219 / (download) - annotate - [select for diffs], Mon Sep 6 15:54:26 2010 UTC (2 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.218: +9 -2 lines
Diff to previous 1.218 (colored)

Add support for blacklisting ACPI BIOS implementations by year. By default,
don't use ACPI on BIOS which advertise release years <= 2000. This
can be changed by setting option ACPI_BLACKLIST_YEAR=0 or by setting
acpi_force_load=1.

Revision 1.218 / (download) - annotate - [select for diffs], Tue Aug 24 04:36:02 2010 UTC (2 years, 8 months ago) by pgoyette
Branch: MAIN
Changes since 1.217: +4 -3 lines
Diff to previous 1.217 (colored)

Initialize acpi_force_load so that it gets allocated in the data segment
rather than BSS.  This lets you change its value with 'gdb --write'.

OK jruoho@

Revision 1.217 / (download) - annotate - [select for diffs], Sun Aug 22 00:39:08 2010 UTC (2 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.216: +2 -5 lines
Diff to previous 1.216 (colored)

Don't put devices in the ignored IDs list just because no driver exists.

Revision 1.216 / (download) - annotate - [select for diffs], Sat Aug 21 13:18:35 2010 UTC (2 years, 9 months ago) by pgoyette
Branch: MAIN
Changes since 1.215: +3 -6 lines
Diff to previous 1.215 (colored)

Update the various xxx_verbose modules to conform to the module subsystem's
new locking protocol.

Revision 1.215 / (download) - annotate - [select for diffs], Mon Aug 9 09:36:42 2010 UTC (2 years, 9 months ago) by gsutre
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.214: +4 -2 lines
Diff to previous 1.214 (colored)

acpi_pcidev_scan: attach PCI information only to working devices.

ok jruoho@

Revision 1.214 / (download) - annotate - [select for diffs], Sat Aug 7 20:07:25 2010 UTC (2 years, 9 months ago) by jruoho
Branch: MAIN
Changes since 1.213: +10 -2 lines
Diff to previous 1.213 (colored)

Do not try to disable ACPI if we can not enter to legacy mode. While it is
safe to call AcpiDisable() even if a system operates only in ACPI mode, this
leads to unpleasantly verbose error messages in ACPICA.

Revision 1.213 / (download) - annotate - [select for diffs], Sat Aug 7 17:12:55 2010 UTC (2 years, 9 months ago) by jruoho
Branch: MAIN
Changes since 1.212: +3 -3 lines
Diff to previous 1.212 (colored)

Fix build failure.

Revision 1.212 / (download) - annotate - [select for diffs], Sat Aug 7 09:41:19 2010 UTC (2 years, 9 months ago) by jruoho
Branch: MAIN
Changes since 1.211: +116 -29 lines
Diff to previous 1.211 (colored)

Reorganize: also the APIC tables will be dumped in ACPIVERBOSE, and the
callback functions will be modified to be suitable also with other tables.

Revision 1.211 / (download) - annotate - [select for diffs], Fri Aug 6 23:38:34 2010 UTC (2 years, 9 months ago) by jruoho
Branch: MAIN
Changes since 1.210: +50 -60 lines
Diff to previous 1.210 (colored)

Simplify the acpiverbose module.

Revision 1.210 / (download) - annotate - [select for diffs], Fri Aug 6 22:45:00 2010 UTC (2 years, 9 months ago) by jruoho
Branch: MAIN
Changes since 1.209: +7 -23 lines
Diff to previous 1.209 (colored)

Remove the acpiwmi(4) dump from the ACPIVERBOSE module. Instead of this
complex solution, just use aprint_debug(9) in the driver.

Revision 1.209 / (download) - annotate - [select for diffs], Fri Aug 6 18:10:40 2010 UTC (2 years, 9 months ago) by jruoho
Branch: MAIN
Changes since 1.208: +5 -5 lines
Diff to previous 1.208 (colored)

Fix prototypes; SYSCTLFN_ARGS -> SYSCTLFN_PROTO.
(These things really only obscure the code.)

Revision 1.208 / (download) - annotate - [select for diffs], Sun Jul 25 12:54:46 2010 UTC (2 years, 9 months ago) by pgoyette
Branch: MAIN
Changes since 1.207: +7 -9 lines
Diff to previous 1.207 (colored)

Move setting of acpi_verbose_loaded flag into the module's init routine.
This ensures that the flag is set even if the module was manually loaded
by the user rather than just auto-loaded.

Revision 1.207 / (download) - annotate - [select for diffs], Sun Jul 18 09:29:12 2010 UTC (2 years, 10 months ago) by jruoho
Branch: MAIN
Changes since 1.206: +3 -4 lines
Diff to previous 1.206 (colored)

Merge a driver for ACPI CPUs with basic support for processor power states,
also known as C-states. The code is modular and provides an easy way to add
the remaining functionality later (namely throttling and P-states).

Remarks:

  1.	Commented out in the GENERICs; more testing exposure is needed.

  2.	The C3-state is disabled for the time being because it turns off
	timers, among them the local APIC timer. This may not be universally
	true on all x86 processors; define ACPICPU_ENABLE_C3 to test.

  3.	The algorithm used to choose a power state may need tuning. When
	evaluating the appropriate state, the implementation uses the
	previous sleep time as an indicator. Additional hints would include
	for example the system load.

	Also bus master activity is evaluated when choosing a state. The
	usb(4) stack is notorious for such activity even when unused.
	Typically it must be disabled in order to reach the C3-state,
	but it may also prevent the use of C2.

  4.	While no extensive empirical measurements have been carried out, the
	power savings are somewhere between 1-2 W with C1 and C2, depending
	on the processor, firmware, and load. With C3 even up to 4 W can be
	saved.  The less something ticks, the more power is saved.

ok jmcneill@, joerg@, and discussed with various people.

Revision 1.206 / (download) - annotate - [select for diffs], Sat Jul 10 13:08:09 2010 UTC (2 years, 10 months ago) by jruoho
Branch: MAIN
Changes since 1.205: +4 -3 lines
Diff to previous 1.205 (colored)

Export the wrapper functions that read from the ACPI PM timer.
Needed for ACPI CPUs. Also KNF, cosmetics. No functional change.

Revision 1.205 / (download) - annotate - [select for diffs], Fri Jul 2 05:18:38 2010 UTC (2 years, 10 months ago) by jruoho
Branch: MAIN
Changes since 1.204: +2 -4 lines
Diff to previous 1.204 (colored)

Remove PNP0C01 and PNP0C02 from the list of ignored HIDs (and CIDs).

Fixes PR kern/42937 from Ryo Onodera.

As acpi_match_hid() matches also "compatible IDs" (CIDs), we must be careful
when adding devices to this list. For example, the above PR revealed that
the following is a fairly typical way to define the HPET device:

   Device (HPET)
                 {
                     Name (_HID, EisaId ("PNP0103"))
                     Name (_CID, EisaId ("PNP0C01"))
				...

Arguably this is a BIOS bug, given that PNP0C01 and PNP0C02 should uniquely
identify a device (or a resource template) that has nothing to do with HPET.

Revision 1.204 / (download) - annotate - [select for diffs], Fri Jul 2 05:00:48 2010 UTC (2 years, 10 months ago) by jruoho
Branch: MAIN
Changes since 1.203: +6 -14 lines
Diff to previous 1.203 (colored)

Simplify a little by removing the redundant acpi_rescan1().

Revision 1.203 / (download) - annotate - [select for diffs], Thu Jun 10 20:36:55 2010 UTC (2 years, 11 months ago) by jruoho
Branch: MAIN
Changes since 1.202: +8 -5 lines
Diff to previous 1.202 (colored)

A small nit from the spec: _PSW should be called after _PTS. Thus call the
wakedev routine after AcpiEnterSleepStatePrep(). Unlikely to make any
difference whatsoever, but there might always be a BIOS writer who disagrees.

Revision 1.202 / (download) - annotate - [select for diffs], Mon Jun 7 17:13:52 2010 UTC (2 years, 11 months ago) by jruoho
Branch: MAIN
Changes since 1.201: +17 -9 lines
Diff to previous 1.201 (colored)

Use the new ACPICA functions AcpiAttachData() and AcpiGetData() to associate
all "struct acpi_devnodes" to their corresponding ACPI_HANDLEs. Anywhere in
the acpi(4) subtree, the node-structure can be obtained from a handle via
acpi_get_node(). The idea is similar to e.g. device_private().

Benefits: (a) simplifies code, (b) avoids issues with locking as ACPICA does
the serialization for us, (c) avoids the need to access the glocal softc, and
(d) avoids the O(n) loop required to search for a handle from the node queue.

Revision 1.201 / (download) - annotate - [select for diffs], Mon Jun 7 13:04:31 2010 UTC (2 years, 11 months ago) by jruoho
Branch: MAIN
Changes since 1.200: +4 -11 lines
Diff to previous 1.200 (colored)

Build the power resource queue dynamically. This eliminates the need to call
acpi_power_res_add() in the main scan function, also saving few bytes of
memory.

Revision 1.200 / (download) - annotate - [select for diffs], Mon Jun 7 01:45:27 2010 UTC (2 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.199: +47 -24 lines
Diff to previous 1.199 (colored)

Update acpiverbose module to use module_autoload() rather than module_load().
Load the module right before each attempt to use its features, and let the
module subsystem handle unloading.

Revision 1.199 / (download) - annotate - [select for diffs], Sun Jun 6 10:44:40 2010 UTC (2 years, 11 months ago) by jruoho
Branch: MAIN
Changes since 1.198: +8 -7 lines
Diff to previous 1.198 (colored)

Although sysmon_pswitch_unregister(9) does not currently do anything, in
order to be ready for possible future API changes, call it if we failed to
install the fixed event handlers. Also small ACPI_DEBUG_PRINT clarifications.

Revision 1.198 / (download) - annotate - [select for diffs], Sat Jun 5 06:07:12 2010 UTC (2 years, 11 months ago) by jruoho
Branch: MAIN
Changes since 1.197: +6 -6 lines
Diff to previous 1.197 (colored)

Remove trailing white space.

Revision 1.197 / (download) - annotate - [select for diffs], Mon May 31 20:32:29 2010 UTC (2 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.196: +44 -96 lines
Diff to previous 1.196 (colored)

Extract ACPIVERBOSE into a kernel module.  The module can be builtin
by defining 'options ACPIVERBOSE' in the kernel config file (no change
from current behavior), or it can be loaded at boot time on those
architectures that support the boot loader's "load" command.

ACPIVERBOSE also includes code to dump acpi/wmi data.

Revision 1.196 / (download) - annotate - [select for diffs], Sun May 23 22:05:54 2010 UTC (2 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.195: +3 -3 lines
Diff to previous 1.195 (colored)

no need for double the newlines!

Revision 1.195 / (download) - annotate - [select for diffs], Wed May 12 16:11:05 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.194: +3 -10 lines
Diff to previous 1.194 (colored)

When scanning the device "capabilities" (power, wake-up, etc.),
include all device nodes, regardless of the status of the device.

XXX: It is known that some systems implement the _STA method incorrectly.
     If needed in the future, attachment based on the values from this
     method may need revisiting. Same goes for ACPI_ACTIVATE_DEV.

Revision 1.194 / (download) - annotate - [select for diffs], Tue Apr 27 08:36:06 2010 UTC (3 years ago) by jruoho
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.193: +8 -11 lines
Diff to previous 1.193 (colored)

Make acpi_enter_sleep_state() not to return. No one cared what it returned.

Revision 1.193 / (download) - annotate - [select for diffs], Tue Apr 27 05:34:14 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.192: +18 -32 lines
Diff to previous 1.192 (colored)

Clean up <dev/acpi/acpireg.h>. While documenting the control methods is an
admirable goal, it is pretty much mission impossible; the specifications are
nearly thousand pages each and the amount of methods is counted in hundreds.

In addition, use ACPICA's native constants from <actypes.h> when possible.
Also move ACPI_STA_OK from "mpacpi.c" to <dev/acpi/acpireg.h> to simplify
the evaluation of device status.

Revision 1.192 / (download) - annotate - [select for diffs], Mon Apr 26 04:31:09 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.191: +76 -71 lines
Diff to previous 1.191 (colored)

Move the ACPIVERBOSE blocks to a single place.

Also print non-devices in the EISAID/HID/UID/ADR-block

Revision 1.191 / (download) - annotate - [select for diffs], Sun Apr 25 17:06:23 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.190: +3 -3 lines
Diff to previous 1.190 (colored)

Return instead of breaking out if the sleep state is not available.

Revision 1.190 / (download) - annotate - [select for diffs], Sun Apr 25 17:03:08 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.189: +17 -15 lines
Diff to previous 1.189 (colored)

As noted by jmcneill@, the specifications specifically mention that the _TTS
should be invoked before the system has notified any native mode device
drivers. Thus, do the call before pmf_system_suspend(9).

Revision 1.189 / (download) - annotate - [select for diffs], Sun Apr 25 10:05:22 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.188: +21 -2 lines
Diff to previous 1.188 (colored)

Evaluate _TTS on sleep state transitions. This is mainly to pro-actively
support some weird BIOS, which may require the evaluation. Ok jmcneill@.

Revision 1.188 / (download) - annotate - [select for diffs], Sun Apr 25 09:12:38 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.187: +9 -2 lines
Diff to previous 1.187 (colored)

Add a note about AcpiEnterSleepStatePrep().

Revision 1.187 / (download) - annotate - [select for diffs], Sat Apr 24 19:51:15 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.186: +4 -4 lines
Diff to previous 1.186 (colored)

Embarrassing typos: _PI_ -> _SI_, _PB_ -> _SB_.

Revision 1.186 / (download) - annotate - [select for diffs], Sat Apr 24 19:36:14 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.185: +5 -5 lines
Diff to previous 1.185 (colored)

Do not use __func__ with ACPI_DEBUG_PRINT (it already adds it).

Revision 1.185 / (download) - annotate - [select for diffs], Sat Apr 24 13:42:18 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.184: +70 -16 lines
Diff to previous 1.184 (colored)

Fix a bug involving acpitz(4) accidentally attaching to the _TZ_ scope.

This in turn was caused by a bug in ACPICA, which reports the types of _SB_
and _TZ_ scopes incorrectly for its own internal reasons (utglobal.c):

  /*
   * Predefined ACPI Names (Built-in to the Interpreter)
   *
   * NOTES:
   * 1) _SB_ is defined to be a device to allow \_SB_._INI to be run
   *    during the initialization sequence.
   * 2) _TZ_ is defined to be a thermal zone in order to allow ASL code to
   *    perform a Notify() operation on it.
   */

Thanks to cegger@ for noticing the bug and testing a fix.

Revision 1.184 / (download) - annotate - [select for diffs], Fri Apr 23 18:51:31 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.183: +3 -3 lines
Diff to previous 1.183 (colored)

Add hw.acpi.power sysctl-node.

Revision 1.183 / (download) - annotate - [select for diffs], Fri Apr 23 07:04:18 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.182: +9 -8 lines
Diff to previous 1.182 (colored)

Make the ACPIVERBOSE output even prettier by removing cruft.

Revision 1.182 / (download) - annotate - [select for diffs], Thu Apr 22 21:58:08 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.181: +31 -23 lines
Diff to previous 1.181 (colored)

Some pretty printing for ACPIVERBOSE.

Revision 1.181 / (download) - annotate - [select for diffs], Thu Apr 22 18:40:09 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.180: +21 -11 lines
Diff to previous 1.180 (colored)

Merge new code for ACPI power resources.

The old code served us well, but a major overhaul would have been needed for
it to cope with the increased demands of the code -- and the specifications.

ok jmcneill@, pgoyette@

Revision 1.180 / (download) - annotate - [select for diffs], Thu Apr 22 14:50:30 2010 UTC (3 years ago) by jruoho
Branch: MAIN
Changes since 1.179: +3 -2 lines
Diff to previous 1.179 (colored)

From Gregoire Sutre: rework the ACPI PCI support. This makes ACPI to
correctly pick PCI segment groups, PCI bus numbers, PCI root bridges,
PCI-to-PCI bridges, and PCI devices, among other things. In short: it is
more robust than the old code or anything in sys/arch/x86/x86/mpacpi.c.

ok cegger@, jmcneill@

Revision 1.179 / (download) - annotate - [select for diffs], Tue Apr 20 04:57:04 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.178: +2 -27 lines
Diff to previous 1.178 (colored)

Remove the block where the default address space handlers were manually
installed via AcpiInstallAddressSpaceHandler(). This was already commented
out because ACPICA does this for us when ACPI_NO_ADDRESS_SPACE_INIT is not
specified when calling AcpiEnableSubsystem().

Revision 1.178 / (download) - annotate - [select for diffs], Tue Apr 20 04:53:22 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.177: +10 -12 lines
Diff to previous 1.177 (colored)

Instruct ACPICA to dynamically allocate the table descriptions in
AcpiInitializeTables() instead of pushing 128 statically allocated
descriptors. This will eliminate also the need to call
AcpiReallocateRootTable().

The rationale for the statically allocated table descriptors is to allow
initialization without virtual/dynamic memory. Later these should be copied
to dynamic memory via AcpiReallocateRootTable(). But since in NetBSD both
functions were called in the very same acpi_probe(), this dance was
completely unnecessary.

Revision 1.177 / (download) - annotate - [select for diffs], Sun Apr 18 14:07:16 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.176: +2 -5 lines
Diff to previous 1.176 (colored)

Remove a duplicate variable assignment.

Revision 1.176 / (download) - annotate - [select for diffs], Sun Apr 18 14:05:26 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.175: +91 -13 lines
Diff to previous 1.175 (colored)

From Gregoire Sutre:

  Modify the main ACPI namespace scan by including a parent-child
  relationship for each node. The result is a bi-directional tree.

ok jmcneill@

Revision 1.175 / (download) - annotate - [select for diffs], Thu Apr 15 07:02:24 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.174: +134 -4 lines
Diff to previous 1.174 (colored)

As discussed with jmcneill@, install a global "bus notification handler"
that receives all notifications and deliver notifications to drivers via it.

Revision 1.174 / (download) - annotate - [select for diffs], Thu Apr 15 04:03:38 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.173: +20 -24 lines
Diff to previous 1.173 (colored)

Arrange some comments.

Revision 1.173 / (download) - annotate - [select for diffs], Wed Apr 14 19:27:28 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.172: +5 -4 lines
Diff to previous 1.172 (colored)

No need to spread the ACPICA type system any more than is necessary:

	UINT8 -> uint8_t and UINT32 -> uint32_t.

Revision 1.172 / (download) - annotate - [select for diffs], Wed Apr 14 18:39:56 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.171: +102 -88 lines
Diff to previous 1.171 (colored)

Simplify error reporting, remove casts, KNF.

Revision 1.171 / (download) - annotate - [select for diffs], Wed Apr 14 17:20:19 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.170: +5 -58 lines
Diff to previous 1.170 (colored)

Remove the code that was copy-pasted to acpi_detach() from the attachment
routine. Add a note that the detachment is incomplete.

Revision 1.170 / (download) - annotate - [select for diffs], Wed Apr 14 17:14:45 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.169: +2 -22 lines
Diff to previous 1.169 (colored)

Remove the #if 0'ed acpi_disable().

Revision 1.169 / (download) - annotate - [select for diffs], Wed Apr 14 17:12:14 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.168: +485 -861 lines
Diff to previous 1.168 (colored)

Reorganize the main file: add several missing prototypes, move the functions
around so that they appear in their logical order and place, etc. In
addition, split the utility functions to a separate file.

No functional change. Ok jmcneill@.

Revision 1.168 / (download) - annotate - [select for diffs], Wed Apr 14 06:10:32 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.167: +112 -78 lines
Diff to previous 1.167 (colored)

Refactor the fixed-event handlers.

Also provide a detachment routine for these and fix a trivial bug;
a wrong structure was used when registering a sysmon_pswitch(9) switch.

Revision 1.167 / (download) - annotate - [select for diffs], Mon Apr 12 18:59:08 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.166: +5 -22 lines
Diff to previous 1.166 (colored)

Scan the namespace from the root object instead of scanning from separate
scopes. Also raise the namespace walk from 100 (per scope) to UINT32_MAX.

ok jmcneill@

Revision 1.166 / (download) - annotate - [select for diffs], Mon Apr 12 18:55:27 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.165: +116 -72 lines
Diff to previous 1.165 (colored)

Remove some unused and global variables. Make the code more readable. Deny
invalid writes to machdep.sleep_state. Cosmetics. No functional change.

Revision 1.165 / (download) - annotate - [select for diffs], Mon Apr 12 12:14:26 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.164: +104 -35 lines
Diff to previous 1.164 (colored)

Rework the sysctl-support.

Changes:

	hw.wake			->	hw.acpi.wake
	hw.acpi.debug_layer	->	hw.acpi.debug.layer
	hw.acpi.debug_level	->	hw.acpi.debug.level

Additions:

	hw.acpi.stat.gpe	# Number of dispatched GPEs
	hw.acpi.stat.sci	# Number of SCI interrupts
	hw.acpi.stat.fixed	# Number of fixed events
	hw.acpi.stat.method	# Number of executed methods

ok jmcneill@

Revision 1.164 / (download) - annotate - [select for diffs], Thu Apr 8 04:40:51 2010 UTC (3 years, 1 month ago) by jruoho
Branch: MAIN
Changes since 1.163: +3 -3 lines
Diff to previous 1.163 (colored)

ACPICA 20091112:

	Implemented a post-order callback to AcpiWalkNamespace. The existing
        interface only has a pre-order callback. This change adds an
        additional parameter for a post-order callback which will be more
        useful for bus scans.  ACPICA BZ 779. Lin Ming. Updated the ACPICA
        Programmer Reference.

We will use the old "pre-order callback" for the time being.

Revision 1.163 / (download) - annotate - [select for diffs], Mon Mar 29 16:35:59 2010 UTC (3 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.162: +4 -4 lines
Diff to previous 1.162 (colored)

Attach acpiecdt with acpibus_attach_args.  Sverre Froyen reports that
this helps his Thinkpad boot again.

Revision 1.162 / (download) - annotate - [select for diffs], Mon Mar 22 11:13:23 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.161: +4 -3 lines
Diff to previous 1.161 (colored)

Add IFX0102 and PNP0C15. Fix INT0800.

Observed from the dmesg of njoly@'s Sony VAIO VGN-BZ12VN.

Revision 1.161 / (download) - annotate - [select for diffs], Tue Mar 16 08:02:01 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.160: +4 -10 lines
Diff to previous 1.160 (colored)

Remove the call to AcpiGetType() in acpi_make_devnode(). This is the same
information as ACPI_DEVICE_INFO::Type, obtained later by AcpiGetObjectInfo().

Revision 1.160 / (download) - annotate - [select for diffs], Tue Mar 16 05:48:42 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.159: +70 -3 lines
Diff to previous 1.159 (colored)

With the intent of making 'struct acpi_devnode' as the central place for
information related to ACPI device nodes: (a) introduce a generic scan
function for ACPI device driver "capabilities", and (b) eliminate local data
structures from ACPI wake-devices. Discussed with jmcneill@.

Revision 1.159 / (download) - annotate - [select for diffs], Wed Mar 10 09:42:46 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Branch point for: rmind-uvmplock
Changes since 1.158: +72 -50 lines
Diff to previous 1.158 (colored)

Move the ACPI_ACTIVATE_DEV block to one place. While there, provide missing
prototype for a function, try to make the code more simple, guard against a
potential NULL pointer dereference, and improve printing.

No functional change intended.

Revision 1.158 / (download) - annotate - [select for diffs], Wed Mar 10 08:12:44 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.157: +22 -18 lines
Diff to previous 1.157 (colored)

Some pretty printing for ACPIVERBOSE.

Revision 1.157 / (download) - annotate - [select for diffs], Tue Mar 9 18:15:21 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Changes since 1.156: +75 -108 lines
Diff to previous 1.156 (colored)

Remove the namespace scopes.

These are neither used nor useful beyond the parser and interpreter.

ok jmcneill@, joerg@

Revision 1.156 / (download) - annotate - [select for diffs], Fri Mar 5 21:01:44 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.155: +3 -3 lines
Diff to previous 1.155 (colored)

Preparing a device for wakeup involves:

  (a) turning on all power resources required by the device; and
  (b) executing _DSW (or _PSW) control method.

This implements (b). Ok jmcneill@.

Revision 1.155 / (download) - annotate - [select for diffs], Fri Mar 5 14:00:16 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.154: +6 -7 lines
Diff to previous 1.154 (colored)

Remove <dev/acpi/acpica.h> from all files. It is included from
<dev/acpi/acpivar.h>. Ditto for <dev/sysmon/sysmonvar.h>, <sys/bus.h>,
<dev/pci/pcivar.h>, and <dev/isa/isavar.h>.

Also nuke a lot of unused and invalid headers. Some of these are audibly
provided by standard headers (namely <sys/param.h> and <sys/device.h>), some
have nothing to do with ACPI devices (e.g. <sys/syslog.h>), and some are
nonexistent local includes (e.g. "mpu_ym.h"). Moreoever, try to group the
includes into their respective blocks.

Tested with GENERIC and ALL (i386). No functional change.

Revision 1.154 / (download) - annotate - [select for diffs], Thu Mar 4 23:25:07 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.153: +7 -16 lines
Diff to previous 1.153 (colored)

Remove ACPI_BUT_DEBUG by using ACPI_DEBUG_PRINT(x) instead.

Revision 1.153 / (download) - annotate - [select for diffs], Thu Mar 4 20:17:30 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.152: +6 -6 lines
Diff to previous 1.152 (colored)

Fix ACPI_DEBUG build failures reported by Greg A. Woods.

Revision 1.152 / (download) - annotate - [select for diffs], Wed Mar 3 06:57:05 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.151: +3 -3 lines
Diff to previous 1.151 (colored)

Convert the single instance of ACPI_EXTRA_DEBUG to ACPIVERBOSE.

Revision 1.151 / (download) - annotate - [select for diffs], Wed Mar 3 06:54:25 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.150: +82 -71 lines
Diff to previous 1.150 (colored)

Refactor acpi_make_devnode() to make it a little more readable.

No functional change intended.

Revision 1.150 / (download) - annotate - [select for diffs], Tue Mar 2 18:44:46 2010 UTC (3 years, 2 months ago) by jruoho
Branch: MAIN
Changes since 1.149: +5 -5 lines
Diff to previous 1.149 (colored)

Format string cosmetics (mainly from %d to %u).

Revision 1.149 / (download) - annotate - [select for diffs], Wed Feb 24 22:37:56 2010 UTC (3 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.148: +6 -6 lines
Diff to previous 1.148 (colored)

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.

Revision 1.148 / (download) - annotate - [select for diffs], Sun Jan 31 11:26:20 2010 UTC (3 years, 3 months ago) by jruoho
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.147: +6 -2 lines
Diff to previous 1.147 (colored)

Add dynamic debug options for ACPI_DEBUG kernels.

ok jmcneill@, pooka@, pgoyette@

Revision 1.147 / (download) - annotate - [select for diffs], Mon Jan 18 18:49:27 2010 UTC (3 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.146: +26 -15 lines
Diff to previous 1.146 (colored)

Fix and improve several comments.

Revision 1.146 / (download) - annotate - [select for diffs], Mon Jan 18 18:06:31 2010 UTC (3 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.145: +34 -2 lines
Diff to previous 1.145 (colored)

Introduce acpi_eval_reference_handle() --

an utility function to evaluate reference handles from package elements.

ok jmcneill@, pgoyette@

Revision 1.145 / (download) - annotate - [select for diffs], Mon Jan 18 17:34:37 2010 UTC (3 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.144: +31 -17 lines
Diff to previous 1.144 (colored)

Ensure that the return string is NUL-terminated in acpi_eval_string().

ok jmcneill@, pgoyette@

Revision 1.144 / (download) - annotate - [select for diffs], Tue Jan 12 12:21:04 2010 UTC (3 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.143: +46 -14 lines
Diff to previous 1.143 (colored)

Properly evaluate the _PRW object in case we have a package inside a
package.

ok jmcneill@

Revision 1.143 / (download) - annotate - [select for diffs], Sat Jan 9 15:43:12 2010 UTC (3 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.142: +3 -2 lines
Diff to previous 1.142 (colored)

Add "ACPI fans" to the list of ignored HIDs, as discussed on port-i386@.

Revision 1.142 / (download) - annotate - [select for diffs], Fri Jan 8 20:40:40 2010 UTC (3 years, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.141: +6 -6 lines
Diff to previous 1.141 (colored)

Expand PMF_FN_* macros.

Revision 1.141 / (download) - annotate - [select for diffs], Fri Jan 8 00:09:44 2010 UTC (3 years, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.140: +2 -9 lines
Diff to previous 1.140 (colored)

Move all copies of ifattr_match() to sys/kern/subr_autoconf.c.

Revision 1.140 / (download) - annotate - [select for diffs], Tue Jan 5 13:39:49 2010 UTC (3 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.139: +4 -6 lines
Diff to previous 1.139 (colored)

Use acpi_eval_struct() to simplify code.

ok pgoyette@, jmcneill@

Revision 1.139 / (download) - annotate - [select for diffs], Thu Dec 31 10:07:13 2009 UTC (3 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.138: +2 -6 lines
Diff to previous 1.138 (colored)

Remove unused locking variables.

ok pgoyette@, jmcneill@

Revision 1.138 / (download) - annotate - [select for diffs], Thu Dec 31 10:02:51 2009 UTC (3 years, 4 months ago) by jruoho
Branch: MAIN
Changes since 1.137: +3 -2 lines
Diff to previous 1.137 (colored)

Add Intel HW Random Number Generator to the list of ignored HIDs.

ok pgoyette@, jmcneill@

Revision 1.137 / (download) - annotate - [select for diffs], Thu Dec 3 21:04:29 2009 UTC (3 years, 5 months ago) by cegger
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.136: +6 -3 lines
Diff to previous 1.136 (colored)

Enumerate ACPI PCI devices. Allows to link PCI with ACPI devices.
Patch presented on tech-kern@
http://mail-index.netbsd.org/tech-kern/2009/11/28/msg006552.html

'nice work' Jukka Ruohonen

Revision 1.136 / (download) - annotate - [select for diffs], Sun Nov 29 21:32:50 2009 UTC (3 years, 5 months ago) by cegger
Branch: MAIN
Changes since 1.135: +20 -2 lines
Diff to previous 1.135 (colored)

Introduce acpi_eval_set_integer().
Use it in various acpi drivers to simplify code.
Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2009/11/28/msg006552.html

No comments.

XXX Is there an acpi(9) manpage?

Revision 1.135 / (download) - annotate - [select for diffs], Sat Nov 28 17:03:17 2009 UTC (3 years, 5 months ago) by cegger
Branch: MAIN
Changes since 1.134: +7 -6 lines
Diff to previous 1.134 (colored)

initialise -> initialize
unabled -> unable
wrap long line

Revision 1.134 / (download) - annotate - [select for diffs], Sat Nov 14 09:54:10 2009 UTC (3 years, 6 months ago) by cegger
Branch: MAIN
Changes since 1.133: +4 -4 lines
Diff to previous 1.133 (colored)

use __arraycount

Revision 1.133 / (download) - annotate - [select for diffs], Wed Sep 16 16:34:49 2009 UTC (3 years, 8 months ago) by dyoung
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.132: +5 -5 lines
Diff to previous 1.132 (colored)

In pmf(9), improve the implementation of device self-suspension
and make suspension by self, by drvctl(8), and by ACPI system sleep
play nice together.  Start solidifying some temporary API changes.

1. Extract a new header file, <sys/device_if.h>, from <sys/device.h> and
   #include it from <sys/pmf.h> instead of <sys/device.h> to break the
   circular dependency between <sys/device.h> and <sys/pmf.h>.

2. Introduce pmf_qual_t, an aggregate of qualifications on a PMF
   suspend/resume call.  Start to replace instances of PMF_FN_PROTO,
   PMF_FN_ARGS, et cetera, with a pmf_qual_t.

3. Introduce the notion of a "suspensor," an entity that holds a
   device in suspension.  More than one suspensor may hold a device
   at once.  A device stays suspended as long as at least one
   suspensor holds it.  A device resumes when the last suspensor
   releases it.

   Currently, the kernel defines three suspensors,

   3a the system-suspensor: for system suspension, initiated
      by 'sysctl -w machdep.sleep_state=3', by lid closure, by
      power-button press, et cetera,

   3b the drvctl-suspensor: for device suspension by /dev/drvctl
      ioctl, e.g., drvctl -S sip0.

   3c the system self-suspensor: for device drivers that suspend
      themselves and their children.  Several drivers for network
      interfaces put the network device to sleep while it is not
      administratively up, that is, after the kernel calls if_stop(,
      1).  The self-suspensor should not be used directly.  See
      the description of suspensor delegates, below.

   A suspensor can have one or more "delegates".  A suspensor can
   release devices that its delegates hold suspended.  Right now,
   only the system self-suspensor has delegates.  For each device
   that a self-suspending driver attaches, it creates the device's
   self-suspensor, a delegate of the system self-suspensor.

   Suspensors stop a system-wide suspend/resume cycle from waking
   devices that the operator put to sleep with drvctl before the cycle.
   They also help self-suspension to work more simply, safely, and in
   accord with expectations.

4. Add the notion of device activation level, devact_level_t,
   and a routine for checking the current activation level,
   device_activation().  Current activation levels are DEVACT_LEVEL_BUS,
   DEVACT_LEVEL_DRIVER, and DEVACT_LEVEL_CLASS, which respectively
   indicate that the device's bus is active, that the bus and device are
   active, and that the bus, device, and the functions of the device's
   class (network, audio) are active.

   Suspend/resume calls can be qualified with a devact_level_t.
   The power-management framework treats a devact_level_t that
   qualifies a device suspension as the device's current activation
   level; it only runs hooks to reduce the activation level from
   the presumed current level to the fully suspended state.  The
   framework treats a devact_level_t qualifying device resumption
   as the target activation level; it only runs hooks to raise the
   activation level to the target.

5. Use pmf_qual_t, devact_level_t, and self-suspensors in several
   drivers.

6. Temporarily add an unused power-management workqueue that I will
   remove or replace, soon.

Revision 1.132 / (download) - annotate - [select for diffs], Wed Sep 16 10:47:54 2009 UTC (3 years, 8 months ago) by mlelstv
Branch: MAIN
Changes since 1.131: +18 -15 lines
Diff to previous 1.131 (colored)

Allow for 'options ACPI_DEBUG' by providing module declarations
and using memory allocation macros instead of calling AcpiOs* stubs
directly.

Revision 1.131 / (download) - annotate - [select for diffs], Tue Aug 25 10:34:08 2009 UTC (3 years, 8 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored)

PR# kern/41179: Incorrect return values from AcpiOsExecute()

ACPICA functions return ACPI_STATUS instead of int, so use it for
consistency.

Revision 1.130 / (download) - annotate - [select for diffs], Sun Aug 23 15:16:16 2009 UTC (3 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.129: +13 -2 lines
Diff to previous 1.129 (colored)

When ACPI is not present, free any resources used by the ACPICA. Also,
no need to complain (unless we're debugging) that ACPI is not present.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Aug 18 21:38:41 2009 UTC (3 years, 9 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7
Changes since 1.128: +6 -6 lines
Diff to previous 1.128 (colored)

Update for API changes with new ACPICA.
Makes i386 ALL kernel build.

Revision 1.128 / (download) - annotate - [select for diffs], Tue Aug 18 16:41:02 2009 UTC (3 years, 9 months ago) by jmcneill
Branch: MAIN
Changes since 1.127: +12 -20 lines
Diff to previous 1.127 (colored)

Switch to ACPICA 20090730, and update for API changes.

Revision 1.127 / (download) - annotate - [select for diffs], Tue Aug 4 14:20:40 2009 UTC (3 years, 9 months ago) by jmcneill
Branch: MAIN
Changes since 1.126: +7 -2 lines
Diff to previous 1.126 (colored)

add hw.wake.* sysctl subtree for toggling which devices are allowed to
restore the system from sleep. set/clear wake GPEs as specified before
entering sleep.

by default, the following devices are enabled for wake:
 - sleep/power buttons
 - lid switch
 - pc kbd controller

reviewed by: joerg

Revision 1.126 / (download) - annotate - [select for diffs], Tue May 12 09:29:46 2009 UTC (4 years ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, jymxensuspend-base, jym-xensuspend-base
Changes since 1.125: +4 -4 lines
Diff to previous 1.125 (colored)

struct cfdata * -> cfdata_t, no functional changes intended.

Revision 1.125 / (download) - annotate - [select for diffs], Wed Apr 8 12:39:27 2009 UTC (4 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.124: +4 -3 lines
Diff to previous 1.124 (colored)

sprintf -> snprintf

Revision 1.124 / (download) - annotate - [select for diffs], Wed Apr 8 00:23:30 2009 UTC (4 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.123: +132 -7 lines
Diff to previous 1.123 (colored)

Refactor slightly to create acpi_rescan(), a hook for rescanning the
devices that attach at acpi(4).

Begin deriving an acpi(4) device-detachment hook, acpi_detach(), from
acpi_attach().  The code between #if 0 and #endif still needs to be
turned to the opposite calls (enables to disables, maps to unmaps,
attaches to detaches), which should be run in the opposite order.
Somebody with deep ACPI knowledge can probably finish this off without
too much trouble.

Revision 1.123 / (download) - annotate - [select for diffs], Fri Jan 30 12:51:03 2009 UTC (4 years, 3 months ago) by jmcneill
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.122: +21 -3 lines
Diff to previous 1.122 (colored)

PR# kern/38817: regression in acpi sleep on lifebook S6510

Switch to polling mode after the acpi(4) device has been suspended as
interrupts will be disabled later on and we may still need to execute
AML that tries to sleep or wait on a semaphore.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Jan 3 03:43:22 2009 UTC (4 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.121: +3 -3 lines
Diff to previous 1.121 (colored)

remove extra semicolons.

Revision 1.121 / (download) - annotate - [select for diffs], Sun Dec 7 10:53:57 2008 UTC (4 years, 5 months ago) by mlelstv
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base
Changes since 1.120: +21 -7 lines
Diff to previous 1.120 (colored)

Handle printing of _STR attribute with non-string data type gracefully.

Revision 1.120 / (download) - annotate - [select for diffs], Fri Sep 19 11:19:33 2008 UTC (4 years, 8 months ago) by jmcneill
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.119: +0 -2 lines
Diff to previous 1.119 (colored)

Revert previous.

Revision 1.119 / (download) - annotate - [select for diffs], Wed Sep 10 03:56:12 2008 UTC (4 years, 8 months ago) by jmcneill
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3
Changes since 1.118: +4 -2 lines
Diff to previous 1.118 (colored)

PR# 38683 - T61 cannot suspend with recent kernels

Don't restore spl until after AcpiLeaveSleepState.

Revision 1.118 / (download) - annotate - [select for diffs], Tue Jul 15 16:15:28 2008 UTC (4 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base
Changes since 1.117: +34 -8 lines
Diff to previous 1.117 (colored)

Introduce acpi_clear_wake_gpe() to undo acpi_set_wake_gpe().
Extract common code from acpi_clear_wake_gpe() and acpi_set_wake_gpe(),
creating acpi_wake_gpe_helper().

Revision 1.117 / (download) - annotate - [select for diffs], Sun Jun 1 19:01:57 2008 UTC (4 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl, haad-dm
Changes since 1.116: +3 -3 lines
Diff to previous 1.116 (colored)

Fix compilation with ACPI_EXTRA_DEBUG.

Revision 1.116 / (download) - annotate - [select for diffs], Sat May 17 15:42:25 2008 UTC (5 years ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pf42-base2, hpcarm-cleanup-nbase
Changes since 1.115: +36 -7 lines
Diff to previous 1.115 (colored)

For device nodes that we handle internally, do not bother calling
config_found_ia on the node to save a bunch of useless 'device NNN
not configured' messages at startup. While here, condense ACPI printfs
at attach time.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:47 2008 UTC (5 years ago) by martin
Branch: MAIN
CVS Tags: yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Changes since 1.114: +2 -9 lines
Diff to previous 1.114 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.114 / (download) - annotate - [select for diffs], Sun Apr 20 16:26:36 2008 UTC (5 years, 1 month ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.113: +8 -4 lines
Diff to previous 1.113 (colored)

Improve error reporting when we fail to enter a sleep state, eg:

  acpi0: entering state 1
  acpi0: ACPI S1 not available on this platform

Revision 1.113 / (download) - annotate - [select for diffs], Thu Mar 27 02:51:26 2008 UTC (5 years, 1 month ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.112: +30 -29 lines
Diff to previous 1.112 (colored)

Split device_t and softc

Revision 1.112 / (download) - annotate - [select for diffs], Wed Mar 12 18:02:21 2008 UTC (5 years, 2 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.111: +5 -5 lines
Diff to previous 1.111 (colored)

Use device_t and its accessors throughout.  Use aprint_*_dev().

Improve PMF-ability.

        Add a 'flags' argument to suspend/resume handlers and
        callers such as pmf_system_suspend().

        Define a flag, PMF_F_SELF, which indicates to PMF that a
        device is suspending/resuming itself.  Add helper routines,
        pmf_device_suspend_self(dev) and pmf_device_resume_self(dev),
        that call pmf_device_suspend(dev, PMF_F_SELF) and
        pmf_device_resume(dev, PMF_F_SELF), respectively.  Use
        PMF_F_SELF to suspend/resume self in ath(4), audio(4),
        rtw(4), and sip(4).

        In ath(4) and in rtw(4), replace the icky sc_enable/sc_disable
        callbacks, provided by the bus front-end, with
        self-suspension/resumption.  Also, clean up the bus
        front-ends.  Make sure that the interrupt handler is
        disestablished during suspension.  Get rid of driver-private
        flags (e.g., RTW_F_ENABLED, ath_softc->sc_invalid); use
        device_is_active()/device_has_power() calls, instead.

        In the network-class suspend handler, call if_stop(, 0)
        instead of if_stop(, 1), because the latter is superfluous
        (bus- and driver-suspension hooks will 'disable' the NIC),
        and it may cause recursion.

        In the network-class resume handler, prevent infinite
        recursion through if_init() by getting out early if we are
        self-suspending (PMF_F_SELF).

rtw(4) improvements:

        Destroy rtw(4) callouts when we detach it.  Make rtw at
        pci detachable.  Print some more information with the "rx
        frame too long" warning.

Remove activate() methods:

        Get rid of rtw_activate() and ath_activate().  The device
        activate() methods are not good for much these days.

Make ath at cardbus resume with crypto functions intact:

        Introduce a boolean device property, "pmf-powerdown".  If
        pmf-powerdown is present and false, it indicates that a
        bus back-end should not remove power from a device.

        Honor this property in cardbus_child_suspend().

        Set this property to 'false' in ath_attach(), since removing
        power from an ath at cardbus seems to lobotomize the WPA
        crypto engine.  XXX Should the pmf-powerdown property
        propagate toward the root of the device tree?

Miscellaneous ath(4) changes:

        Warn if ath(4) tries to write crypto keys to suspended
        hardware.

        Reduce differences between FreeBSD and NetBSD in ath(4)
        multicast filter setup.

        Make ath_printrxbuf() print an rx descriptor's status &
        key index, to help debug crypto errors.

        Shorten a staircase in ath_ioctl().  Don't check for
        ieee80211_ioctl() return code ERESTART, it never happens.

Revision 1.111 / (download) - annotate - [select for diffs], Mon Mar 10 20:58:38 2008 UTC (5 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.110: +75 -50 lines
Diff to previous 1.110 (colored)

Use device_t and accessors.  Use aprint_*_dev().

Add a method for detaching children.  XXX acpi(4) may leak some
resources for each child detached.  Needs attention from someone
who understands acpi(4).

Revision 1.110 / (download) - annotate - [select for diffs], Sun Mar 9 19:09:00 2008 UTC (5 years, 2 months ago) by jmcneill
Branch: MAIN
Changes since 1.109: +2 -25 lines
Diff to previous 1.109 (colored)

shutdownhook_establish is deprecated, but instead of converting to pmf,
just delete it as acpi_shutdown was empty.

Revision 1.109 / (download) - annotate - [select for diffs], Wed Feb 13 15:27:55 2008 UTC (5 years, 3 months ago) by jmcneill
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.108: +21 -12 lines
Diff to previous 1.108 (colored)

Add hw.acpi.supported_states sysctl node:
  $ sysctl hw.acpi.supported_states
  hw.acpi.supported_states = S0 S3 S4 S5

Revision 1.108 / (download) - annotate - [select for diffs], Sun Dec 16 21:10:34 2007 UTC (5 years, 5 months ago) by jmcneill
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.107: +63 -18 lines
Diff to previous 1.107 (colored)

Now that ACPI-CA doesn't parse the X/RSDT for us, we need to map it
ourselves.

Before:
  acpi0: X/RSDT: OemId <      ,        ,00000000>, AslId <    ,00000000>
After:
  acpi0: X/RSDT: OemId <LENOVO,TP-7L   ,00001260>, AslId < LTP,00000000>

ACPI can now access the X/RSDT using 'acpi_map_rsdt' and 'acpi_unmap_rsdt'.

Revision 1.107 / (download) - annotate - [select for diffs], Sat Dec 15 02:19:55 2007 UTC (5 years, 5 months ago) by jmcneill
Branch: MAIN
Changes since 1.106: +18 -12 lines
Diff to previous 1.106 (colored)

Restore acpi_quirk functionality, lost in the latest ACPI-CA update.

Revision 1.106 / (download) - annotate - [select for diffs], Fri Dec 14 01:29:29 2007 UTC (5 years, 5 months ago) by jmcneill
Branch: MAIN
Changes since 1.105: +3 -2 lines
Diff to previous 1.105 (colored)

Introduce pmf_system_bus_resume. In the ACPI S3 resume path, use this to
separate powering up devices from restoring their state. This is required
on some machines where AcpiLeaveSleepState can fail due to an attempt to
access a powered off device.

Revision 1.105 / (download) - annotate - [select for diffs], Mon Dec 10 22:56:29 2007 UTC (5 years, 5 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, cube-autoconf-base, cube-autoconf
Changes since 1.104: +4 -4 lines
Diff to previous 1.104 (colored)

Add missing \n and remove surplus .

Revision 1.104 / (download) - annotate - [select for diffs], Sun Dec 9 20:27:52 2007 UTC (5 years, 5 months ago) by jmcneill
Branch: MAIN
Branch point for: bouyer-xeni386
Changes since 1.103: +123 -48 lines
Diff to previous 1.103 (colored)

Merge jmcneill-pm branch.

Revision 1.103 / (download) - annotate - [select for diffs], Wed Dec 5 07:06:50 2007 UTC (5 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base
Branch point for: yamt-kmem
Changes since 1.102: +4 -4 lines
Diff to previous 1.102 (colored)

Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Aug 8 08:52:31 2007 UTC (5 years, 9 months ago) by cube
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking2-base1, vmlocking-nbase, vmlocking-base, nick-csl-alignment-base5, matt-armv6-prevmlocking, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: vmlocking2, mjf-devfs, matt-armv6
Changes since 1.101: +26 -8 lines
Diff to previous 1.101 (colored)

Print ACPI device name in a way that Jared McNeill and I find prettier.
I like it better because I get to see the name of the device as it appears
in the DSDT, which sometimes makes sense and that way it's easier to locate
the relevant code when debugging.

E.g.:

PIC (PNP0000) [AT Interrupt Controller] at acpipcib0 not configured
DMAD (PNP0200) [AT DMA Controller] at acpipcib0 not configured
attimer0 at acpipcib0 (TMR, PNP0100): AT Timer
RTC0 (PNP0B00) [AT Real-Time Clock] at acpipcib0 not configured
pckbc0 at acpipcib0 (PS2K, PNP0303): kbd port
acpibat0 at acpi0 (BAT0, PNP0C0A-0): ACPI Battery (Control Method)

Revision 1.101 / (download) - annotate - [select for diffs], Mon Feb 19 22:31:05 2007 UTC (6 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, nick-csl-alignment-base, mjf-ufs-trans-base, mjf-ufs-trans, matt-mips64-base, matt-mips64, hpcarm-cleanup, ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, nick-csl-alignment, jmcneill-pm
Changes since 1.100: +5 -3 lines
Diff to previous 1.100 (colored)

Initialize acpi_interrupt_list_mtx in acpi_probe().

Revision 1.100 / (download) - annotate - [select for diffs], Sun Feb 18 23:39:20 2007 UTC (6 years, 3 months ago) by xtraeme
Branch: MAIN
Changes since 1.99: +5 -4 lines
Diff to previous 1.99 (colored)

Replace a simple_lock with a mutex, reviewed by ad@.

Revision 1.99 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:26 2007 UTC (6 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.98: +6 -5 lines
Diff to previous 1.98 (colored)

Merge newlock2 to head.

Revision 1.98 / (download) - annotate - [select for diffs], Sun Nov 26 12:30:05 2006 UTC (6 years, 5 months ago) by cube
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.97: +17 -2 lines
Diff to previous 1.97 (colored)

Introduce acpi_check() to inform the caller whether the acpi driver is
still enabled, as it could have been disabled through USERCONF.

Use it in amd64 and i386 mainbus code and skip all ACPI processing in case
it is disabled.

Revision 1.97 / (download) - annotate - [select for diffs], Thu Nov 16 01:32:47 2006 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.96: +8 -8 lines
Diff to previous 1.96 (colored)

__unused removal on arguments; approved by core.

Revision 1.96 / (download) - annotate - [select for diffs], Thu Oct 12 01:30:54 2006 UTC (6 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.95: +8 -7 lines
Diff to previous 1.95 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.95 / (download) - annotate - [select for diffs], Tue Sep 26 01:50:43 2006 UTC (6 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.94: +2 -3 lines
Diff to previous 1.94 (colored)

When resuming from S1 standby, don't try to release a mutex that we hadn't
previously acquired.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Aug 6 15:46:54 2006 UTC (6 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.93: +6 -5 lines
Diff to previous 1.93 (colored)

PR/34116: Takuya SHIOZAKI: acpiapm(4) misuses config(9)
acpiapm(4) always matches the first node of AML, which is unrelated
with acpiapm. Separate acpi(4)'s children into two individual interface
attributes.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Jul 4 00:30:23 2006 UTC (6 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.92: +38 -211 lines
Diff to previous 1.92 (colored)

Apply fvdl's acpi pci interrupt configuration code.
- MPACPI is no more.
- MPACPI_SCANPCI -> ACPI_SCANPCI

Revision 1.92 / (download) - annotate - [select for diffs], Sat Jul 1 21:44:13 2006 UTC (6 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.91: +23 -19 lines
Diff to previous 1.91 (colored)

- use aprint instead of printf.
- centralize all the suspend/resume glue in one function.

Revision 1.91 / (download) - annotate - [select for diffs], Sat Jun 24 23:40:50 2006 UTC (6 years, 10 months ago) by tsarna
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored)

fix typo: idicator -> indicator

Revision 1.90 / (download) - annotate - [select for diffs], Wed Jun 21 17:47:23 2006 UTC (6 years, 11 months ago) by drochner
Branch: MAIN
Changes since 1.89: +4 -2 lines
Diff to previous 1.89 (colored)

First cut on an implementation of an ACPI power management counter
backend for timecounters.
Due to known bugs in some chipsets, always read until we get 3 successive
samples which are monotonic, as FreeBSD does in its "safe" variant.
This can be refined later, either by chipset quirks or by a test (as
FreeBSD does).

Revision 1.89 / (download) - annotate - [select for diffs], Tue Jun 20 12:31:19 2006 UTC (6 years, 11 months ago) by cube
Branch: MAIN
Changes since 1.88: +3 -2 lines
Diff to previous 1.88 (colored)

When we consume a resource definition from _PRS, advance to the next one.
Otherwise, if there are two resources definitions of the same type in _CRS,
the same one from _PRS will be used twice, which of course leads to errors.

Note:  _PRS is Possible Resources Set
       _CRS is Current Resources Set

XXX acpi_allocate_resources is still very weak, e.g. it completely ignores
    StartDependentFn entries which are kind of a switch.  But at least it's
    slightly better that way.

Tested by jmcneill@.

Revision 1.88 / (download) - annotate - [select for diffs], Mon Jun 19 10:18:08 2006 UTC (6 years, 11 months ago) by jmcneill
Branch: MAIN
CVS Tags: chap-midi-nbase, chap-midi-base
Changes since 1.87: +2 -6 lines
Diff to previous 1.87 (colored)

acpi_pci_fixup didn't work as well as I had hoped; don't bother for now.

Revision 1.87 / (download) - annotate - [select for diffs], Mon Jun 19 02:32:12 2006 UTC (6 years, 11 months ago) by jmcneill
Branch: MAIN
Changes since 1.86: +6 -2 lines
Diff to previous 1.86 (colored)

Fixup PCI interrupt routing using ACPI tables on return from S3 sleep.
Requires options PCI_INTR_FIXUP in your kernel.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Jun 15 18:05:08 2006 UTC (6 years, 11 months ago) by jmcneill
Branch: MAIN
Changes since 1.85: +48 -3 lines
Diff to previous 1.85 (colored)

EXPERIMENTAL: Add sysctl for triggering ACPI sleep. This interface is not
    stable, so do not depend on it!

    To trigger sleep:
        # sysctl -w machdep.sleep_state=<n>
    Where <n> is typically 1 (standby), 3 (suspend), or 4 (hibernate).

Revision 1.85 / (download) - annotate - [select for diffs], Sun Feb 26 18:46:04 2006 UTC (7 years, 2 months ago) by cube
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, simonb-timecounters-base, peter-altq-base, peter-altq, gdamore-uart-base, elad-kernelauth-base, elad-kernelauth
Branch point for: yamt-pdpolicy, gdamore-uart, chap-midi
Changes since 1.84: +9 -9 lines
Diff to previous 1.84 (colored)

Resource lists end with END_TAG, not END_DEPENDENT.  Makes the
PCI_INTR_FIXUP code "work" again.

Most of the time it will produce a warning about a misaligned resource
pointer, but it's harmless, and the warning was removed in the next version
of the ACPI-CA code.

Revision 1.84 / (download) - annotate - [select for diffs], Thu Feb 23 17:38:03 2006 UTC (7 years, 2 months ago) by wiz
Branch: MAIN
Changes since 1.83: +4 -4 lines
Diff to previous 1.83 (colored)

Fix typo in aprint argument.

Revision 1.83 / (download) - annotate - [select for diffs], Mon Feb 20 12:17:49 2006 UTC (7 years, 3 months ago) by kochi
Branch: MAIN
Changes since 1.82: +31 -30 lines
Diff to previous 1.82 (colored)

use aprint_*

Revision 1.82 / (download) - annotate - [select for diffs], Thu Feb 16 09:23:23 2006 UTC (7 years, 3 months ago) by kochi
Branch: MAIN
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

define acpi_dbgr as static

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jan 31 09:30:06 2006 UTC (7 years, 3 months ago) by kochi
Branch: MAIN
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.80: +5 -12 lines
Diff to previous 1.80 (colored)

remove ACPI_DISABLE_ON_POWEROFF option, which was there just for
compatibility of our old driver behavior, which is not necessary.

Revision 1.80 / (download) - annotate - [select for diffs], Sun Jan 29 03:12:22 2006 UTC (7 years, 3 months ago) by kochi
Branch: MAIN
Changes since 1.79: +20 -20 lines
Diff to previous 1.79 (colored)

adapt for ACPI-CA 20060113

Revision 1.79 / (download) - annotate - [select for diffs], Tue Dec 13 23:27:31 2005 UTC (7 years, 5 months ago) by cube
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.78: +32 -6 lines
Diff to previous 1.78 (colored)

machdep.acpi_root -> hw.acpi.root, as discussed on source-changes.

Revision 1.78 / (download) - annotate - [select for diffs], Mon Dec 12 15:04:50 2005 UTC (7 years, 5 months ago) by cube
Branch: MAIN
Changes since 1.77: +35 -2 lines
Diff to previous 1.77 (colored)

Move the (one liner) logic of AcpiOsGetRootPointer() out of acpica/Osd to
acpi.c and take the opportunity to create a sysctl node that contains the
address of the main ACPI table.

The name of the node, "machdep.acpi_root", is questionable but matches the
one FreeBSD has, which will make it easier to port their acpidump(8)
program.

Revision 1.77 / (download) - annotate - [select for diffs], Sun Dec 11 12:21:01 2005 UTC (7 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

merge ktrace-lwp.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Jun 30 22:28:03 2005 UTC (7 years, 10 months ago) by sekiya
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored)

Fix up interrupt line when line == 0.  Discussed with christos@

Revision 1.75 / (download) - annotate - [select for diffs], Thu Jun 30 19:31:53 2005 UTC (7 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored)

There is an error when we return -1, not < 1.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Jun 21 11:49:10 2005 UTC (7 years, 11 months ago) by sekiya
Branch: MAIN
Changes since 1.73: +6 -2 lines
Diff to previous 1.73 (colored)

Likewise, ACPI_PCI_FIXUP has been replaced by PCI_INTR_FIXUP, and we should
notify when an old kernel config is used.  Recommended by wiz@

Revision 1.73 / (download) - annotate - [select for diffs], Tue Jun 21 08:19:25 2005 UTC (7 years, 11 months ago) by sekiya
Branch: MAIN
Changes since 1.72: +11 -10 lines
Diff to previous 1.72 (colored)

Rework the configuration scheme for PCI fixups:

* bus enumeration fixups are not PCIBIOS-specific, interrupt fixups are done
  by both PCIBIOS and ACPI.  The redundancy is very redundant.  Therefore,
  rename PCIBIOS_*_FIXUP to PCI_*_FIXUP, use PCI_INTR_FIXUP in place of
  ACPI_PCI_FIXUP, and change code refences to match.

* move the fixup defines from opt_pcibios.h to opt_pcifixup.h to reflect
  the above.

* fix up the PCI bus numbering in mainbus_attach(), right after we detect the
  configuration mode.  This probably renders the fixup in pcibios.c
  redundant -- but it should be harmless.

These changes make cardbus work in ACPI-only machines, when PCI_BUS_FIXUP
and PCI_INTR_FIXUP are defined.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Jun 20 12:21:36 2005 UTC (7 years, 11 months ago) by sekiya
Branch: MAIN
Changes since 1.71: +3 -5 lines
Diff to previous 1.71 (colored)

Also fix up interrupt line if interrupt is zero, as well as 255.  Fixes
interrupt issues on two of my laptops that lack PCIBIOS.

Revision 1.71 / (download) - annotate - [select for diffs], Tue May 31 21:08:37 2005 UTC (7 years, 11 months ago) by drochner
Branch: MAIN
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

lots of cast-qual fallout

Revision 1.70 / (download) - annotate - [select for diffs], Sun May 29 20:56:02 2005 UTC (7 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.69: +7 -7 lines
Diff to previous 1.69 (colored)

Sprinkle const freely and delete unnecessary casts.

Revision 1.69 / (download) - annotate - [select for diffs], Mon May 2 14:53:59 2005 UTC (8 years ago) by kochi
Branch: MAIN
Changes since 1.68: +32 -2 lines
Diff to previous 1.68 (colored)

Merge changes for ACPI-CA 20050408

Revision 1.68 / (download) - annotate - [select for diffs], Sun Feb 27 00:26:58 2005 UTC (8 years, 2 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base
Changes since 1.67: +4 -4 lines
Diff to previous 1.67 (colored)

nuke trailing whitespace

Revision 1.67 / (download) - annotate - [select for diffs], Mon Aug 30 15:05:19 2004 UTC (8 years, 8 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, matt-timespec, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.66: +2 -7 lines
Diff to previous 1.66 (colored)

Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Jun 7 15:33:17 2004 UTC (8 years, 11 months ago) by kochi
Branch: MAIN
Changes since 1.65: +4 -2 lines
Diff to previous 1.65 (colored)

Add ACPI_DISABLE_ON_POWEROFF option.
Note: the default behavior is changed.  Now we don't disable the ACPI
subsystem on power off (halt -p) by default.
'options ACPI_DISABLE_ON_POWEROFF' in a kernel config file makes the kernel
behave the way we used to be.

Revision 1.65 / (download) - annotate - [select for diffs], Wed May 26 17:15:17 2004 UTC (8 years, 11 months ago) by kochi
Branch: MAIN
Changes since 1.64: +46 -2 lines
Diff to previous 1.64 (colored)

ThermalZone improvement work by lha at stacken.kth.se, inspired from
FreeBSD thermal zone code.  Minor style fixes and bugfixes by me.

Revision 1.64 / (download) - annotate - [select for diffs], Sat May 1 12:03:48 2004 UTC (9 years ago) by kochi
Branch: MAIN
Changes since 1.63: +25 -25 lines
Diff to previous 1.63 (colored)

specify static where appropriate.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Apr 11 06:48:25 2004 UTC (9 years, 1 month ago) by kochi
Branch: MAIN
Changes since 1.62: +26 -26 lines
Diff to previous 1.62 (colored)

return (x) -> return x
use consitent variable name for ACPI_STATUS

Revision 1.62 / (download) - annotate - [select for diffs], Sat Apr 10 11:48:10 2004 UTC (9 years, 1 month ago) by kochi
Branch: MAIN
Changes since 1.61: +9 -9 lines
Diff to previous 1.61 (colored)

whitespace nit

Revision 1.61 / (download) - annotate - [select for diffs], Wed Mar 31 11:19:39 2004 UTC (9 years, 1 month ago) by tron
Branch: MAIN
Changes since 1.60: +4 -2 lines
Diff to previous 1.60 (colored)

Only call acpiec_early_attach() in "acpi.c" if the kernel is configured
to include the "acpiec" device.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Mar 30 15:18:55 2004 UTC (9 years, 1 month ago) by kochi
Branch: MAIN
Changes since 1.59: +6 -2 lines
Diff to previous 1.59 (colored)

Add ACPI ECDT (Embedded Controller Description Table) support.
This will enable usage of EC in early stage of ACPI initialization.

Revision 1.59 / (download) - annotate - [select for diffs], Tue Mar 23 19:00:03 2004 UTC (9 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)

some int->ACPI_INTEGER to make it compile on amd64 again

Revision 1.58 / (download) - annotate - [select for diffs], Tue Mar 23 14:08:17 2004 UTC (9 years, 2 months ago) by kochi
Branch: MAIN
Changes since 1.57: +5 -23 lines
Diff to previous 1.57 (colored)

Don't use ACPI CA internal functions

Revision 1.57 / (download) - annotate - [select for diffs], Mon Nov 3 18:51:31 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.56: +7 -6 lines
Diff to previous 1.56 (colored)

Use pmatch() so that we can use patterns.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Nov 3 18:07:10 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.55: +37 -26 lines
Diff to previous 1.55 (colored)

More cleanup:
* Use ACPI_FAILURE() and ACPI_SUCCESS().
* Output exception strings in a few more places.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Nov 3 17:24:22 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.54: +14 -11 lines
Diff to previous 1.54 (colored)

Clean up some messages:
* Use AcpiFormatException() in a bunch of places.
* acpi_resource_parse() already prints an error, so don't do it in the callers.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Nov 3 06:03:47 2003 UTC (9 years, 6 months ago) by kochi
Branch: MAIN
Changes since 1.53: +74 -46 lines
Diff to previous 1.53 (colored)

* now the size of ACPI_DEVICE_INFO is variable:
  it can now accomodate multiple _CIDs
  sizeof(ACPI_DEVICE_INFO) should not be used
* make ad_devinfo member in acpi_devnode a pointer
* implement acpi_match_hid() to simplify matching devices;
  _CIDs are also taken into account now as well as _HID

Revision 1.53 / (download) - annotate - [select for diffs], Sat Nov 1 20:58:33 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

One more spot for a structure change.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Nov 1 19:24:42 2003 UTC (9 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.51: +7 -3 lines
Diff to previous 1.51 (colored)

make this compilable again with ACPI_DEBUG.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Nov 1 08:03:24 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.50: +2 -30 lines
Diff to previous 1.50 (colored)

Do not install address handlers before calling AcpiEnableSubsystem() -- this
is done by AcpiInitializeObjects() anyway.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Nov 1 03:45:48 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.49: +38 -2 lines
Diff to previous 1.49 (colored)

Update copyright.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Nov 1 01:03:23 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.48: +3 -4 lines
Diff to previous 1.48 (colored)

Move a declaration.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Oct 31 20:54:18 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.47: +22 -88 lines
Diff to previous 1.47 (colored)

Catch up with ABI changes in ACPI-CA.  Some additional changes to acpi_bat to
set the VALID bits correctly, so we don't report garbage for missing batteries.

Revision 1.47 / (download) - annotate - [select for diffs], Fri Oct 31 17:22:28 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.46: +10 -9 lines
Diff to previous 1.46 (colored)

We were passing flags to AcpiEnableSubsystem() that aren't even used there.
Call AcpiInitializeObjects() to create global variables and run _INI methods.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Oct 30 20:29:54 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.45: +16 -29 lines
Diff to previous 1.45 (colored)

Use AcpiEvulateObjectTyped() to simplify some code.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Oct 30 19:33:24 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.44: +5 -3 lines
Diff to previous 1.44 (colored)

Check to see if we have valid status info before looking at it.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Oct 30 18:15:35 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

Remove another extra AcpiGetObjectInfo().

Revision 1.43 / (download) - annotate - [select for diffs], Thu Oct 30 18:13:38 2003 UTC (9 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.42: +13 -8 lines
Diff to previous 1.42 (colored)

Minor tweaks:
* Only fetch the object info a second time if we activated the device.
* Do not attempt to activate a device with no HID.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Aug 17 03:45:19 2003 UTC (9 years, 9 months ago) by kochi
Branch: MAIN
Changes since 1.41: +8 -3 lines
Diff to previous 1.41 (colored)

check return value of AcpiEnterSleepStatePrep() to catch
any failure

Revision 1.41 / (download) - annotate - [select for diffs], Sun Jul 6 05:24:18 2003 UTC (9 years, 10 months ago) by kochi
Branch: MAIN
Changes since 1.40: +14 -12 lines
Diff to previous 1.40 (colored)

make bootup messages prettier

Revision 1.40 / (download) - annotate - [select for diffs], Sun Jul 6 04:03:22 2003 UTC (9 years, 10 months ago) by kochi
Branch: MAIN
Changes since 1.39: +12 -18 lines
Diff to previous 1.39 (colored)

o cleanup usage of ACPI_ACTIVATE_DEV/ACPI_PCI_FIXUP
o delete usage of ENABLE_DEBUGGER

As ACPI_ACTIVATE_DEV/ACPI_PCI_FIXUP are defflag'ed in files.acpi,
these options don't have to have a value.

Revision 1.39 / (download) - annotate - [select for diffs], Thu Jul 3 14:37:34 2003 UTC (9 years, 10 months ago) by kochi
Branch: MAIN
Changes since 1.38: +4 -2 lines
Diff to previous 1.38 (colored)

Cleanup usage of ENABLE_DEBUGGER/ACPI_DEBUGGER/DDB.

By this change, ACPI debugger/disassembler are only
compiled when both DDB and ACPI_DEBUG options are
specified.  This change also reduces the kernel size
a little when ACPI_DEBUG is not specified.

Revision 1.38 / (download) - annotate - [select for diffs], Wed Jul 2 12:23:25 2003 UTC (9 years, 10 months ago) by kochi
Branch: MAIN
Changes since 1.37: +10 -19 lines
Diff to previous 1.37 (colored)

cleanup usage of ACPI_ALLOCATE_BUFFER/AcpiOsFree combination

Revision 1.37 / (download) - annotate - [select for diffs], Wed Jul 2 11:54:43 2003 UTC (9 years, 10 months ago) by kochi
Branch: MAIN
Changes since 1.36: +5 -2 lines
Diff to previous 1.36 (colored)

print ACPI CA version

Revision 1.36 / (download) - annotate - [select for diffs], Thu May 15 21:29:49 2003 UTC (10 years ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.35: +6 -3 lines
Diff to previous 1.35 (colored)

Add quirk handling to ACPI. First quirk entry is "PTLTD " rev 0x06040000,
which gives problems with PCI bus finding; the object hierarchy doesn't
match the real world for some systems, most notably SuperMicro boards.
Linux has this one blacklisted as well.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Apr 18 01:31:34 2003 UTC (10 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.34: +7 -5 lines
Diff to previous 1.34 (colored)

* Add a generic power management event API, defined in <sys/power.h>.
  Right now, only power switch state change events are supported.  This
  is a work-in-progress.
* Add support to sysmon for delivering power mangement events to userland.
  Add poll, kqueue, and read entry points to sysmon.
* Adapt ACPI to use the new generic <sys/power.h> event types.

This provides the kernel support for a forthcoming powerd(8) which can
do nice things like gracefully shut the system down when an ACPI power
button is pressed.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Apr 17 01:22:21 2003 UTC (10 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.33: +71 -56 lines
Diff to previous 1.33 (colored)

* Don't do the ACPI_PCI_FIXUP unless it is explicitly enabled in
  the kernel config file.  That code makes a total mess of any
  system with multiple PCI busses.
* Rework the way buttons are handled; register them with sysmon,
  and let it take the appropriate action.  This lets us gracefully
  shut down when the power button is pressed.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Mar 5 23:00:56 2003 UTC (10 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.32: +13 -11 lines
Diff to previous 1.32 (colored)

use M_ACPI where appropriate.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Feb 14 11:05:39 2003 UTC (10 years, 3 months ago) by tshiozak
Branch: MAIN
Changes since 1.31: +91 -22 lines
Diff to previous 1.31 (colored)

- add acpi_acquire_global_lock()/acpi_release_global_lock()/
  acpi_is_global_locked() functions.
  AcpiGlobalLock() API should be used to acquire lock between BIOS and OS.
  This API cannot be used to lock between threads of the OS side,
  because this function immediately returns if the lock is already acquired
  by the OS.  c.f. AcpiEvAcquireGlobalLock()@evmisc.c

- make sure that acpiec driver uses above functions.

- use ACPI_ALLOCATE_BUFFER instead of twice calls of AcpiEvaluateObject(),
  in acpi_eval_string()/acpi_eval_struct().
  Twice AcpiEvaluateObject() calls may cause twice side effects
  to ACPI machine / hardware and this may be wrong in some cases.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jan 13 01:24:11 2003 UTC (10 years, 4 months ago) by fvdl
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Use 'int' in the SCI interrupt message, not 'irq'. The number in question
is a global ACPI interrupt number.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jan 9 10:35:29 2003 UTC (10 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.29: +4 -4 lines
Diff to previous 1.29 (colored)

use AcpiUtGetTypeName() to print object type name in acpi_print()

Revision 1.29 / (download) - annotate - [select for diffs], Wed Jan 8 16:52:49 2003 UTC (10 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.28: +8 -2 lines
Diff to previous 1.28 (colored)

Print some OEM version info for the R/XSDT. Can be used to help identify
buggy ACPI implementations.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jan 7 18:46:48 2003 UTC (10 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.27: +29 -5 lines
Diff to previous 1.27 (colored)

* Add aux argument to functions called from apic_madt_walk
* Improve acpi interrupt fixup a bit
	* Source is an array, don't compare it to NULL, instead
	  look for an empty string to denote a link-device-less
	  entry.
	* For root PCI busses, try to use the _BBN method to get
	  numbering right.
* Add acpi_md_callback() function for MD handling after the init,
  but before * at acpi probing.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Jan 5 22:33:21 2003 UTC (10 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.26: +48 -23 lines
Diff to previous 1.26 (colored)

add ACPIVERBOSE; while I am there, fix the eval_string function so it does
not leak.

Revision 1.26 / (download) - annotate - [select for diffs], Sun Jan 5 06:19:05 2003 UTC (10 years, 4 months ago) by jmcneill
Branch: MAIN
Changes since 1.25: +4 -3 lines
Diff to previous 1.25 (colored)

Print something a bit more informative when displaying 'not configured'
messages for objects without a valid HID.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Jan 4 05:32:15 2003 UTC (10 years, 4 months ago) by jmcneill
Branch: MAIN
Changes since 1.24: +33 -26 lines
Diff to previous 1.24 (colored)

Attempt to attach drivers to devices without a valid HID so long as they're
not of type ACPI_TYPE_DEVICE.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 1 00:10:16 2003 UTC (10 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.23: +8 -8 lines
Diff to previous 1.23 (colored)

Use aprint_normal() in cfprint routines.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Dec 31 11:23:34 2002 UTC (10 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.22: +10 -6 lines
Diff to previous 1.22 (colored)

Fix some messages and some formatting.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Dec 31 05:59:53 2002 UTC (10 years, 4 months ago) by jmcneill
Branch: MAIN
Changes since 1.21: +10 -4 lines
Diff to previous 1.21 (colored)

If we have a valid UID but it's a null string, display '<null>' rather than
nothing at all.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Dec 30 09:33:25 2002 UTC (10 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.20: +7 -2 lines
Diff to previous 1.20 (colored)

Print out the pnpname that was matched.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Dec 30 01:56:44 2002 UTC (10 years, 4 months ago) by jmcneill
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

Allow ACPI_EXTRA_DEBUG without ACPI_DEBUG

Revision 1.19 / (download) - annotate - [select for diffs], Sat Dec 28 06:14:07 2002 UTC (10 years, 4 months ago) by jmcneill
Branch: MAIN
Changes since 1.18: +4 -2 lines
Diff to previous 1.18 (colored)

Pass ISA chipset information through to ACPI devices, to allow for porting
of pnpbios(4) glue to acpi(4).

Revision 1.18 / (download) - annotate - [select for diffs], Wed Oct 2 16:33:35 2002 UTC (10 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

Add trailing ; to CFATTACH_DECL.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Sep 30 20:41:16 2002 UTC (10 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.16: +4 -5 lines
Diff to previous 1.16 (colored)

Use CFATTACH_DECL().

Revision 1.16 / (download) - annotate - [select for diffs], Fri Sep 27 20:37:32 2002 UTC (10 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

Declare all cfattach structures const.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jul 29 03:26:20 2002 UTC (10 years, 9 months ago) by augustss
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.14: +54 -4 lines
Diff to previous 1.14 (colored)

Add code to activate devices that are no active.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jul 29 03:10:16 2002 UTC (10 years, 9 months ago) by augustss
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

Only be very verbose with ACPI_EXTRA_DEBUG set.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jul 29 03:06:56 2002 UTC (10 years, 9 months ago) by augustss
Branch: MAIN
Changes since 1.12: +290 -2 lines
Diff to previous 1.12 (colored)

Add code to perform PCI interrupt routing fixup.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Jul 18 12:05:11 2002 UTC (10 years, 10 months ago) by kanaoka
Branch: MAIN
Changes since 1.11: +4 -2 lines
Diff to previous 1.11 (colored)

 - Disable Interrput before execute AcpiEnterSleepState().
 - Add acpi_md_OsDisableInterrupt() for this.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jun 18 10:26:15 2002 UTC (10 years, 11 months ago) by drochner
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

make it compile with ACPI_DEBUG

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jun 18 08:09:21 2002 UTC (10 years, 11 months ago) by tshiozak
Branch: MAIN
Changes since 1.9: +78 -2 lines
Diff to previous 1.9 (colored)

add MI part of ACPI sleep state transition code.
However, we have no interface to use it, and we also need device driver
support. (e.g. D2/D3 support for PCI)

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jun 17 08:18:51 2002 UTC (10 years, 11 months ago) by kanaoka
Branch: MAIN
Changes since 1.8: +8 -5 lines
Diff to previous 1.8 (colored)

 - Show SCI interrupt information.
 - Remove ACPI_STA_DEV_SHOW from device check in acpi_build_tree().

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jun 15 18:03:41 2002 UTC (10 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.7: +6 -5 lines
Diff to previous 1.7 (colored)

Update for acpica-unix-20020612.  From Takayoshi Kochi.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Mar 24 03:32:14 2002 UTC (11 years, 2 months ago) by sommerfeld
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Branch point for: gehenna-devsw
Changes since 1.6: +45 -6 lines
Diff to previous 1.6 (colored)

Add acpi_eval_struct, to evaluate a complex data structure.

#if 0-out a half-fixed acpi_eval_string() and #if 0 the only call to it.
(Previous code referenced an uninitialized local variable and couldn't
have possibly worked).

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jan 12 16:43:53 2002 UTC (11 years, 4 months ago) by tsutsui
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, ifpoll, eeh-devprop-base, eeh-devprop
Changes since 1.5: +3 -4 lines
Diff to previous 1.5 (colored)

Call malloc(9) with M_ZERO flag instead of memset() after malloc().

Revision 1.5 / (download) - annotate - [select for diffs], Tue Nov 13 13:01:57 2001 UTC (11 years, 6 months ago) by lukem
Branch: MAIN
Branch point for: kqueue
Changes since 1.4: +4 -1 lines
Diff to previous 1.4 (colored)

add RCSID

Revision 1.4 / (download) - annotate - [select for diffs], Sat Sep 29 18:13:48 2001 UTC (11 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-devvp, nathanw_sa
Changes since 1.3: +52 -3 lines
Diff to previous 1.3 (colored)

- Add an acpi_evaluate_string() to evaluate string objects.
- In acpi_print(), try to evaluate the _STR object, and print
  it if the device is not configured.
- Make this compile without ACPI_DEBUG, from Masanori Kanaoka.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Sep 29 05:39:14 2001 UTC (11 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.2: +1 -27 lines
Diff to previous 1.2 (colored)

Don't install a single system notify handler.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Sep 29 05:34:00 2001 UTC (11 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.1: +31 -1 lines
Diff to previous 1.1 (colored)

Add code to parse ACPI bus resources.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Sep 28 02:09:22 2001 UTC (11 years, 7 months ago) by thorpej
Branch: MAIN

Add some basic ACPI probing framework.  This is far from complete,
it is merely a work in progress.

This form allows you to request diff's 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.




CVSweb <webmaster@jp.NetBSD.org>