summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
Commit message (Collapse)AuthorAgeFilesLines
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-011-0/+1
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* Remove bogus block device major now that bdev majors are gone.jhb2001-04-021-2/+1
|
* Catch up to header include changes:jhb2001-03-283-0/+4
| | | | | - <sys/mutex.h> now requires <sys/systm.h> - <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>
* Bring our local hack for wakeup back fromiwasaki2001-03-071-0/+88
| | | | | | | | sys/contrib/dev/acpica/Subsystem/Hardware/Attic/hwxface.c to the proper location after AcpiEnterSleepState(). - Wait for the WAK_STS bit - Evaluate the _WAK method and check result code
* Properly protect the parameters to the EC_{GET,SET}_{DATA,CSR} macros withjhb2001-02-261-4/+10
| | | | parens.
* - Use a loop to read consecutive bytes from the embedded controller tojhb2001-02-261-10/+19
| | | | | | | | handle read and write requests for widths of multiple bytes. This can be used to read 16-bit battery status registers for example. - Remove some unused variables and #if 0'd debugging cruft. - Don't complain about a GPE query that fails due to AE_NOT_FOUND if the query method was _Q00.
* When ensuring the destination buffer is truncated for a string obtainedjhb2001-02-261-1/+1
| | | | | | | from a BIF, use the size of the destinatino buffer, not the length of the string to determine where to put the nul char. As a side effect, the old code would truncate the string by one character while it was possibly overflowing the buffer.
* Implement a unified run queue and adjust priority levels accordingly.jake2001-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - All processes go into the same array of queues, with different scheduling classes using different portions of the array. This allows user processes to have their priorities propogated up into interrupt thread range if need be. - I chose 64 run queues as an arbitrary number that is greater than 32. We used to have 4 separate arrays of 32 queues each, so this may not be optimal. The new run queue code was written with this in mind; changing the number of run queues only requires changing constants in runq.h and adjusting the priority levels. - The new run queue code takes the run queue as a parameter. This is intended to be used to create per-cpu run queues. Implement wrappers for compatibility with the old interface which pass in the global run queue structure. - Group the priority level, user priority, native priority (before propogation) and the scheduling class into a struct priority. - Change any hard coded priority levels that I found to use symbolic constants (TTIPRI and TTOPRI). - Remove the curpriority global variable and use that of curproc. This was used to detect when a process' priority had lowered and it should yield. We now effectively yield on every interrupt. - Activate propogate_priority(). It should now have the desired effect without needing to also propogate the scheduling class. - Temporarily comment out the call to vm_page_zero_idle() in the idle loop. It interfered with propogate_priority() because the idle process needed to do a non-blocking acquire of Giant and then other processes would try to propogate their priority onto it. The idle process should not do anything except idle. vm_page_zero_idle() will return in the form of an idle priority kernel thread which is woken up at apprioriate times by the vm system. - Update struct kinfo_proc to the new priority interface. Deliberately change its size by adjusting the spare fields. It remained the same size, but the layout has changed, so userland processes that use it would parse the data incorrectly. The size constraint should really be changed to an arbitrary version number. Also add a debug.sizeof sysctl node for struct kinfo_proc.
* Change and clean the mutex lock interface.bmilekic2001-02-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order)
* Add some debugging.msmith2001-01-311-8/+72
| | | | | | Turn off semaphores. Nobody else implements them, and there is lots of AML out there which does totally absurd things with them, meaning that if we try to do the right thing we are guaranteed to fail.
* Add some debugging statements.msmith2001-01-313-26/+67
|
* Tidy up.msmith2001-01-311-48/+47
| | | | | | Don't print temperatures at attach time - they're usually wrong. Use acpi_EvaluateInteger instead of doing things the hard way.
* Add some debugging.msmith2001-01-311-35/+17
| | | | | | | | | Use acpi_EvaluateInteger where possible. Use FuncName rather than &FuncName when passing function addresses. Don't evaluate the _REG method when we attach to an address space - AcpiInstallAddressSpaceHandler does it for us.
* ACPI_NUMBER becomes ACPI_INTEGER. acpi_EvaluateNumber becomesmsmith2001-01-318-46/+24
| | | | | | | | | | | acpi_EvaluateInteger. Use acpi_EvaluateInteger instead of doing things the hard way where possible. AcpiSetSystemSleepState (unofficial) becomes AcpiEnterSleepState. Use the AcpiGbl_FADT pointer rather than searching for the FADT.
* Axe unused local variable.jhb2001-01-231-1/+0
|
* - Mark an unused function with __unused.jhb2001-01-231-1/+6
| | | | - Temporarily #if 0 some unused local variables.
* Axe an unused static softc.jhb2001-01-231-2/+0
|
* Move a temporary #ifdef of code (just the #ifdef part) up so that it isjhb2001-01-231-4/+4
| | | | | above the local variable declaration to quiet warnings about unused variables.
* In answer to the comment: /* XXX is it OK to block here? */, the answerpeter2001-01-231-2/+3
| | | | | is definately NO! as we are in interrupt context and malloc() does a KASSERT() to be sure.
* Plug a memory leak in AcpiOsDeleteSemaphore where the mutex is not properlymsmith2001-01-221-0/+2
| | | | | | destroyed. Submitted by: bmilekic
* Add 3 new dynamic sysctl's to control the sleep states switched to on ajhb2001-01-132-0/+53
| | | | | | | power button, sleep button, or lid close event. The sysctl's use the ACPI sleep state names S0, S1, S2, S3, S4, S4B, and S5. Reviewed by: iwasaki
* Enable fixed event at not only boot but also wakeup.iwasaki2001-01-101-13/+33
| | | | Reported and patch tested by: Peter Dufault <dufault@hda.hda.com>
* Change Embedded Controller lock to ACPI Global Lock.This is needed fortakawata2001-01-021-11/+2
| | | | mutual execution between BIOS and OS.
* Hack in interrupt routing support (using the core $PIR support, not usingmsmith2000-12-292-6/+10
| | | | | ACPICA properly). This makes it possible to use ACPICA in conjunction with CardBus before I get around to implementing ACPI/PCI interrupt routing.
* Add ioctls to acpi_cmbat and acpi_acad. These use mike's acpi_register_ioctl().iwasaki2000-12-244-4/+130
| | | | Fix wrong AML method calling in acpi_cmbat.
* Add ACPI AC adaptor and ACPI Control Method Battery.takawata2000-12-224-3/+480
| | | | And install notify handler for thermal zone .
* Re-Enable OSD_PRIORITY_GPE. Now 20001215 has been commited.takawata2000-12-211-2/+0
|
* Disable my previous committed code for a moment.iwasaki2000-12-201-0/+2
| | | | | Note to myself: this needs to be enabled again when newer version of ACPI is imported.
* Add task priority definition for OSD_PRIORITY_GPE in AcpiOsQueueForExecution().iwasaki2000-12-201-0/+3
| | | | This is needed to next ACPICA import.
* Change priority of procedure queueing.takawata2000-12-201-2/+2
| | | | This is needed to next ACPICA import.
* Fix testing reboot howto flags in acpi_shutdown_final().iwasaki2000-12-191-1/+1
| | | | | | | This sould make the system power-off correctly where the howto had more bits set than RB_POWEROFF, e.g. RB_NOSYNC. Submitted by: Peter Pentchev <roam@orbitel.bg>
* Fix with debugging option.takawata2000-12-151-2/+2
| | | | Submitted by: haro@tk.kubota.co.jp
* Make Embedded Controller driver interrupt driven.takawata2000-12-141-19/+77
|
* Catch up with the recent conversion the per-eventhandler list mutex toiwasaki2000-12-122-0/+2
| | | | a lockmgr lock.
* Staticise some malloc poolsmsmith2000-12-082-2/+2
| | | | Submitted by: phk
* - Convert a lot of homebrew debugging output to use the ACPI CA debuggingmsmith2000-12-0813-196/+512
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | infrastructure. It's not perfect, but it's a lot better than what we've been using so far. The following rules apply to this: o BSD component names should be capitalised o Layer names should be taken from the non-CA set for now. We may elect to add some new BSD-specific layers later. - Make it possible to turn off selective debugging flags or layers by listing them in debug.acpi.layer or debug.acpi.level prefixed with !. - Fully implement support for avoiding nodes in the ACPI namespace. Nodes may be listed in the debug.acpi.avoid environment variable; these nodes and all their children will be ignored (although still scanned over) by ACPI functions which scan the namespace. Multiple nodes can be specified, separated by whitespace. - Implement support for selectively disabling ACPI subsystem components via the debug.acpi.disable environment variable. The following components can be disabled: o bus creation/scanning of the ACPI 'bus' o children attachment of children to the ACPI 'bus' o button the acpi_button control-method button driver o ec the acpi_ec embedded-controller driver o isa acpi replacement of PnP BIOS for ISA device discovery o lid the control-method lid switch driver o pci pci root-bus discovery o processor CPU power/speed management o thermal system temperature detection and control o timer ACPI timecounter Multiple components may be disabled by specifying their name(s) separated by whitespace. - Add support for ioctl registration. ACPI subsystem components may register ioctl handlers with the /dev/acpi generic ioctl handler, allowing us to avoid the need for a multitude of /dev/acpi* control devices, etc.
* ACPI HID's aren't limited to 7 characters. Don't check the length of themsmith2000-12-051-2/+2
| | | | | | | HID passed in as an argument at all; callers are typically going to be sending us static strings anyway. Submitted by: Munehiro Matsuda <haro@tk.kubota.co.jp>
* Revert attach() back to the old behaviour of calling bus_generic_attach().scottl2000-12-022-8/+10
| | | | | | | The new way doesn't seem to work reliably and was causing devices to not be seen. Approved by: msmith
* AcpiOsMem primitives as required by the new ACPI CA snapshotmsmith2000-12-011-1/+91
|
* Update to work with the new ACPI CA snapshot.msmith2000-12-017-86/+64
| | | | | | | | | | - Use ACPI_PHYSICAL_ADDRESS - RSDT -> XSDT - FACP -> FADT - No APIC table support - Don't install a global EC handler; this has bad side-effects (it invokes _REG in *all* EC spaces in the namespace!) - Check for PCI bus instances already existing before adding them
* Remove unused PCI includes.msmith2000-11-061-3/+0
|
* If acpica driver is loaded using kldload(8), warn and just ignore.takawata2000-10-312-0/+10
|
* Initial FreeBSD OSPM (operating system power management) modules formsmith2000-10-2815-0/+4893
| | | | | | | | | | | | | | ACPICA. Most of these are still works in progress. Support exists for: - Fixed feature and control method power, lid and sleep buttons. - Detection of ISA PnP devices using ACPI namespace. - Detection of PCI root busses using ACPI namespace. - CPU throttling and sleep states (incomplete) - Thermal monitoring and cooling control (incomplete) - Interface to platform embedded controllers (mostly complete) - ACPI timer (incomplete) - Simple userland control of sleep states. - Shutdown and poweroff.
* FreeBSD-specific OSD (operating system dependant) modules for the Intelmsmith2000-10-289-0/+972
ACPICA code.
OpenPOWER on IntegriCloud