summaryrefslogtreecommitdiffstats
path: root/sys/i386/bios
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Continue where Julian left off in July 1998:phk1999-05-071-3/+3
| | | | | | | | | | | | | | Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline) function. Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention to the order of the cmaj/bmaj arguments!) Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE (ditto!) (Next step will be to convert all bdev dev_t's to cdev dev_t's before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
* Now that each cpu has its own gdt table, we need to setup apm gdt entries inluoqi1999-05-061-1/+18
| | | | all the tables.
* DEVICE_SUSPEND was always returning ENXIO for reasons unknown. Forimp1999-04-211-2/+7
| | | | | now we noisily ignore this (and all errors). DEVICE_SUSPEND should be corrected, but I wanted to unbreak suspend until that happens.
* Add support for 'disabled' probe hint.dfr1999-04-181-2/+6
|
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-27/+43
| | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
* Perform APM power-off on power-off request, not halt request.msmith1998-12-101-3/+3
|
* Fix typo: "==" should have been "="archie1998-12-041-2/+2
| | | | | | PR: 8280 (1/3 patches contained in this PR) Reviewed by: Nate Williams <nate@mt.sri.com> Submitted by: Sakari Jalovaara <sja@tekla.fi>
* Add the ability to specify where on the at_shutdown queue a handler ismsmith1998-10-301-4/+9
| | | | | | | | | installed. Remove cpu_power_down, and replace it with an entry at the end of the SHUTDOWN_FINAL queue in the only place it's used (APM). Submitted by: Some ideas from Bruce Walter <walter@fortean.com>
* Use defines APM_BIOS and SYSTEM_BIOS instead of hardcoding 0x53 and 0x15.jlemon1998-09-281-5/+5
|
* Add the ability to suspend as well as hibernate to the system. Thisimp1998-07-061-15/+36
| | | | | | | is the kernel part of my commits, the userlevel stuff will be done in a separate commit. Add the ability to suspend as well as hibernate to syscons. Create a new virtual key like hibernate for suspend. Update apm_bios.h to define more apm bios goodies.
* This commit fixes various 64bit portability problems required fordfr1998-06-071-2/+2
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* If vm86 services are available, use these to perform the APM BIOSmsmith1998-06-033-17/+87
| | | | | | probe and intialisation. This will ultimately remove the grubby (but functional) hack that copies a real-mode function into low memory early in locore.s.
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-301-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde
* Staticize.eivind1998-02-091-2/+2
|
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.eivind1998-01-241-1/+3
| | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow.
* This patch causes the "calltodo" timer list to be decremented by the amountnate1997-12-231-2/+16
| | | | | | | | | | | | | | | | | | | | | | of time that the laptop was suspending. Thus, select() calls that might have suspended rather than firing at 1hr + "time suspended" since the timer was posted. Adding: options APM_FIXUP_CALLTODO to the kernel config enables the patch. [ This patch was slightly modified to use a consistant indent style and I removed some unused local variables. After this has been tested a few weeks we'll make the options the default, so for now I'm now documenting it in LINT. Mike can later if he wants. ] Reviewed by: Mike Smith <msmith@freebsd.org> Submitted by: Ken Key <key@cs.utk.edu>
* The Libretto's BIOS doesn't set edx on the APM_GETPWSTATUS call, soimp1997-12-041-3/+11
| | | | | | | the barrery time remaining is reported as a random number. Initialize edx to 0xffff in this case, and to 0 in all other cases. This change should be benign on other machines. Reviewed by: jdp
* Expand the APMIO_GETINFO ioctl to return the estimated remainingjdp1997-11-121-30/+57
| | | | | | | | battery time. For backward compatibility with old binaries, I assigned a new ioctl number for this call, and retained the old one as APMIO_GETINFO_OLD. I also added eight words of padding and a version field, so that future enhancements won't require jumping through this hoop again.
* - Convert c++ comment to c comment.nate1997-11-101-2/+2
| | | | Noted by: Bruce
* - Update the email address in the copyrights.nate1997-11-045-15/+11
|
* - If the APM BIOS fails to suspend the system after running thenate1997-11-041-3/+6
| | | | | suspend hooks, run the resume hooks to re-configure the system back to where it was.
* - Back out the last. APM_BROKEN_STATCLOCK doesn't exist in -current.nate1997-10-231-2/+0
|
* - If APM_BROKEN_STATCLOCK is defined, make sure the statcloock isnate1997-10-221-1/+3
| | | | disabled, don't rely on the flags to set it.
* Convert to the new callout interface.gibbs1997-09-211-3/+7
|
* Fix crash when halting where APM was configured but not enabledwollman1997-06-191-1/+3
| | | | | | by checking whether APM is active in apm_power_off() and returning if not. (The code was already written with the expectation that this function would return if it fails.)
* Fix definition of apm_power off (was suffering from cut&paste syndrome).wollman1997-06-151-2/+2
|
* When APM is configured, turn off the power when halting for good.wollman1997-06-151-1/+14
|
OpenPOWER on IntegriCloud