diff options
author | pst <pst@FreeBSD.org> | 1996-10-23 07:29:44 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1996-10-23 07:29:44 +0000 |
commit | 3472d01c715f7cd408aa362311ee17205616c86c (patch) | |
tree | 217a64a58e3fa8a6b4c9561833c12cab26ffa46c /sys | |
parent | da2957207b1d3dec86dcf8334bc11b75a9113b84 (diff) | |
download | FreeBSD-src-3472d01c715f7cd408aa362311ee17205616c86c.zip FreeBSD-src-3472d01c715f7cd408aa362311ee17205616c86c.tar.gz |
Remove SC_KBD_PROBE_WORKS option and replace it with a simple run-time flag
bit (0x0008) in the sc driver configuration line. This way it's easy to
boink a generic kernel.
Also, document and place in an opt_ file the #define's for overriding which
serial port is the system console.
Approved by: sos
Diffstat (limited to 'sys')
-rw-r--r-- | sys/conf/NOTES | 4 | ||||
-rw-r--r-- | sys/conf/options.i386 | 5 | ||||
-rw-r--r-- | sys/dev/rc/rc.c | 2 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.c | 15 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.h | 3 | ||||
-rw-r--r-- | sys/i386/conf/LINT | 4 | ||||
-rw-r--r-- | sys/i386/conf/NOTES | 4 | ||||
-rw-r--r-- | sys/i386/conf/options.i386 | 5 | ||||
-rw-r--r-- | sys/i386/isa/rc.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/syscons.c | 15 | ||||
-rw-r--r-- | sys/i386/isa/syscons.h | 3 | ||||
-rw-r--r-- | sys/isa/syscons.c | 15 | ||||
-rw-r--r-- | sys/isa/syscons.h | 3 |
13 files changed, 43 insertions, 37 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 76ce65e..7ff9880 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.284 1996/10/18 03:52:48 jkh Exp $ +# $Id: LINT,v 1.285 1996/10/20 18:35:14 phk Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -506,8 +506,6 @@ options PCVT_SCANSET=2 # IBM keyboards are non-std # The syscons console driver (sco color console compatible) - default. device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr -options SC_KBD_PROBE_WORKS # keyboard probe should determine - # if syscons is available options MAXCONS=16 # number of virtual consoles options SLOW_VGA # do byte-wide i/o's to TS and GDC regs options XT_KEYBOARD # extra initialization for XT keyboard diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index 7c09359..a0d683a 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -1,4 +1,4 @@ -# $Id: options.i386,v 1.23 1996/10/09 19:47:07 bde Exp $ +# $Id: options.i386,v 1.24 1996/10/17 19:31:47 bde Exp $ BOUNCEPAGES opt_bounce.h USER_LDT MATH_EMULATE opt_math_emulate.h @@ -15,6 +15,8 @@ AUTO_EOI_1 opt_auto_eoi.h AUTO_EOI_2 opt_auto_eoi.h BREAK_TO_DEBUGGER opt_comconsole.h COMCONSOLE opt_comconsole.h +CONADDR opt_comconsole.h +CONUNIT opt_comconsole.h COM_ESP opt_sio.h COM_MULTIPORT opt_sio.h DSI_SOFT_MODEM opt_sio.h @@ -41,7 +43,6 @@ I586_FAST_BCOPY opt_temporary.h I586_OPTIMIZED_BCOPY opt_temporary.h I586_OPTIMIZED_BZERO opt_temporary.h -SC_KBD_PROBE_WORKS opt_syscons.h SC_SPLASH_SCREEN opt_syscons.h MAXCONS opt_syscons.h SLOW_VGA opt_syscons.h diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index fd37df2..677ae14 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -30,7 +30,9 @@ * */ +#include "opt_comconsole.h" #include "rc.h" + #if NRC > 0 /*#define RCDEBUG*/ diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 38fe1fc..ad4e35a 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -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: syscons.c,v 1.179 1996/10/15 20:27:07 sos Exp $ + * $Id: syscons.c,v 1.180 1996/10/18 18:51:36 sos Exp $ */ #include "sc.h" @@ -324,9 +324,7 @@ scprobe(struct isa_device *dev) gotres: if (retries < 0) { printf("scprobe: keyboard won't accept RESET command\n"); -#ifdef SC_KBD_PROBE_WORKS - return (0); -#endif + goto fail; } else { i = 10; /* At most 10 retries. */ gotack: @@ -339,9 +337,7 @@ gotack: goto gotack; if (val != KB_RESET_DONE) { printf("scprobe: keyboard RESET failed (result = 0x%02x)\n", val); -#ifdef SC_KBD_PROBE_WORKS - return (0); -#endif + goto fail; } } #ifdef XT_KEYBOARD @@ -351,7 +347,12 @@ gotack: outb(KB_DATA, 1); kbd_wait(); #endif /* XT_KEYBOARD */ + + succeed: return (IO_KBDSIZE); + + fail: + return ((dev->id_flags & DETECT_KBD) ? 0 : IO_KBDSIZE); } #if NAPM > 0 diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h index 100200f..2a724f4 100644 --- a/sys/dev/syscons/syscons.h +++ b/sys/dev/syscons/syscons.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: syscons.h,v 1.21 1996/09/30 23:00:58 sos Exp $ + * $Id: syscons.h,v 1.22 1996/10/18 18:51:37 sos Exp $ */ #ifndef _I386_ISA_SYSCONS_H_ @@ -69,6 +69,7 @@ #define VISUAL_BELL 0x00001 #define BLINK_CURSOR 0x00002 #define CHAR_CURSOR 0x00004 +#define DETECT_KBD 0x00008 /* attribute flags */ #define NORMAL_ATTR 0x00 diff --git a/sys/i386/conf/LINT b/sys/i386/conf/LINT index 76ce65e..7ff9880 100644 --- a/sys/i386/conf/LINT +++ b/sys/i386/conf/LINT @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.284 1996/10/18 03:52:48 jkh Exp $ +# $Id: LINT,v 1.285 1996/10/20 18:35:14 phk Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -506,8 +506,6 @@ options PCVT_SCANSET=2 # IBM keyboards are non-std # The syscons console driver (sco color console compatible) - default. device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr -options SC_KBD_PROBE_WORKS # keyboard probe should determine - # if syscons is available options MAXCONS=16 # number of virtual consoles options SLOW_VGA # do byte-wide i/o's to TS and GDC regs options XT_KEYBOARD # extra initialization for XT keyboard diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index 76ce65e..7ff9880 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.284 1996/10/18 03:52:48 jkh Exp $ +# $Id: LINT,v 1.285 1996/10/20 18:35:14 phk Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -506,8 +506,6 @@ options PCVT_SCANSET=2 # IBM keyboards are non-std # The syscons console driver (sco color console compatible) - default. device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr -options SC_KBD_PROBE_WORKS # keyboard probe should determine - # if syscons is available options MAXCONS=16 # number of virtual consoles options SLOW_VGA # do byte-wide i/o's to TS and GDC regs options XT_KEYBOARD # extra initialization for XT keyboard diff --git a/sys/i386/conf/options.i386 b/sys/i386/conf/options.i386 index 7c09359..a0d683a 100644 --- a/sys/i386/conf/options.i386 +++ b/sys/i386/conf/options.i386 @@ -1,4 +1,4 @@ -# $Id: options.i386,v 1.23 1996/10/09 19:47:07 bde Exp $ +# $Id: options.i386,v 1.24 1996/10/17 19:31:47 bde Exp $ BOUNCEPAGES opt_bounce.h USER_LDT MATH_EMULATE opt_math_emulate.h @@ -15,6 +15,8 @@ AUTO_EOI_1 opt_auto_eoi.h AUTO_EOI_2 opt_auto_eoi.h BREAK_TO_DEBUGGER opt_comconsole.h COMCONSOLE opt_comconsole.h +CONADDR opt_comconsole.h +CONUNIT opt_comconsole.h COM_ESP opt_sio.h COM_MULTIPORT opt_sio.h DSI_SOFT_MODEM opt_sio.h @@ -41,7 +43,6 @@ I586_FAST_BCOPY opt_temporary.h I586_OPTIMIZED_BCOPY opt_temporary.h I586_OPTIMIZED_BZERO opt_temporary.h -SC_KBD_PROBE_WORKS opt_syscons.h SC_SPLASH_SCREEN opt_syscons.h MAXCONS opt_syscons.h SLOW_VGA opt_syscons.h diff --git a/sys/i386/isa/rc.c b/sys/i386/isa/rc.c index fd37df2..677ae14 100644 --- a/sys/i386/isa/rc.c +++ b/sys/i386/isa/rc.c @@ -30,7 +30,9 @@ * */ +#include "opt_comconsole.h" #include "rc.h" + #if NRC > 0 /*#define RCDEBUG*/ diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c index 38fe1fc..ad4e35a 100644 --- a/sys/i386/isa/syscons.c +++ b/sys/i386/isa/syscons.c @@ -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: syscons.c,v 1.179 1996/10/15 20:27:07 sos Exp $ + * $Id: syscons.c,v 1.180 1996/10/18 18:51:36 sos Exp $ */ #include "sc.h" @@ -324,9 +324,7 @@ scprobe(struct isa_device *dev) gotres: if (retries < 0) { printf("scprobe: keyboard won't accept RESET command\n"); -#ifdef SC_KBD_PROBE_WORKS - return (0); -#endif + goto fail; } else { i = 10; /* At most 10 retries. */ gotack: @@ -339,9 +337,7 @@ gotack: goto gotack; if (val != KB_RESET_DONE) { printf("scprobe: keyboard RESET failed (result = 0x%02x)\n", val); -#ifdef SC_KBD_PROBE_WORKS - return (0); -#endif + goto fail; } } #ifdef XT_KEYBOARD @@ -351,7 +347,12 @@ gotack: outb(KB_DATA, 1); kbd_wait(); #endif /* XT_KEYBOARD */ + + succeed: return (IO_KBDSIZE); + + fail: + return ((dev->id_flags & DETECT_KBD) ? 0 : IO_KBDSIZE); } #if NAPM > 0 diff --git a/sys/i386/isa/syscons.h b/sys/i386/isa/syscons.h index 100200f..2a724f4 100644 --- a/sys/i386/isa/syscons.h +++ b/sys/i386/isa/syscons.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: syscons.h,v 1.21 1996/09/30 23:00:58 sos Exp $ + * $Id: syscons.h,v 1.22 1996/10/18 18:51:37 sos Exp $ */ #ifndef _I386_ISA_SYSCONS_H_ @@ -69,6 +69,7 @@ #define VISUAL_BELL 0x00001 #define BLINK_CURSOR 0x00002 #define CHAR_CURSOR 0x00004 +#define DETECT_KBD 0x00008 /* attribute flags */ #define NORMAL_ATTR 0x00 diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c index 38fe1fc..ad4e35a 100644 --- a/sys/isa/syscons.c +++ b/sys/isa/syscons.c @@ -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: syscons.c,v 1.179 1996/10/15 20:27:07 sos Exp $ + * $Id: syscons.c,v 1.180 1996/10/18 18:51:36 sos Exp $ */ #include "sc.h" @@ -324,9 +324,7 @@ scprobe(struct isa_device *dev) gotres: if (retries < 0) { printf("scprobe: keyboard won't accept RESET command\n"); -#ifdef SC_KBD_PROBE_WORKS - return (0); -#endif + goto fail; } else { i = 10; /* At most 10 retries. */ gotack: @@ -339,9 +337,7 @@ gotack: goto gotack; if (val != KB_RESET_DONE) { printf("scprobe: keyboard RESET failed (result = 0x%02x)\n", val); -#ifdef SC_KBD_PROBE_WORKS - return (0); -#endif + goto fail; } } #ifdef XT_KEYBOARD @@ -351,7 +347,12 @@ gotack: outb(KB_DATA, 1); kbd_wait(); #endif /* XT_KEYBOARD */ + + succeed: return (IO_KBDSIZE); + + fail: + return ((dev->id_flags & DETECT_KBD) ? 0 : IO_KBDSIZE); } #if NAPM > 0 diff --git a/sys/isa/syscons.h b/sys/isa/syscons.h index 100200f..2a724f4 100644 --- a/sys/isa/syscons.h +++ b/sys/isa/syscons.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: syscons.h,v 1.21 1996/09/30 23:00:58 sos Exp $ + * $Id: syscons.h,v 1.22 1996/10/18 18:51:37 sos Exp $ */ #ifndef _I386_ISA_SYSCONS_H_ @@ -69,6 +69,7 @@ #define VISUAL_BELL 0x00001 #define BLINK_CURSOR 0x00002 #define CHAR_CURSOR 0x00004 +#define DETECT_KBD 0x00008 /* attribute flags */ #define NORMAL_ATTR 0x00 |