make the code which decodes the MAKEBOOTDEV()-style boot device
(as passed by the pre-1.3 bootloader) optional
This commit is contained in:
parent
0bd36d187b
commit
7a63478423
@ -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
|
# new style config file for i386 architecture
|
||||||
#
|
#
|
||||||
@ -34,6 +34,9 @@ defopt DUMMY_NOPS
|
|||||||
# X server support in console drivers
|
# X server support in console drivers
|
||||||
defopt opt_xserver.h XSERVER XSERVER_DDB
|
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/autoconf.c
|
||||||
file arch/i386/i386/conf.c
|
file arch/i386/i386/conf.c
|
||||||
file arch/i386/i386/db_dbgreg.s ddb
|
file arch/i386/i386/db_dbgreg.s ddb
|
||||||
|
@ -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.
|
* Copyright (c) 1990 The Regents of the University of California.
|
||||||
@ -46,13 +46,18 @@
|
|||||||
* devices are determined (from possibilities mentioned in ioconf.c),
|
* devices are determined (from possibilities mentioned in ioconf.c),
|
||||||
* and the drivers are initialized.
|
* and the drivers are initialized.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "opt_compat_oldboot.h"
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
#include <sys/buf.h>
|
#include <sys/buf.h>
|
||||||
#include <sys/dkstat.h>
|
#include <sys/dkstat.h>
|
||||||
#include <sys/disklabel.h>
|
#include <sys/disklabel.h>
|
||||||
#include <sys/conf.h>
|
#include <sys/conf.h>
|
||||||
|
#ifdef COMPAT_OLDBOOT
|
||||||
#include <sys/reboot.h>
|
#include <sys/reboot.h>
|
||||||
|
#endif
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
#include <sys/malloc.h>
|
#include <sys/malloc.h>
|
||||||
#include <sys/vnode.h>
|
#include <sys/vnode.h>
|
||||||
@ -232,8 +237,9 @@ matchbiosdisks()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef COMPAT_OLDBOOT
|
||||||
u_long bootdev = 0; /* should be dev_t, but not until 32 bits */
|
u_long bootdev = 0; /* should be dev_t, but not until 32 bits */
|
||||||
|
#endif
|
||||||
struct device *booted_device;
|
struct device *booted_device;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -325,8 +331,10 @@ findroot(devpp, partp)
|
|||||||
{
|
{
|
||||||
struct btinfo_bootdisk *bid;
|
struct btinfo_bootdisk *bid;
|
||||||
struct device *dv;
|
struct device *dv;
|
||||||
|
#ifdef COMPAT_OLDBOOT
|
||||||
int i, majdev, unit, part;
|
int i, majdev, unit, part;
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default to "not found."
|
* Default to "not found."
|
||||||
@ -409,6 +417,7 @@ found:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef COMPAT_OLDBOOT
|
||||||
#if 0
|
#if 0
|
||||||
printf("howto %x bootdev %x ", boothowto, bootdev);
|
printf("howto %x bootdev %x ", boothowto, bootdev);
|
||||||
#endif
|
#endif
|
||||||
@ -435,6 +444,7 @@ found:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
|
@ -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.
|
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
@ -83,6 +83,7 @@
|
|||||||
#include "opt_compat_linux.h"
|
#include "opt_compat_linux.h"
|
||||||
#include "opt_compat_ibcs2.h"
|
#include "opt_compat_ibcs2.h"
|
||||||
#include "opt_compat_svr4.h"
|
#include "opt_compat_svr4.h"
|
||||||
|
#include "opt_compat_oldboot.h"
|
||||||
|
|
||||||
#include "npx.h"
|
#include "npx.h"
|
||||||
#include "assym.h"
|
#include "assym.h"
|
||||||
@ -216,7 +217,9 @@
|
|||||||
.globl _C_LABEL(cpuid_level),_C_LABEL(cpu_feature)
|
.globl _C_LABEL(cpuid_level),_C_LABEL(cpu_feature)
|
||||||
.globl _C_LABEL(esym),_C_LABEL(boothowto)
|
.globl _C_LABEL(esym),_C_LABEL(boothowto)
|
||||||
.globl _C_LABEL(bootinfo),_C_LABEL(atdevbase)
|
.globl _C_LABEL(bootinfo),_C_LABEL(atdevbase)
|
||||||
|
#ifdef COMPAT_OLDBOOT
|
||||||
.globl _C_LABEL(bootdev)
|
.globl _C_LABEL(bootdev)
|
||||||
|
#endif
|
||||||
.globl _C_LABEL(proc0paddr),_C_LABEL(curpcb),_C_LABEL(PTDpaddr)
|
.globl _C_LABEL(proc0paddr),_C_LABEL(curpcb),_C_LABEL(PTDpaddr)
|
||||||
.globl _C_LABEL(biosbasemem),_C_LABEL(biosextmem)
|
.globl _C_LABEL(biosbasemem),_C_LABEL(biosextmem)
|
||||||
.globl _C_LABEL(gdt)
|
.globl _C_LABEL(gdt)
|
||||||
@ -262,14 +265,15 @@ tmpstk:
|
|||||||
start: movw $0x1234,0x472 # warm boot
|
start: movw $0x1234,0x472 # warm boot
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Load parameters from stack (howto, bootdev, unit, bootinfo, esym).
|
* Load parameters from stack
|
||||||
* note: (%esp) is return address of boot
|
* (howto, [bootdev], bootinfo, esym, basemem, extmem).
|
||||||
* (If we want to hold onto /boot, it's physical %esp up to _end.)
|
|
||||||
*/
|
*/
|
||||||
movl 4(%esp),%eax
|
movl 4(%esp),%eax
|
||||||
movl %eax,RELOC(boothowto)
|
movl %eax,RELOC(boothowto)
|
||||||
|
#ifdef COMPAT_OLDBOOT
|
||||||
movl 8(%esp),%eax
|
movl 8(%esp),%eax
|
||||||
movl %eax,RELOC(bootdev)
|
movl %eax,RELOC(bootdev)
|
||||||
|
#endif
|
||||||
movl 12(%esp),%eax
|
movl 12(%esp),%eax
|
||||||
|
|
||||||
testl %eax, %eax
|
testl %eax, %eax
|
||||||
|
Loading…
Reference in New Issue
Block a user