Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386 make the code which decodes the MAKEBOOTDEV()-...



details:   https://anonhg.NetBSD.org/src/rev/368d78ff25ec
branches:  trunk
changeset: 477633:368d78ff25ec
user:      drochner <drochner%NetBSD.org@localhost>
date:      Mon Oct 25 17:26:05 1999 +0000

description:
make the code which decodes the MAKEBOOTDEV()-style boot device
(as passed by the pre-1.3 bootloader) optional

diffstat:

 sys/arch/i386/conf/files.i386 |   5 ++++-
 sys/arch/i386/i386/autoconf.c |  14 ++++++++++++--
 sys/arch/i386/i386/locore.s   |  12 ++++++++----
 3 files changed, 24 insertions(+), 7 deletions(-)

diffs (131 lines):

diff -r 99fa7a377873 -r 368d78ff25ec sys/arch/i386/conf/files.i386
--- a/sys/arch/i386/conf/files.i386     Mon Oct 25 17:13:45 1999 +0000
+++ b/sys/arch/i386/conf/files.i386     Mon Oct 25 17:26:05 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.i386,v 1.139 1999/10/15 06:10:38 haya Exp $
+#      $NetBSD: files.i386,v 1.140 1999/10/25 17:26:05 drochner Exp $
 #
 # new style config file for i386 architecture
 #
@@ -34,6 +34,9 @@
 # X server support in console drivers
 defopt opt_xserver.h XSERVER XSERVER_DDB
 
+# understand boot device passed by pre-1.3 bootblocks
+defopt COMPAT_OLDBOOT
+
 file   arch/i386/i386/autoconf.c
 file   arch/i386/i386/conf.c
 file   arch/i386/i386/db_dbgreg.s      ddb
diff -r 99fa7a377873 -r 368d78ff25ec sys/arch/i386/i386/autoconf.c
--- a/sys/arch/i386/i386/autoconf.c     Mon Oct 25 17:13:45 1999 +0000
+++ b/sys/arch/i386/i386/autoconf.c     Mon Oct 25 17:26:05 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.42 1999/10/18 19:37:28 fvdl Exp $       */
+/*     $NetBSD: autoconf.c,v 1.43 1999/10/25 17:26:07 drochner Exp $   */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -46,13 +46,18 @@
  * devices are determined (from possibilities mentioned in ioconf.c),
  * and the drivers are initialized.
  */
+
+#include "opt_compat_oldboot.h"
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/buf.h>
 #include <sys/dkstat.h>
 #include <sys/disklabel.h>
 #include <sys/conf.h>
+#ifdef COMPAT_OLDBOOT
 #include <sys/reboot.h>
+#endif
 #include <sys/device.h>
 #include <sys/malloc.h>
 #include <sys/vnode.h>
@@ -232,8 +237,9 @@
        }
 }
 
-
+#ifdef COMPAT_OLDBOOT
 u_long bootdev = 0;            /* should be dev_t, but not until 32 bits */
+#endif
 struct device *booted_device;
 
 /*
@@ -325,8 +331,10 @@
 {
        struct btinfo_bootdisk *bid;
        struct device *dv;
+#ifdef COMPAT_OLDBOOT
        int i, majdev, unit, part;
        char buf[32];
+#endif
 
        /*
         * Default to "not found."
@@ -409,6 +417,7 @@
                        return;
        }
 
+#ifdef COMPAT_OLDBOOT
 #if 0
        printf("howto %x bootdev %x ", boothowto, bootdev);
 #endif
@@ -435,6 +444,7 @@
                        return;
                }
        }
+#endif
 }
 
 #include "pci.h"
diff -r 99fa7a377873 -r 368d78ff25ec sys/arch/i386/i386/locore.s
--- a/sys/arch/i386/i386/locore.s       Mon Oct 25 17:13:45 1999 +0000
+++ b/sys/arch/i386/i386/locore.s       Mon Oct 25 17:26:05 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.213 1999/09/17 19:59:43 thorpej Exp $     */
+/*     $NetBSD: locore.s,v 1.214 1999/10/25 17:26:06 drochner Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -83,6 +83,7 @@
 #include "opt_compat_linux.h"
 #include "opt_compat_ibcs2.h"
 #include "opt_compat_svr4.h"
+#include "opt_compat_oldboot.h"
 
 #include "npx.h"
 #include "assym.h"
@@ -216,7 +217,9 @@
        .globl  _C_LABEL(cpuid_level),_C_LABEL(cpu_feature)
        .globl  _C_LABEL(esym),_C_LABEL(boothowto)
        .globl  _C_LABEL(bootinfo),_C_LABEL(atdevbase)
+#ifdef COMPAT_OLDBOOT
        .globl  _C_LABEL(bootdev)
+#endif
        .globl  _C_LABEL(proc0paddr),_C_LABEL(curpcb),_C_LABEL(PTDpaddr)
        .globl  _C_LABEL(biosbasemem),_C_LABEL(biosextmem)
        .globl  _C_LABEL(gdt)
@@ -262,14 +265,15 @@
 start: movw    $0x1234,0x472                   # warm boot
 
        /*
-        * Load parameters from stack (howto, bootdev, unit, bootinfo, esym).
-        * note: (%esp) is return address of boot
-        * (If we want to hold onto /boot, it's physical %esp up to _end.)
+        * Load parameters from stack
+        * (howto, [bootdev], bootinfo, esym, basemem, extmem).
         */
        movl    4(%esp),%eax
        movl    %eax,RELOC(boothowto)
+#ifdef COMPAT_OLDBOOT
        movl    8(%esp),%eax
        movl    %eax,RELOC(bootdev)
+#endif
        movl    12(%esp),%eax
 
        testl   %eax, %eax



Home | Main Index | Thread Index | Old Index