Move the machdep_start() code into machdep.c. No need for different
versions of this function anymore, now that we have a sane kernel setroot().
This commit is contained in:
parent
18c2b0460a
commit
415248a4f2
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: inst.c,v 1.4 1996/10/07 04:45:10 thorpej Exp $ */
|
||||
/* $NetBSD: inst.c,v 1.5 1996/10/14 07:33:43 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Jason R. Thorpe.
|
||||
|
@ -68,7 +68,6 @@ char line[100];
|
|||
extern u_int opendev;
|
||||
extern char *lowram;
|
||||
extern int noconsole;
|
||||
extern int cons_scode;
|
||||
extern int netio_ask;
|
||||
|
||||
char *kernel_name = "/netbsd";
|
||||
|
@ -109,7 +108,7 @@ main()
|
|||
|
||||
printf("\n>> NetBSD MINIROOT INSTALLATION HP9000/%s CPU\n",
|
||||
getmachineid());
|
||||
printf(">> $NetBSD: inst.c,v 1.4 1996/10/07 04:45:10 thorpej Exp $\n");
|
||||
printf(">> $NetBSD: inst.c,v 1.5 1996/10/14 07:33:43 thorpej Exp $\n");
|
||||
gethelp();
|
||||
|
||||
for (;;) {
|
||||
|
@ -662,46 +661,3 @@ a2int(cp)
|
|||
i = i * 10 + *cp++ - '0';
|
||||
return (i);
|
||||
}
|
||||
|
||||
void
|
||||
machdep_start_net(entry, howto, loadaddr, ssym, esym)
|
||||
char *entry;
|
||||
int howto;
|
||||
char *loadaddr;
|
||||
char *ssym, *esym;
|
||||
{
|
||||
|
||||
asm("movl %0,d7" : : "m" (howto));
|
||||
asm("movl #0,d6"); /* tell setroot we've netbooted */
|
||||
asm("movl %0,d5" : : "m" (cons_scode));
|
||||
asm("movl %0,a5" : : "a" (loadaddr));
|
||||
asm("movl %0,a4" : : "a" (esym));
|
||||
(*((int (*)())entry))();
|
||||
}
|
||||
|
||||
void
|
||||
machdep_start_disk_tape(entry, howto, loadaddr, ssym, esym)
|
||||
char *entry;
|
||||
int howto;
|
||||
char *loadaddr;
|
||||
char *ssym, *esym;
|
||||
{
|
||||
|
||||
asm("movl %0,d7" : : "m" (howto));
|
||||
asm("movl %0,d6" : : "m" (opendev));
|
||||
asm("movl %0,d5" : : "m" (cons_scode));
|
||||
asm("movl %0,a5" : : "a" (loadaddr));
|
||||
asm("movl %0,a4" : : "a" (esym));
|
||||
(*((int (*)())entry))();
|
||||
}
|
||||
|
||||
void
|
||||
machdep_start(entry, howto, loadaddr, ssym, esym)
|
||||
char *entry;
|
||||
int howto;
|
||||
char *loadaddr;
|
||||
char *ssym, *esym;
|
||||
{
|
||||
|
||||
(*__machdep_start)(entry, howto, loadaddr, ssym, esym);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.5 1994/10/26 07:27:43 cgd Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.6 1996/10/14 07:33:46 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -155,3 +155,19 @@ romputchar(c)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
machdep_start(entry, howto, loadaddr, ssym, esym)
|
||||
char *entry;
|
||||
int howto;
|
||||
char *loadaddr;
|
||||
char *ssym, *esym;
|
||||
{
|
||||
|
||||
asm("movl %0,d7" : : "m" (howto));
|
||||
asm("movl %0,d6" : : "m" (opendev));
|
||||
asm("movl %0,d5" : : "m" (cons_scode));
|
||||
asm("movl %0,a5" : : "a" (loadaddr));
|
||||
asm("movl %0,a4" : : "a" (esym));
|
||||
(*((int (*)())entry))();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uboot.c,v 1.1 1996/06/26 17:44:39 thorpej Exp $ */
|
||||
/* $NetBSD: uboot.c,v 1.2 1996/10/14 07:33:45 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
|
@ -52,7 +52,6 @@ char line[100];
|
|||
extern u_int opendev;
|
||||
extern char *lowram;
|
||||
extern int noconsole;
|
||||
extern int cons_scode;
|
||||
|
||||
/*
|
||||
* XXX UFS accepts a /, NFS doesn't.
|
||||
|
@ -71,7 +70,7 @@ main()
|
|||
|
||||
printf("\n>> NetBSD UNIFIED BOOT HP9000/%s CPU\n",
|
||||
getmachineid());
|
||||
printf(">> $NetBSD: uboot.c,v 1.1 1996/06/26 17:44:39 thorpej Exp $\n");
|
||||
printf(">> $NetBSD: uboot.c,v 1.2 1996/10/14 07:33:45 thorpej Exp $\n");
|
||||
printf(">> Enter \"reset\" to reset system.\n");
|
||||
|
||||
bdev = B_TYPE(bootdev);
|
||||
|
@ -141,46 +140,3 @@ getbootdev(howto)
|
|||
} else
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void
|
||||
machdep_start_net(entry, howto, loadaddr, ssym, esym)
|
||||
char *entry;
|
||||
int howto;
|
||||
char *loadaddr;
|
||||
char *ssym, *esym;
|
||||
{
|
||||
|
||||
asm("movl %0,d7" : : "m" (howto));
|
||||
asm("movl #0,d6"); /* tell setroot we've netbooted */
|
||||
asm("movl %0,d5" : : "m" (cons_scode));
|
||||
asm("movl %0,a5" : : "a" (loadaddr));
|
||||
asm("movl %0,a4" : : "a" (esym));
|
||||
(*((int (*)())entry))();
|
||||
}
|
||||
|
||||
void
|
||||
machdep_start_disk_tape(entry, howto, loadaddr, ssym, esym)
|
||||
char *entry;
|
||||
int howto;
|
||||
char *loadaddr;
|
||||
char *ssym, *esym;
|
||||
{
|
||||
|
||||
asm("movl %0,d7" : : "m" (howto));
|
||||
asm("movl %0,d6" : : "m" (opendev));
|
||||
asm("movl %0,d5" : : "m" (cons_scode));
|
||||
asm("movl %0,a5" : : "a" (loadaddr));
|
||||
asm("movl %0,a4" : : "a" (esym));
|
||||
(*((int (*)())entry))();
|
||||
}
|
||||
|
||||
void
|
||||
machdep_start(entry, howto, loadaddr, ssym, esym)
|
||||
char *entry;
|
||||
int howto;
|
||||
char *loadaddr;
|
||||
char *ssym, *esym;
|
||||
{
|
||||
|
||||
(*__machdep_start)(entry, howto, loadaddr, ssym, esym);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue