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.
This commit is contained in:
adam 1994-06-16 03:53:29 +00:00
parent 69a52a0f02
commit 91cdb9393a
6 changed files with 36 additions and 18 deletions

@ -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

@ -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

@ -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;
}
}

@ -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 (;;)

@ -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;
}
}

@ -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 (;;)