From 9c23e01194aaa85e29b89c3b91204d798931cce6 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 17 Apr 1995 16:49:50 +0000 Subject: [PATCH] Print the BIOS geometries in a human-readable format. --- sys/amd64/amd64/machdep.c | 15 +++++++++++---- sys/i386/i386/machdep.c | 15 +++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index c5e6948f68fa..3e4d7605f068 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.117 1995/04/12 20:47:28 wollman Exp $ + * $Id: machdep.c,v 1.119 1995/04/14 02:06:00 wpaul Exp $ */ #include "npx.h" @@ -391,9 +391,16 @@ cpu_startup() */ configure(); if (bootverbose) { - printf("BIOS Geometries:"); - for (i=0; i < N_BIOS_GEOM; i++) - printf(" %x:%x\n", i, bootinfo.bi_bios_geom[i]); + printf("BIOS Geometries:\n"); + for (i=0; i < N_BIOS_GEOM; i++) { + int j = bootinfo.bi_bios_geom[i]; + if (j == 0x4f010f) + continue; + printf(" %x:%08x", i, j); + printf(" %d cyl, %d heads, %d sects\n", + j >> 16, (j >> 8) & 0xff, j & 0xff); + + } printf(" %d accounted for\n", bootinfo.bi_n_bios_used); } } diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index c5e6948f68fa..3e4d7605f068 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.117 1995/04/12 20:47:28 wollman Exp $ + * $Id: machdep.c,v 1.119 1995/04/14 02:06:00 wpaul Exp $ */ #include "npx.h" @@ -391,9 +391,16 @@ cpu_startup() */ configure(); if (bootverbose) { - printf("BIOS Geometries:"); - for (i=0; i < N_BIOS_GEOM; i++) - printf(" %x:%x\n", i, bootinfo.bi_bios_geom[i]); + printf("BIOS Geometries:\n"); + for (i=0; i < N_BIOS_GEOM; i++) { + int j = bootinfo.bi_bios_geom[i]; + if (j == 0x4f010f) + continue; + printf(" %x:%08x", i, j); + printf(" %d cyl, %d heads, %d sects\n", + j >> 16, (j >> 8) & 0xff, j & 0xff); + + } printf(" %d accounted for\n", bootinfo.bi_n_bios_used); } }