From: weingart Date: Mon, 7 Apr 1997 01:26:00 +0000 (+0000) Subject: Reboot stuff. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=028d555029d3794f27f1bba841bd6f3a26351981;p=openbsd Reboot stuff. --- diff --git a/sys/arch/i386/stand/boot/cmd.c b/sys/arch/i386/stand/boot/cmd.c index d203ba59ce9..5eeaf3ee0f8 100644 --- a/sys/arch/i386/stand/boot/cmd.c +++ b/sys/arch/i386/stand/boot/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.3 1997/04/01 04:50:33 mickey Exp $ */ +/* $OpenBSD: cmd.c,v 1.4 1997/04/07 01:26:00 weingart Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -345,6 +345,7 @@ execmd(cmd) break; case CMD_REBOOT: + printf("Rebooting...\n"); cmd->rc = -1; break; diff --git a/sys/arch/i386/stand/boot/srt0.S b/sys/arch/i386/stand/boot/srt0.S index 1ffdc191a87..7f79ba00950 100644 --- a/sys/arch/i386/stand/boot/srt0.S +++ b/sys/arch/i386/stand/boot/srt0.S @@ -1,4 +1,4 @@ -/* $OpenBSD: srt0.S,v 1.4 1997/04/05 18:56:19 mickey Exp $ */ +/* $OpenBSD: srt0.S,v 1.5 1997/04/07 01:26:00 weingart Exp $ */ /* $NetBSD: srt0.c,v 1.3 1994/10/27 04:21:59 cgd Exp $ */ /*- @@ -39,6 +39,7 @@ * @(#)srt0.c 5.3 (Berkeley) 4/28/91 */ +#include #include #define _LOCORE #include @@ -50,6 +51,7 @@ .globl __rtt .globl _Gdtr .globl _Idtr_prot + .globl _Idtr_reset .globl _codeseg .text @@ -99,11 +101,32 @@ __rtt: #ifdef DEBUG movl $0xb8000, %ebx movl $0x4f514f51, (%ebx) - hlt #endif - movl $-7, %eax movw $0x1234, %ax movw %ax, 0x472 # warm boot + + movl $0xfe, %eax + movl $0x64, %edx + outb %al, %dx + movl $1, %eax + pushl %eax + call _C_LABEL(usleep) + popl %eax + + movl $0xfe, %eax + movl $0x64, %edx + outb %al, %dx + movl $1, %eax + pushl %eax + call _C_LABEL(usleep) + popl %eax + +#ifdef DEBUG + movl $0xb8000, %ebx + movl $0x07310731, (%ebx) +#endif + lidt _Idtr_reset + int $0x8 movl $0, %esp # segment violation ret diff --git a/sys/stand/boot/cmd.c b/sys/stand/boot/cmd.c index d203ba59ce9..5eeaf3ee0f8 100644 --- a/sys/stand/boot/cmd.c +++ b/sys/stand/boot/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.3 1997/04/01 04:50:33 mickey Exp $ */ +/* $OpenBSD: cmd.c,v 1.4 1997/04/07 01:26:00 weingart Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -345,6 +345,7 @@ execmd(cmd) break; case CMD_REBOOT: + printf("Rebooting...\n"); cmd->rc = -1; break;