Commit Graph

43 Commits

Author SHA1 Message Date
scrappy
415585985c Switched from using devfs_add_sw() to using devfs_add_swf()
Reviewed by:	julian@freebsd.org
1996-03-28 14:29:52 +00:00
nate
b74ac00a62 Add some comments on the APM specs, and make the APM 'idle/busy'
functions follow them.
1996-03-19 16:56:56 +00:00
nate
afd1f411f5 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
b10555454e Added kernel compile time failure if more than one APM device is
configured.
1996-03-19 04:49:13 +00:00
nate
ebbb96df5d Always enable interrupts before calling the APM idle/busy routines.
Suggested by:	phk@FreeBSD.org
1996-03-19 04:40:03 +00:00
nate
2a6c56cfef 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
f4fd38ee57 Grr, let's actually include <sys/devconf.h> so that DEVCONF support actually
works.
1996-03-18 22:47:16 +00:00
nate
4995ce37e8 Whoops, forgot the line that sets the default state in devfs. 1996-03-18 22:40:57 +00:00
nate
4c7fdd4f2e 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
c7f74c6b51 Removed support for multiple APM devices. 1996-03-18 21:58:22 +00:00
nate
986c9f5c3a Return the status of the APM support (enabled/disabled) with the
APM_GETINFO ioctl.
1996-03-13 00:42:56 +00:00
nate
069131e0ec 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
1357ea6673 Fix some minor typo's in the comments. 1996-03-12 21:23:56 +00:00
nate
0ac561df48 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
d3d6c3d3ef 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
4c7f7450e5 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
878cd16481 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
mpp
f3dd75a38d 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
bde
5865dfdfe7 Finished removing MACH_KERNEL stuff. 1995-12-27 16:16:02 +00:00
bde
01f94ecaac 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
phk
a267c8b3d9 Cleanup. 1995-12-22 13:08:27 +00:00
julian
1900eea896 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
dg
c30f46c534 Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00
julian
198d88e0ae 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
f2f63c6ece 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
72067f66c5 oops forgot one.. 1995-11-28 09:44:42 +00:00
bde
1ab1d0615c Fixed the types of apm_default_resume() and apm_default_suspend().
Added prototypes.
1995-11-18 04:37:23 +00:00
phk
7fd61cfafd Remove unused functions and variables, make things static, and other cleanups. 1995-10-28 15:39:31 +00:00
bde
81e1e32f6c 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
rgrimes
c86f0c7a71 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
phk
07489c563c 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
phk
353b6fc6d3 Don't push/pop the return-val register. (DUH!) 1994-12-16 07:31:47 +00:00
phk
1cf71a1a59 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
phk
d0387a375e 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
bde
847c2f9738 Fix type mismatches exposed by a recently added prototype. 1994-11-15 14:09:18 +00:00
phk
0df9927a20 Calling sync will panic you more often than not. 1994-11-07 04:23:58 +00:00
phk
b71a5d56f5 Got rid of "APM" macro. Now only NAPM is needed to activate the APM stuff. 1994-10-10 01:14:03 +00:00
phk
ebec1c5416 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
phk
3788fddb13 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
phk
8fedfb1241 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
dg
5eee9727f8 Added $Id$ 1994-10-01 05:13:37 +00:00
dg
3e90500374 Minor improvement to probe routine.
Submitted by:	HOSOKAWA Tatsumi
1994-10-01 03:29:28 +00:00
dg
b329c83425 Laptop Advanced Power Management support by HOSOKAWA Tatsumi.
Submitted by:	HOSOKAWA Tatsumi
1994-10-01 02:56:21 +00:00