Go to file
cgd b79d7b9bb1 * clean up the way APMDEBUG and DEBUG are treated. defining either will
get APM debugging code compiled in.  also, redo the way APM debugging
  printfs are invoked, making sure they're always compiled in if debugging
  is enabled, but printing them only if the appropriate bits in the
  'apmdebug' global variable are set.
* clean up function prototypes (alphabetize in each category, get rid
  of 'STATIC' and make them always static since kernels shouldn't have
  static symbols stripped anyway, and debugging kernels definitely don't),
  group global variables together and note that they're used as globals).
* Export the following as option-settable and patchable global variables:
	apmdebug	flags word that controls which APM debugging
			printfs are printed, set with APMDEBUG_VALUE.
	apm_enabled	boolean that indicates whether or not APM should
			ever be configured on the machine.  true by
			default, false if APM_DISABLE defined when
			compiling.  this option exists so that users
			whose systems crash when APM is enabled can
			disable it with a patchable kernel variable, and
			therefore don't necessarily have to compile
			a custom kernel as often.  With this option set,
			a check is still done to see if the APM BIOS
			exists; this variable should be used to prevent
			the kernel from ever attaching to the APM BIOS.
	apm_force_64k_segments
			boolean that tells segment setup code to always
			use segments with 64k length.  false by default,
			true if APM_FORCE_64K_SEGMENTS defined when
			compiling.  used to just be a compile-time option.
	apm_do_idle	boolean that controls whether or not the APM code
			will try to signal the BIOS that the system is
			idle when in the idle loop.  true by default,
			false if APM_NO_IDLE defined when compiling.
	apm_do_standby	boolean that controls whether or not standby
			requests are ever attempted.  true by default,
			false if APM_NO_STANDBY defined when compiling.
			used to just be a compile-time option.
	apm_v11_enabled	boolean that controls whether or not the driver
			attempts to use APM spec v1.1 features.  If true,
			the driver does (it implements v1.1 of the spec),
			and if false the driver only uses v1.0 features.
			true by default, false if APM_V10_ONLY is defined
			when compiling.  Really, the driver should be
			updated to do APM v1.2 and this option should
			either be updated or go the way of the dodo.
			used to just be a compile-time option.
	apm_bogus_bios	(patchable only) controls a few of the APM segment
			setup features.  (probably should just be a global
			and not patchable.)
* make apm_perror print out the full contents of %ax rather than
  just the error code, in addition to printing out the string corresponding
  to the error code.
* print estimated remaining battery life time as "[<hours>h ]<minutes>m",
  which is actually easily understood, rather than as "<hours>:<minutes>
  minutes", which is not.
* restructure match and attach so that they work as they should, remove
  redundancy, support attaching the APM device but not actually enabling it
  so that APM is attached on systems which have it but on which it's broken
  in some fatal way.
* add more debugging printfs in the apm control device entry points.
* return EOPNOTSUPP when trying to do a standby ioctl if standbys have
  been disabled, rather than returning the less-intuitive ENOTTY.
* rename a few functions for consistency: apmprobe -> apmmatch,
  apm_err_translate -> apm_strerror.
* mark a few serious or annoying bogons XXX so people might look at
  them later.
* KNF (lots of changes!)

Despite this substantial amount of work, this driver still needs a _lot_ of
work.  In particular, the user-land device interface needs to be gutted, and
better support for APM-aware applications and device drivers (i.e. call-backs)
needs to be added (e.g. callback interfaces somewhat like those suggested
by the APM spec).

There are still outstanding known problems with some machines.  The true
source of those problems is not currently known, and could be either the APM
BIOSes of the machines in question or this APM driver.  However, even if the
problems are caused by APM BIOS bugs, they could be more gracefully worked
around in this driver.
1997-07-17 06:30:03 +00:00
bin PR/3866: bayer@informatik.uni-leipzig.de: core dump using xon script. 1997-07-15 17:49:15 +00:00
distrib Note changes in the machine header files. Added pic versions of the 1997-07-17 00:01:45 +00:00
etc Create wd2 and wd3 device files for 'all' and 'floppy' options. 1997-07-17 00:12:55 +00:00
games don't xref obsolete regcmp(3) 1997-07-16 06:59:59 +00:00
gnu * Fix setting of 'Originator' field, so that it matches whole login field 1997-07-17 04:50:35 +00:00
include some minor KNF 1997-07-14 00:30:28 +00:00
lib - Don't deref a bad pointer in the event the object has no symbol 1997-07-17 00:54:27 +00:00
libexec Add the necessary -I flag to pick up the libc/include/extern.h 1997-07-14 02:56:54 +00:00
regress Use proginstall:: to disable installing PROG. 1997-05-07 15:59:08 +00:00
sbin fix halt when used as login shell, from cgd in pr-2618 1997-07-17 02:52:22 +00:00
share don't xref nonexistent mount(1) 1997-07-16 05:45:28 +00:00
sys * clean up the way APMDEBUG and DEBUG are treated. defining either will 1997-07-17 06:30:03 +00:00
usr.bin add -T option to display seconds, from jhawk in pr-1548 1997-07-17 02:36:55 +00:00
usr.sbin use <sys/cdefs.h> __COPYRIGHT and __RCSID macros 1997-07-17 05:51:18 +00:00
Makefile Back out BUILDDIR and NOINSTALL changes. 1997-05-31 21:21:13 +00:00