Commit Graph

41 Commits

Author SHA1 Message Date
Nate Williams
454dc1433b Call apm_int() instead of doing direct assembly calls even when we don't
care about the return value for consistency.
1996-03-19 16:48:38 +00:00
Nate Williams
f440f5788c Added kernel compile time failure if more than one APM device is
configured.
1996-03-19 04:49:13 +00:00
Nate Williams
8371872e22 Always enable interrupts before calling the APM idle/busy routines.
Suggested by:	phk@FreeBSD.org
1996-03-19 04:40:03 +00:00
Nate Williams
c5952f03fc Minor bugfixes from the recent PC-CARD release.
Submitted by:	hosokawa@mt.cs.keio.ac.jp and the rest of the Nomads
1996-03-18 23:30:14 +00:00
Nate Williams
61e269f90b Grr, let's actually include <sys/devconf.h> so that DEVCONF support actually
works.
1996-03-18 22:47:16 +00:00
Nate Williams
02cf17b17a Whoops, forgot the line that sets the default state in devfs. 1996-03-18 22:40:57 +00:00
Nate Williams
206bb9d772 Devfs support.
Submitted by:   hosokawa@mt.cs.keio.ac.jp and the rest of the Nomads

Cleanup.
1996-03-18 22:29:48 +00:00
Nate Williams
a92dd1ae3a Removed support for multiple APM devices. 1996-03-18 21:58:22 +00:00
Nate Williams
dc6fd44943 Return the status of the APM support (enabled/disabled) with the
APM_GETINFO ioctl.
1996-03-13 00:42:56 +00:00
Nate Williams
e34e4a3ce0 Removed more APM_SLOWSTART code and re-enabled some functions which
didn't require APM_SLOWSTART to be defined.
1996-03-12 21:51:58 +00:00
Nate Williams
5e364b3cae Fix some minor typo's in the comments. 1996-03-12 21:23:56 +00:00
Nate Williams
b079435208 Always initialize master_softc. This avoids panics in the idle loop due
to unitialized data if the APM support is compiled in and the probe
fails.
1996-03-12 06:09:34 +00:00
Nate Williams
5be175963d Do a APM BIOS dis-connect before attempting to do a 32-bit connection
just in case a connection already existed.

Also, a minor optimization in the code which determins if a APM BIOS exists.

Reviewed by:	phk

This is based on the APM-0.5 patch for Linux, but written entirely by me.
1996-03-11 21:55:18 +00:00
Nate Williams
ed9e3473d0 Removed conditionals on BDE_DEBUGGER around the loading for the IDT
since it's necessary for interrupt processing to be enabled.  Modify
comment to reflect this condition.

Submitted by:	bde
1996-03-11 21:42:52 +00:00
Nate Williams
f42e1448c8 Bring in most of Bruce's prot_to_real() changes into the APM BIOS
startup code.

