summaryrefslogtreecommitdiffstats
path: root/sys/i386/apm
Commit message (Collapse)AuthorAgeFilesLines
* Be consistent about functions being static.phk2002-10-161-1/+1
| | | | Spotted by: FlexeLint.
* Hang apm off of the legacy device instead of the nexus.jhb2002-09-231-1/+1
|
* Use a function instead of embedding non-portable asm() constructsmarkm2002-09-211-1/+2
| | | | in C code.
* Sort includes.markm2002-09-211-13/+14
|
* Remove __P.alfred2002-03-201-4/+4
|
* Add generalized power profile code.iwasaki2002-03-041-0/+20
| | | | | | | | | | | | | This makes other power-management system (APM for now) to be able to generate power profile change events (ie. AC-line status changes), and other kernel components, not only the ACPI components, can be notified the events. - move subroutines in acpi_powerprofile.c (removed) to kern/subr_power.c - call power_profile_set_state() also from APM driver when AC-line status changes - add call-back function for Crusoe LongRun controlling on power profile changes for a example
* Some fix for the recent apm module changes.iwasaki2001-11-011-2/+96
| | | | | | | | | | | | | | - Now that apm loadable module can inform its existence to other kernel components (e.g. i386/isa/clock.c:startrtclock()'s TCS hack). - Exchange priority of SI_SUB_CPU and SI_SUB_KLD for above purpose. - Add simple arbitration mechanism for APM vs. ACPI. This prevents the kernel enables both of them. - Remove obsolete `#ifdef DEV_APM' related code. - Add abstracted interface for Powermanagement operations. Public apm(4) functions, such as apm_suspend(), should be replaced new interfaces. Currently only power_pm_suspend (successor of apm_suspend) is implemented. Reviewed by: peter, arch@ and audit@
* KSE Milestone 2julian2001-09-121-5/+5
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Commit some tweaks I have had laying around my tree for over a year now.peter2001-03-131-6/+7
| | | | Always set the APM "device" description. Some minor style tweaks.
* select() DKI is now in <sys/selinfo.h>.wollman2001-01-091-1/+1
|
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-291-1/+0
|
* Add Timer device driver for power management events.iwasaki2000-09-142-80/+7
| | | | | | | | | | | | | | | | The code for suspend/resume is derived from APM device driver. Some people suggested the original code is somewhat buggy, but I'd like to just move it from apm.c without any major changes for the initial version. This code should be refined later. To use pmtimer to adjust time at resume time, add device pmtimer in your kernel config file, and add hint.pmtimer.0.at="isa" in your device.hints Reviewed by: -current, bde
* Add output of per battery information to apm(1).ume2000-08-131-14/+44
| | | | | | New ioctl APMIO_GETPWSTATUS is introduced. Reviewed by: -mobile and -current folks (no objection)
* Cleanup debug messages and Add some enhancements from linux oniwasaki2000-08-041-63/+52
| | | | | | | | | | | | | | display control by apm -d. - Remove APM_DEBUG to avoid re-build kernel with such a unspported optioin. - Introduce new denug flag `debug.apm_debug' which can be controlled by sysctl interface and loader by setting like "debug.apm_debug=1", you will get debug messages from APM driver. - Add some enhancements from linux on display control by apm -d. I'm expecting that we can see some improvements on some laptops where apm -d doesn't work correctly so far. Reviewed by: -mobile and -current folks (no objection) Suggested by: Susumu WAKABAYASHI <susumu@wakabaya.net>
* Except for the information gathering IOCTLs, require apm device beimp2000-07-191-0/+16
| | | | opened for write. This should make the apm device read only safe.
* Correctly handle suspend and resume in APM.n_hibma2000-02-061-14/+13
| | | | | | | | | | | | | | Up to now, errors from DEVICE_SUSPEND(root_bus) were ignored. The fix for this problem (the introduction of defaults for device methods) has been committed months ago by Doug Rabson. Second, the suspended devices were not always properly resumed on error. Third, swapped the order for calling restore hooks and restore methods, to be in line with the cases above. Reviewed by: Doug Rabson Approved by: jhk
* Remove code to select APM version with flags to the apm0 device. Thisjlemon1999-12-021-21/+4
| | | | | | code has been disabled for the last 4 months. Prodded into action by: n_hibma
* Use DRIVER_MODULE(), apm.c already takes care of it's devices withpeter1999-11-081-1/+1
| | | | make_dev().
* i8254_restore is called from apm_default_resume() to reloadiwasaki1999-10-301-0/+1
| | | | | | | | | | | | the countdown register. this should not be necessary but there are broken laptops that do not restore the countdown register on resume. when it happnes, it messes up the hardclock interval and system clock, which leads to the infamous "calcru: negative time" problem. Submitted by: kjc, iwasaki Reviewed by: Steve O'Hara-Smith <steveo@eircom.net> and committers. Obtained from: PAO3
* Fix APM's make_devs:nsayer1999-10-121-1/+2
| | | | | | 1. chown root:operator, chmod 660 2. Add /dev/apmctl as well as /dev/apm
* Prepare for the apm_saver screen saver module.nsayer1999-10-022-25/+50
| | | | | | | | 1. Break out the definition of the soft state structure into an include file. 2. un-static the soft state and apm_display(), and group them under a comment that notes the dependency.
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* Return immediately from apm_suspend() when APM BIOS wasn't initialized.iwasaki1999-09-201-0/+3
| | | | | | | Pressing Alt-Pause key will cause machine to reboot with apm disabled. PR: i386/13817 Submitted by: yokota
* Handle CAPABILITIESCHANGE event.iwasaki1999-09-111-0/+3
| | | | Document USERSTANDBYREQ and CAPABILITIESCHANGE events to apmd manpage.
* Handle UserStandbyRequests as well as the other 3 members of thensayer1999-09-111-0/+8
| | | | {,USER}{STANDBY,SUSPEND}REQ matrix.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-13/+2
| | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
* Add an identify method to allow apm to attach itself to the nexuspeter1999-08-221-1/+15
| | | | without hooks in there.
* Fix `key release event prevent suspend' problem. We don't neediwasaki1999-08-221-24/+89
| | | | | | | | `sleep 1; zzz' trick now. - APM BIOS Call for suspend/standby now should be issued with delay. - Delay for suspend/standby can be adjusted by using sysctl(8) interface (eg. sysctl -w machdep.apm_suspend_delay=3).
* Implement a new generic mechanism for attaching handler functions tomsmith1999-08-211-3/+5
| | | | | | | | | | | | | events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green
* - Add apm_check_function_supported() and call it fromiwasaki1999-08-141-2/+66
| | | | | | | | | | apm_bioscall() to check requested BIOS is supported or not. - Add workaround in apm_driver_version() for the buggy BIOSes which don't return the connection version in %ax. PR: i386/13028 Reviewed by: sanpei@sanpei.org and Warner Losh.
* Don't trust the segment limits that the BIOS reports; instead give itmsmith1999-08-021-10/+5
| | | | | as much space as possible to avoid lossage due to sloppy BIOS programming.
* Reenable the APMIO_BIOS ioctl and translate arguments into the new formatmsmith1999-07-301-1/+20
| | | | | | (which is more like the old than I thought). Requested-by: imp
* Remove all vestiges of APMIO_BIOSmsmith1999-07-301-7/+1
| | | | Submitted by: N. Dudorov <nnd@mail.nsk.ru>
* No more apm_errno. It breaks the build with APM_DEBUG,iwasaki1999-07-291-3/+3
| | | | uses (sc->bios.r.eax >> 8) & 0xff instead.
* Nuke this, it's not used anymore.msmith1999-07-291-60/+0
|
* Major update to the kernel's BIOS-calling ability.msmith1999-07-291-299/+223
| | | | | | | | | - Add support for calling 32-bit code in other segments - Add support for calling 16-bit protected mode code Update APM to use this facility. Submitted by: jlemon
* Remove unused real-mode APM setup support. We've been using the vm86msmith1999-07-283-189/+17
| | | | mode initialiser for a while now, and it's looking happy.
* Remove unused real-mode APM init functions.msmith1999-07-288-759/+0
|
* Remove some erroneous comments about how APM is initialised.msmith1999-07-281-10/+3
|
* Add braces to make if-else statement clearer.iwasaki1999-07-221-4/+6
| | | | | PR: 12663 Submitted by: Adam Wight <adamw@holonet.net>
* Add apmd support code.iwasaki1999-07-101-12/+246
|
* Remove cmaj and bmaj args from DEV_DRIVER_MODULE.phk1999-07-041-3/+2
|
* Unifdef VM86jlemon1999-06-011-8/+1
| | | | Reviewed by: silence on on -current
* This commit should be a extensive NO-OP:phk1999-05-301-5/+22
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledphk1999-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udev_t in the kernel but still called dev_t in userland. Provide functions to manipulate both types: major() umajor() minor() uminor() makedev() umakedev() dev2udev() udev2dev() For now they're functions, they will become in-line functions after one of the next two steps in this process. Return major/minor/makedev to macro-hood for userland. Register a name in cdevsw[] for the "filedescriptor" driver. In the kernel the udev_t appears in places where we have the major/minor number combination, (ie: a potential device: we may not have the driver nor the device), like in inodes, vattr, cdevsw registration and so on, whereas the dev_t appears where we carry around a reference to a actual device. In the future the cdevsw and the aliased-from vnode will be hung directly from the dev_t, along with up to two softc pointers for the device driver and a few houskeeping bits. This will essentially replace the current "alias" check code (same buck, bigger bang). A little stunt has been provided to try to catch places where the wrong type is being used (dev_t vs udev_t), if you see something not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if it makes a difference. If it does, please try to track it down (many hands make light work) or at least try to reproduce it as simply as possible, and describe how to do that. Without DEVT_FASCIST I belive this patch is a no-op. Stylistic/posixoid comments about the userland view of the <sys/*.h> files welcome now, from userland they now contain the end result. Next planned step: make all dev_t's refer to the same devsw[] which means convert BLK's to CHR's at the perimeter of the vnodes and other places where they enter the game (bootdev, mknod, sysctl).
* Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference betweenphk1999-05-091-2/+2
| | | | a major number for a dev_t.
* Make apm_probe() properly return an error code when APM BIOS callsyokota1999-05-091-4/+4
| | | | failed, so that the apm driver won't be attached.
* Move the declaration of the interrupt type from the driver structuredfr1999-05-081-2/+1
| | | | to the BUS_SETUP_INTR call.
OpenPOWER on IntegriCloud