summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoradam <adam@FreeBSD.org>1994-06-16 03:53:29 +0000
committeradam <adam@FreeBSD.org>1994-06-16 03:53:29 +0000
commit91cdb9393a35b5ba6d33a5381e8c22a25a7f77a5 (patch)
treec2b96e4a73cd4276ea7a9122d2a954080a257d23 /sys
parent69a52a0f02a4b2e70811af2c87892c8f961d2db0 (diff)
downloadFreeBSD-src-91cdb9393a35b5ba6d33a5381e8c22a25a7f77a5.zip
FreeBSD-src-91cdb9393a35b5ba6d33a5381e8c22a25a7f77a5.tar.gz
Changed delay mechanism to rely more on I/O spinning. If spinning on the
like this is bad news, it will have to be revised. Shortened some verbose messages for when the kernel is loaded below 640k. Updated version number.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/boot/Makefile4
-rw-r--r--sys/i386/boot/biosboot/Makefile4
-rw-r--r--sys/i386/boot/biosboot/boot.c9
-rw-r--r--sys/i386/boot/biosboot/io.c14
-rw-r--r--sys/i386/boot/boot.c9
-rw-r--r--sys/i386/boot/io.c14
6 files changed, 36 insertions, 18 deletions
diff --git a/sys/i386/boot/Makefile b/sys/i386/boot/Makefile
index d01d81c..774bce6 100644
--- a/sys/i386/boot/Makefile
+++ b/sys/i386/boot/Makefile
@@ -20,7 +20,7 @@
# the rights to redistribute these changes.
#
# from: Mach, Revision 2.2 92/04/04 11:33:46 rpd
-# $Id: Makefile,v 1.7 1994/06/02 16:50:56 jkh Exp $
+# $Id: Makefile,v 1.8 1994/06/15 18:15:16 adam Exp $
#
wd0:
@@ -33,7 +33,7 @@ NOPROG= noprog
NOMAN= noman
# tunable loopcount parameter, waiting for keypress
-BOOTWAIT=240000
+BOOTWAIT=2400
CFLAGS = -O2 -DDO_BAD144 -DBOOTWAIT=${BOOTWAIT} -I${.CURDIR}
LIBS= -lc
diff --git a/sys/i386/boot/biosboot/Makefile b/sys/i386/boot/biosboot/Makefile
index d01d81c..774bce6 100644
--- a/sys/i386/boot/biosboot/Makefile
+++ b/sys/i386/boot/biosboot/Makefile
@@ -20,7 +20,7 @@
# the rights to redistribute these changes.
#
# from: Mach, Revision 2.2 92/04/04 11:33:46 rpd
-# $Id: Makefile,v 1.7 1994/06/02 16:50:56 jkh Exp $
+# $Id: Makefile,v 1.8 1994/06/15 18:15:16 adam Exp $
#
wd0:
@@ -33,7 +33,7 @@ NOPROG= noprog
NOMAN= noman
# tunable loopcount parameter, waiting for keypress
-BOOTWAIT=240000
+BOOTWAIT=2400
CFLAGS = -O2 -DDO_BAD144 -DBOOTWAIT=${BOOTWAIT} -I${.CURDIR}
LIBS= -lc
diff --git a/sys/i386/boot/biosboot/boot.c b/sys/i386/boot/biosboot/boot.c
index 9864b31..e186bdc 100644
--- a/sys/i386/boot/biosboot/boot.c
+++ b/sys/i386/boot/biosboot/boot.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, [92/04/03 16:51:14 rvb]
- * $Id: boot.c,v 1.12 1994/05/30 05:23:53 ache Exp $
+ * $Id: boot.c,v 1.13 1994/06/14 07:31:42 rgrimes Exp $
*/
@@ -75,7 +75,7 @@ int drive;
ouraddr,
argv[7] = memsize(0),
argv[8] = memsize(1),
- "$Revision: 1.13 $");
+ "$Revision: 1.14 $");
printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n");
gateA20();
loadstart:
@@ -137,13 +137,12 @@ loadprog(howto)
{
if((addr + head.a_text + head.a_data) > ouraddr)
{
- printf("kernel will not fit below loader\n");
+ printf("kernel overlaps loader\n");
return;
}
if((addr + head.a_text + head.a_data + head.a_bss) > 0xa0000)
{
- printf("kernel won't fit in 640K with bss\n");
- printf("only hope is to link it for > 1MB\n");
+ printf("bss exceeds 640k limit\n");
return;
}
}
diff --git a/sys/i386/boot/biosboot/io.c b/sys/i386/boot/biosboot/io.c
index 8586b72..ee441f0 100644
--- a/sys/i386/boot/biosboot/io.c
+++ b/sys/i386/boot/biosboot/io.c
@@ -1,3 +1,4 @@
+
/*
* Mach Operating System
* Copyright (c) 1992, 1991 Carnegie Mellon University
@@ -24,7 +25,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:35:57 rpd
- * $Id: io.c,v 1.4 1994/06/15 18:15:17 adam Exp $
+ * $Id: io.c,v 1.5 1994/06/15 19:09:14 jkh Exp $
*/
#include <i386/include/pio.h>
@@ -137,6 +138,15 @@ getchar()
return(c);
}
+#if BOOTWAIT
+spinwait(i)
+int i;
+{
+ while (--i >= 0)
+ (void)inb(0x84);
+}
+#endif
+
gets(buf)
char *buf;
{
@@ -144,7 +154,7 @@ char *buf;
char *ptr=buf;
#if BOOTWAIT
- for (i = BOOTWAIT; i>0; i--)
+ for (i = BOOTWAIT; i>0; spinwait(10000),i--)
#endif
if (ischar())
for (;;)
diff --git a/sys/i386/boot/boot.c b/sys/i386/boot/boot.c
index 9864b31..e186bdc 100644
--- a/sys/i386/boot/boot.c
+++ b/sys/i386/boot/boot.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, [92/04/03 16:51:14 rvb]
- * $Id: boot.c,v 1.12 1994/05/30 05:23:53 ache Exp $
+ * $Id: boot.c,v 1.13 1994/06/14 07:31:42 rgrimes Exp $
*/
@@ -75,7 +75,7 @@ int drive;
ouraddr,
argv[7] = memsize(0),
argv[8] = memsize(1),
- "$Revision: 1.13 $");
+ "$Revision: 1.14 $");
printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n");
gateA20();
loadstart:
@@ -137,13 +137,12 @@ loadprog(howto)
{
if((addr + head.a_text + head.a_data) > ouraddr)
{
- printf("kernel will not fit below loader\n");
+ printf("kernel overlaps loader\n");
return;
}
if((addr + head.a_text + head.a_data + head.a_bss) > 0xa0000)
{
- printf("kernel won't fit in 640K with bss\n");
- printf("only hope is to link it for > 1MB\n");
+ printf("bss exceeds 640k limit\n");
return;
}
}
diff --git a/sys/i386/boot/io.c b/sys/i386/boot/io.c
index 8586b72..ee441f0 100644
--- a/sys/i386/boot/io.c
+++ b/sys/i386/boot/io.c
@@ -1,3 +1,4 @@
+
/*
* Mach Operating System
* Copyright (c) 1992, 1991 Carnegie Mellon University
@@ -24,7 +25,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:35:57 rpd
- * $Id: io.c,v 1.4 1994/06/15 18:15:17 adam Exp $
+ * $Id: io.c,v 1.5 1994/06/15 19:09:14 jkh Exp $
*/
#include <i386/include/pio.h>
@@ -137,6 +138,15 @@ getchar()
return(c);
}
+#if BOOTWAIT
+spinwait(i)
+int i;
+{
+ while (--i >= 0)
+ (void)inb(0x84);
+}
+#endif
+
gets(buf)
char *buf;
{
@@ -144,7 +154,7 @@ char *buf;
char *ptr=buf;
#if BOOTWAIT
- for (i = BOOTWAIT; i>0; i--)
+ for (i = BOOTWAIT; i>0; spinwait(10000),i--)
#endif
if (ischar())
for (;;)
OpenPOWER on IntegriCloud