From 85adfe70ca55a0fbac3301ecb0980e6e291eddb6 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 22 Oct 1994 17:51:46 +0000 Subject: [PATCH] Autoconf is the one to realize that we are booted disk-less and start the ball rolling. locore is just moving some data from the boot-program. --- sys/amd64/amd64/autoconf.c | 19 +++++++++++++++---- sys/amd64/amd64/locore.S | 4 +++- sys/amd64/amd64/locore.s | 4 +++- sys/i386/i386/autoconf.c | 19 +++++++++++++++---- sys/i386/i386/locore.s | 4 +++- 5 files changed, 39 insertions(+), 11 deletions(-) diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c index 129d3f6035a..d1b52fd22ac 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.13 1994/08/29 21:47:11 ache Exp $ + * $Id: autoconf.c,v 1.14 1994/08/31 23:36:56 se Exp $ */ /* @@ -84,14 +84,25 @@ configure() pci_configure(); #endif -#if GENERICxxx && !defined(DISKLESS) +#if GENERICxxx if ((boothowto & RB_ASKNAME) == 0) setroot(); setconf(); #else -#ifndef DISKLESS +# ifdef NFS + { + extern int nfs_diskless_valid; + + extern int (*mountroot) __P((void)); + extern int nfs_mountroot(void); + if (nfs_diskless_valid) + mountroot = nfs_mountroot; + else + setroot(); + } +# else /* !NFS */ setroot(); -#endif +# endif /* NFS */ #endif /* * Configure swap area and related system diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index 0a8bc9b5252..6d539ba4887 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $Id: locore.s,v 1.36 1994/10/10 01:10:21 phk Exp $ + * $Id: locore.s,v 1.37 1994/10/20 00:07:47 phk Exp $ */ /* @@ -263,6 +263,8 @@ NON_GPROF_ENTRY(btext) cld rep movsb + lea _nfs_diskless_valid-KERNBASE,%edi + movl $1,(%edi) #endif /* diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s index 0a8bc9b5252..6d539ba4887 100644 --- a/sys/amd64/amd64/locore.s +++ b/sys/amd64/amd64/locore.s @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $Id: locore.s,v 1.36 1994/10/10 01:10:21 phk Exp $ + * $Id: locore.s,v 1.37 1994/10/20 00:07:47 phk Exp $ */ /* @@ -263,6 +263,8 @@ NON_GPROF_ENTRY(btext) cld rep movsb + lea _nfs_diskless_valid-KERNBASE,%edi + movl $1,(%edi) #endif /* diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c index 129d3f6035a..d1b52fd22ac 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.13 1994/08/29 21:47:11 ache Exp $ + * $Id: autoconf.c,v 1.14 1994/08/31 23:36:56 se Exp $ */ /* @@ -84,14 +84,25 @@ configure() pci_configure(); #endif -#if GENERICxxx && !defined(DISKLESS) +#if GENERICxxx if ((boothowto & RB_ASKNAME) == 0) setroot(); setconf(); #else -#ifndef DISKLESS +# ifdef NFS + { + extern int nfs_diskless_valid; + + extern int (*mountroot) __P((void)); + extern int nfs_mountroot(void); + if (nfs_diskless_valid) + mountroot = nfs_mountroot; + else + setroot(); + } +# else /* !NFS */ setroot(); -#endif +# endif /* NFS */ #endif /* * Configure swap area and related system diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index 0a8bc9b5252..6d539ba4887 100644 --- a/sys/i386/i386/locore.s +++ b/sys/i386/i386/locore.s @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $Id: locore.s,v 1.36 1994/10/10 01:10:21 phk Exp $ + * $Id: locore.s,v 1.37 1994/10/20 00:07:47 phk Exp $ */ /* @@ -263,6 +263,8 @@ NON_GPROF_ENTRY(btext) cld rep movsb + lea _nfs_diskless_valid-KERNBASE,%edi + movl $1,(%edi) #endif /*