diff options
author | dg <dg@FreeBSD.org> | 1994-10-01 02:56:21 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-10-01 02:56:21 +0000 |
commit | b329c8342570e9501a8be46799c51d49939ba5b7 (patch) | |
tree | cae0fc2309e6ae1169ee8bdcf42212d2f39fb3ea /sys/dev | |
parent | 071d84b9b9d00df243a9bce6702804627afc1037 (diff) | |
download | FreeBSD-src-b329c8342570e9501a8be46799c51d49939ba5b7.zip FreeBSD-src-b329c8342570e9501a8be46799c51d49939ba5b7.tar.gz |
Laptop Advanced Power Management support by HOSOKAWA Tatsumi.
Submitted by: HOSOKAWA Tatsumi
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/kbd/kbdtables.h | 4 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.c | 28 |
2 files changed, 29 insertions, 3 deletions
diff --git a/sys/dev/kbd/kbdtables.h b/sys/dev/kbd/kbdtables.h index 7e8318f..a48b6a6 100644 --- a/sys/dev/kbd/kbdtables.h +++ b/sys/dev/kbd/kbdtables.h @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: kbdtables.h,v 1.14 1994/09/29 08:29:17 sos Exp $ */ #define SET8 0x80 /* eight bit for emacs SET8-key */ @@ -799,7 +799,7 @@ keymap_t key_map = { 0x69, /* US iso8859 keymap */ /* sc=36 */ RSH, RSH, RSH, RSH, RSH, RSH, RSH, RSH, 0xFF, 0x00, /* sc=37 */ '*', '*', 0x0A, 0x0A, '*', '*', 0x0A, 0x0A, 0x33, 0x00, /* sc=38 */ LALT, LALT, LALT, LALT, LALT, LALT, LALT, LALT, 0xFF, 0x00, -/* sc=39 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 0x00, 0x00, +/* sc=39 */ ' ', ' ', ' ', ' ', ' ', ' ', SUSP, ' ', 0x02, 0x00, /* sc=3a */ CLK, CLK, CLK, CLK, CLK, CLK, CLK, CLK, 0xFF, 0x00, /* sc=3b */ F( 1), F(13), F(25), F(37), S( 1), S(11), S( 1), S(11), 0xFF, 0x00, /* sc=3c */ F( 2), F(14), F(26), F(38), S( 2), S(12), S( 2), S(12), 0xFF, 0x00, diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 0479f76..230c945 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: syscons.c,v 1.59 1994/09/29 08:29:21 sos Exp $ + * $Id: syscons.c,v 1.60 1994/09/29 15:49:09 ache Exp $ */ #include "sc.h" @@ -64,6 +64,9 @@ #include <i386/isa/timerreg.h> #include <i386/isa/kbdtables.h> #include <i386/i386/cons.h> +#ifdef APM +#include <machine/apm_bios.h> +#endif #if !defined(NCONS) #define NCONS 12 @@ -288,6 +291,16 @@ struct isa_driver scdriver = { pcprobe, pcattach, "sc", }; +#ifdef APM +static int +pc_resume(void) +{ + /* when the system wakes up, modifier keys must be re-initialized */ + shfts = ctls = alts = agrs = metas = 0; + return 0; +} +#endif /* APM */ + int pcprobe(struct isa_device *dev) { @@ -391,6 +404,9 @@ pcattach(struct isa_device *dev) #endif cursor_pos(1); update_leds(console[0].status); +#ifdef APM + apm_resume_hook_init(pc_resume, "Syscons console", APM_MID_ORDER); +#endif return 0; } @@ -2081,7 +2097,11 @@ scinit(void) scp->ysize = ROW; scp->bell_pitch = BELL_PITCH; scp->bell_duration = BELL_DURATION; +#ifndef LAPTOP scp->status = NLKED; +#else + scp->status = 0; +#endif scp->pid = 0; scp->proc = NULL; scp->smode.mode = VT_AUTO; @@ -2429,6 +2449,12 @@ next_code: case RBT: shutdown_nice(); break; + case SUSP: +#ifdef APM + apm_suspend_resume(); +#endif /* APM */ + break; + case DBG: #ifdef DDB /* try to switch to console 0 */ if (cur_console->smode.mode == VT_AUTO && |