From db7e362115d6a79e284303922e2e8d696f2a976c Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Wed, 18 Dec 1996 15:03:10 +0000 Subject: [PATCH] Moved the printing of the BIOS geometries from cpu_startup() into configure() where it always belonged. It was originally slightly misplaced after configure(). Rev.138 left it completely misplaced before the DEVFS, DRIVERS and CONFIGURE sysinits by not moving it together with configure(). Restored the printing of bootinfo.bi_n_bios_used now that it can be nonzero. --- sys/amd64/amd64/autoconf.c | 37 +++++++++++++++++++++++++++++++++++-- sys/amd64/amd64/machdep.c | 33 +-------------------------------- sys/i386/i386/autoconf.c | 37 +++++++++++++++++++++++++++++++++++-- sys/i386/i386/machdep.c | 33 +-------------------------------- 4 files changed, 72 insertions(+), 68 deletions(-) diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c index 3905ec3b7d6..ff09b33429e 100644 --- a/sys/amd64/amd64/autoconf.c +++ b/sys/amd64/amd64/autoconf.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91 - * $Id: autoconf.c,v 1.55 1996/06/08 09:37:35 bde Exp $ + * $Id: autoconf.c,v 1.56 1996/07/30 20:30:49 bde Exp $ */ /* @@ -55,6 +55,7 @@ #include #include +#include #include #include #include /* For interrupts */ @@ -167,6 +168,7 @@ static void configure(dummy) void *dummy; { + int i; configure_start(); @@ -198,8 +200,39 @@ configure(dummy) cninit_finish(); - if (bootverbose) + if (bootverbose) { + /* + * Print out the BIOS's idea of the disk geometries. + */ + printf("BIOS Geometries:\n"); + for (i = 0; i < N_BIOS_GEOM; i++) { + unsigned long bios_geom; + int max_cylinder, max_head, max_sector; + + bios_geom = bootinfo.bi_bios_geom[i]; + + /* + * XXX the bootstrap punts a 1200K floppy geometry + * when the get-disk-geometry interrupt fails. Skip + * drives that have this geometry. + */ + if (bios_geom == 0x4f010f) + continue; + + printf(" %x:%08lx ", i, bios_geom); + max_cylinder = bios_geom >> 16; + max_head = (bios_geom >> 8) & 0xff; + max_sector = bios_geom & 0xff; + printf( + "0..%d=%d cylinders, 0..%d=%d heads, 1..%d=%d sectors\n", + max_cylinder, max_cylinder + 1, + max_head, max_head + 1, + max_sector, max_sector); + } + printf(" %d accounted for\n", bootinfo.bi_n_bios_used); + printf("Device configuration finished.\n"); + } #ifdef CD9660 if ((boothowto & RB_CDROM) && !mountroot) { diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index b65c5bb3e8c..042a0b8515d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.220 1996/12/14 22:18:38 jkh Exp $ + * $Id: machdep.c,v 1.221 1996/12/17 04:19:41 davidg Exp $ */ #include "npx.h" @@ -389,37 +389,6 @@ again: */ bufinit(); vm_pager_bufferinit(); - - /* - * In verbose mode, print out the BIOS's idea of the disk geometries. - */ - if (bootverbose) { - printf("BIOS Geometries:\n"); - for (i = 0; i < N_BIOS_GEOM; i++) { - unsigned long bios_geom; - int max_cylinder, max_head, max_sector; - - bios_geom = bootinfo.bi_bios_geom[i]; - - /* - * XXX the bootstrap punts a 1200K floppy geometry - * when the get-disk-geometry interrupt fails. Skip - * drives that have this geometry. - */ - if (bios_geom == 0x4f010f) - continue; - - printf(" %x:%08lx ", i, bios_geom); - max_cylinder = bios_geom >> 16; - max_head = (bios_geom >> 8) & 0xff; - max_sector = bios_geom & 0xff; - printf( - "0..%d=%d cylinders, 0..%d=%d heads, 1..%d=%d sectors\n", - max_cylinder, max_cylinder + 1, - max_head, max_head + 1, - max_sector, max_sector); - } - } } int diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c index 3905ec3b7d6..ff09b33429e 100644 --- a/sys/i386/i386/autoconf.c +++ b/sys/i386/i386/autoconf.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91 - * $Id: autoconf.c,v 1.55 1996/06/08 09:37:35 bde Exp $ + * $Id: autoconf.c,v 1.56 1996/07/30 20:30:49 bde Exp $ */ /* @@ -55,6 +55,7 @@ #include #include +#include #include #include #include /* For interrupts */ @@ -167,6 +168,7 @@ static void configure(dummy) void *dummy; { + int i; configure_start(); @@ -198,8 +200,39 @@ configure(dummy) cninit_finish(); - if (bootverbose) + if (bootverbose) { + /* + * Print out the BIOS's idea of the disk geometries. + */ + printf("BIOS Geometries:\n"); + for (i = 0; i < N_BIOS_GEOM; i++) { + unsigned long bios_geom; + int max_cylinder, max_head, max_sector; + + bios_geom = bootinfo.bi_bios_geom[i]; + + /* + * XXX the bootstrap punts a 1200K floppy geometry + * when the get-disk-geometry interrupt fails. Skip + * drives that have this geometry. + */ + if (bios_geom == 0x4f010f) + continue; + + printf(" %x:%08lx ", i, bios_geom); + max_cylinder = bios_geom >> 16; + max_head = (bios_geom >> 8) & 0xff; + max_sector = bios_geom & 0xff; + printf( + "0..%d=%d cylinders, 0..%d=%d heads, 1..%d=%d sectors\n", + max_cylinder, max_cylinder + 1, + max_head, max_head + 1, + max_sector, max_sector); + } + printf(" %d accounted for\n", bootinfo.bi_n_bios_used); + printf("Device configuration finished.\n"); + } #ifdef CD9660 if ((boothowto & RB_CDROM) && !mountroot) { diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index b65c5bb3e8c..042a0b8515d 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.220 1996/12/14 22:18:38 jkh Exp $ + * $Id: machdep.c,v 1.221 1996/12/17 04:19:41 davidg Exp $ */ #include "npx.h" @@ -389,37 +389,6 @@ again: */ bufinit(); vm_pager_bufferinit(); - - /* - * In verbose mode, print out the BIOS's idea of the disk geometries. - */ - if (bootverbose) { - printf("BIOS Geometries:\n"); - for (i = 0; i < N_BIOS_GEOM; i++) { - unsigned long bios_geom; - int max_cylinder, max_head, max_sector; - - bios_geom = bootinfo.bi_bios_geom[i]; - - /* - * XXX the bootstrap punts a 1200K floppy geometry - * when the get-disk-geometry interrupt fails. Skip - * drives that have this geometry. - */ - if (bios_geom == 0x4f010f) - continue; - - printf(" %x:%08lx ", i, bios_geom); - max_cylinder = bios_geom >> 16; - max_head = (bios_geom >> 8) & 0xff; - max_sector = bios_geom & 0xff; - printf( - "0..%d=%d cylinders, 0..%d=%d heads, 1..%d=%d sectors\n", - max_cylinder, max_cylinder + 1, - max_head, max_head + 1, - max_sector, max_sector); - } - } } int