Dont just mask the Megabyte, we need all the bits below too,

and ELIMITNATE THE 28K BOGOUSITY.
This commit is contained in:
Rodney W. Grimes 1993-10-15 12:33:03 +00:00
parent 836e51b4a3
commit 6de3bf82d0
2 changed files with 26 additions and 16 deletions

View File

@ -25,12 +25,21 @@
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*
* $Id$
* $Id: boot.c,v 1.6 1993/10/11 02:43:42 rgrimes Exp $
*/
/*
* HISTORY
* $Log: boot.c,v $
* Revision 1.6 1993/10/11 02:43:42 rgrimes
* Fixed the options hd(1,... to be more accurate (removed word options it
* now reads:
*
* printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n");
*
* I know the person wanted more explination, but there is little room in
* the boot blocks for verbose text!
*
* Revision 1.5 1993/10/09 08:31:39 chmr
* Changed the "Insert filesystem floppy" prompt to give the user a choice in
* which drive he wants the root file system (A or B).
@ -149,7 +158,7 @@ int drive;
ouraddr,
argv[7] = memsize(0),
argv[8] = memsize(1),
"$Revision: 1.5 $");
"$Revision: 1.6 $");
printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n");
gateA20();
loadstart:
@ -199,7 +208,7 @@ loadprog(howto)
poff = 32;*/
startaddr = (int)head.a_entry;
addr = (startaddr & 0x00f00000); /* some MEG boundary */
addr = (startaddr & 0x00ffffff); /* some MEG boundary */
addr0 = addr;
printf("Booting %s(%d,%c)%s @ 0x%x\n"
, devs[maj]
@ -214,11 +223,7 @@ loadprog(howto)
printf("kernel will not fit below loader\n");
return;
}
/*
* The +28672 is for memory allocated by locore.s that must
* fit in the bss! (XXX - cgd)
*/
if((addr + head.a_text + head.a_data + head.a_bss + 28672) > 0xa0000)
if((addr + head.a_text + head.a_data + head.a_bss) > 0xa0000)
{
printf("kernel too big, won't fit in 640K with bss\n");
printf("Only hope is to link the kernel for > 1MB\n");

View File

@ -25,12 +25,21 @@
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*
* $Id$
* $Id: boot.c,v 1.6 1993/10/11 02:43:42 rgrimes Exp $
*/
/*
* HISTORY
* $Log: boot.c,v $
* Revision 1.6 1993/10/11 02:43:42 rgrimes
* Fixed the options hd(1,... to be more accurate (removed word options it
* now reads:
*
* printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n");
*
* I know the person wanted more explination, but there is little room in
* the boot blocks for verbose text!
*
* Revision 1.5 1993/10/09 08:31:39 chmr
* Changed the "Insert filesystem floppy" prompt to give the user a choice in
* which drive he wants the root file system (A or B).
@ -149,7 +158,7 @@ int drive;
ouraddr,
argv[7] = memsize(0),
argv[8] = memsize(1),
"$Revision: 1.5 $");
"$Revision: 1.6 $");
printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n");
gateA20();
loadstart:
@ -199,7 +208,7 @@ loadprog(howto)
poff = 32;*/
startaddr = (int)head.a_entry;
addr = (startaddr & 0x00f00000); /* some MEG boundary */
addr = (startaddr & 0x00ffffff); /* some MEG boundary */
addr0 = addr;
printf("Booting %s(%d,%c)%s @ 0x%x\n"
, devs[maj]
@ -214,11 +223,7 @@ loadprog(howto)
printf("kernel will not fit below loader\n");
return;
}
/*
* The +28672 is for memory allocated by locore.s that must
* fit in the bss! (XXX - cgd)
*/
if((addr + head.a_text + head.a_data + head.a_bss + 28672) > 0xa0000)
if((addr + head.a_text + head.a_data + head.a_bss) > 0xa0000)
{
printf("kernel too big, won't fit in 640K with bss\n");
printf("Only hope is to link the kernel for > 1MB\n");