Reviewed by:  bde
1996-03-11 06:48:57 +00:00
Mike Pritchard
6c5e9bbdf5 Fix a bunch of spelling errors in the comment fields of
a bunch of system include files.
1996-01-30 23:02:38 +00:00
Bruce Evans
f15351202f Finished removing MACH_KERNEL stuff. 1995-12-27 16:16:02 +00:00
Bruce Evans
c6bbb6d152 Fixed staticizing. Some functions aren't static but depend on
the undocumented previously unLINTed option `APM_SLOWSTART'.
1995-12-25 07:38:47 +00:00
Poul-Henning Kamp
0fccf9dcec Cleanup. 1995-12-22 13:08:27 +00:00
Julian Elischer
87f6c6625d Pass 3 of the great devsw changes
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)

If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)

pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
1995-12-08 11:19:42 +00:00
David Greenman
efeaf95a41 Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00
Julian Elischer
7198bf4725 If you're going to mechanically replicate something in 50 files
it's best to not have a (compiles cleanly) typo in it! (sigh)
1995-11-29 14:41:20 +00:00
Julian Elischer
53ac6efbd8 OK, that's it..
That's EVERY SINGLE driver that has an entry in conf.c..
my next trick will be to define cdevsw[] and bdevsw[]
as empty arrays and remove all those DAMNED defines as well..

Each of these drivers has a SYSINIT linker set entry
that comes in very early.. and asks teh driver to add it's own
entry to the two devsw[] tables.

some slight reworking of the commits from yesterday (added the SYSINIT
stuff and some usually wrong but token DEVFS entries to all these
devices.

BTW does anyone know where the 'ata' entries in conf.c actually reside?
seems we don't actually have a 'ataopen() etc...

If you want to add a new device in conf.c
please  make sure I know
so I can keep it up to date too..

as before, this is all dependent on #if defined(JREMOD)
(and #ifdef DEVFS in parts)
1995-11-29 10:49:16 +00:00
Julian Elischer
b2b028bab9 oops forgot one.. 1995-11-28 09:44:42 +00:00
Bruce Evans
a17ca20cbc Fixed the types of apm_default_resume() and apm_default_suspend().
Added prototypes.
1995-11-18 04:37:23 +00:00
Poul-Henning Kamp
4ccc87c594 Remove unused functions and variables, make things static, and other cleanups. 1995-10-28 15:39:31 +00:00
Bruce Evans
97e156674d Don't include <sys/tty.h> in drivers that aren't tty drivers or in general
files that don't depend on the internals of <sys/tty.h>
1995-07-16 10:13:08 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
Poul-Henning Kamp
648c711bb4 This is the latest version of the APM stuff from HOSOKAWA, I have looked
briefly over it, and see some serious architectural issues in this stuff.

On the other hand, I doubt that we will have any solution to these issues
before 2.1, so we might as well leave this in.

Most of the stuff is bracketed by #ifdef's so it shouldn't matter too much
in the normal case.

Reviewed by:	phk
Submitted by:	HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
1995-02-17 02:22:57 +00:00
Poul-Henning Kamp
d71494d323 Don't push/pop the return-val register. (DUH!) 1994-12-16 07:31:47 +00:00
Poul-Henning Kamp
d90b957315 Grumble, try to remember what assembler syntax is used :-/
Increase polling frequency a fraction to just above 1 Hz.
1994-12-16 07:09:22 +00:00
Poul-Henning Kamp
2decd76771 Be much more carefull about what we leave in unused registers when we call
the APM-bios.
This stabilizes a couple of APM bioses quite a bit.
They all make the mistake of going into 16-bit mode, without clearing the
top half of the 32bit registers.
Later they do a
|	movw %si,$0x7331
|	movw %ax,0x6(%si)
or something along those lines and crash and burn, because their segment
is already relocated, so adding 0xf0171ce9 to the base of it is bad news.

At least SystemSoft is guilty of this bummer.
1994-12-16 06:16:30 +00:00
Bruce Evans
dc4de4ca23 Fix type mismatches exposed by a recently added prototype. 1994-11-15 14:09:18 +00:00
Poul-Henning Kamp
6bc92e913f Calling sync will panic you more often than not. 1994-11-07 04:23:58 +00:00
Poul-Henning Kamp
4a5014e48b Got rid of "APM" macro. Now only NAPM is needed to activate the APM stuff. 1994-10-10 01:14:03 +00:00
Poul-Henning Kamp
1ed171d405 Ripped out a lot of stuff made to circumvent the previous bogus assy stuff.
Ripped out the "hooks".  Until we know how we want to do it, we shouldn't
start hacking anyway.  Still panics my machine though.
1994-10-02 17:40:38 +00:00
Poul-Henning Kamp
3d1dcf1ba5 Replaced the magic register union with inline assembler. Now it works
"mostly".  My machine still panics from time to time, and I think the
problem is a stack-problem.
1994-10-02 01:45:42 +00:00
Poul-Henning Kamp
64bb0d8861 On my GW2K Handbook486 this code would reset when called from locore.s
I think I have narrowed this down to the stack being overflown.  I have
taken the push/pop of %fs out, it shouldn't be needed anyway, but the
real & correct solution might to save the registers on the stack in
locore.s before calling this stuff.
1994-10-01 21:29:50 +00:00
David Greenman
5185ed0d3a Added $Id$ 1994-10-01 05:13:37 +00:00
David Greenman
414c40f66d Minor improvement to probe routine.
Submitted by:	HOSOKAWA Tatsumi
1994-10-01 03:29:28 +00:00
David Greenman
22414e535a Laptop Advanced Power Management support by HOSOKAWA Tatsumi.
Submitted by:	HOSOKAWA Tatsumi
1994-10-01 02:56:21 +00:00