More liberal check for exec header. Nuke machine type defines (support all)
This commit is contained in:
parent
5a7b959d02
commit
20ff880de8
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: locore2.c,v 1.42 1995/06/02 16:46:22 gwr Exp $ */
|
/* $NetBSD: locore2.c,v 1.43 1995/06/09 21:58:32 gwr Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994 Gordon W. Ross
|
* Copyright (c) 1994 Gordon W. Ross
|
||||||
|
@ -260,7 +260,7 @@ int keep; /* true: steal, false: clear */
|
||||||
sun3_save_symtab(kehp)
|
sun3_save_symtab(kehp)
|
||||||
struct exec *kehp; /* kernel exec header */
|
struct exec *kehp; /* kernel exec header */
|
||||||
{
|
{
|
||||||
int *symsz, *strsz;
|
int x, *symsz, *strsz;
|
||||||
char *endp;
|
char *endp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -271,12 +271,10 @@ sun3_save_symtab(kehp)
|
||||||
mon_printf("bad magic\n");
|
mon_printf("bad magic\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (kehp->a_text != ((etext+4) - kernel_text)) {
|
/* Boundary between text and data varries a little. */
|
||||||
mon_printf("bad a_text\n");
|
x = kehp->a_text + kehp->a_data;
|
||||||
return;
|
if (x != (edata - kernel_text)) {
|
||||||
}
|
mon_printf("bad a_text+a_data\n");
|
||||||
if (kehp->a_data != (edata - (etext+4))) {
|
|
||||||
mon_printf("bad a_data\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (kehp->a_bss != (end - edata)) {
|
if (kehp->a_bss != (end - edata)) {
|
||||||
|
@ -585,57 +583,45 @@ void sun3_verify_hardware()
|
||||||
switch (cpu_machine_id) {
|
switch (cpu_machine_id) {
|
||||||
|
|
||||||
case SUN3_MACH_50 :
|
case SUN3_MACH_50 :
|
||||||
#ifdef SUN3_50
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
hole_start = OBMEM_BW50_ADDR;
|
hole_start = OBMEM_BW50_ADDR;
|
||||||
hole_size = OBMEM_BW2_SIZE;
|
hole_size = OBMEM_BW2_SIZE;
|
||||||
#endif
|
|
||||||
cpu_string = "50";
|
cpu_string = "50";
|
||||||
cpuspeed = 16; /* MHz */
|
cpuspeed = 16; /* MHz */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUN3_MACH_60 :
|
case SUN3_MACH_60 :
|
||||||
#ifdef SUN3_60
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
#endif
|
|
||||||
cpu_string = "60";
|
cpu_string = "60";
|
||||||
cpuspeed = 20; /* MHz */
|
cpuspeed = 20; /* MHz */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUN3_MACH_110:
|
case SUN3_MACH_110:
|
||||||
#ifdef SUN3_110
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
#endif
|
|
||||||
cpu_string = "110";
|
cpu_string = "110";
|
||||||
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
||||||
cpu_has_vme = TRUE;
|
cpu_has_vme = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUN3_MACH_160:
|
case SUN3_MACH_160:
|
||||||
#ifdef SUN3_160
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
#endif
|
|
||||||
cpu_string = "160";
|
cpu_string = "160";
|
||||||
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
||||||
cpu_has_vme = TRUE;
|
cpu_has_vme = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUN3_MACH_260:
|
case SUN3_MACH_260:
|
||||||
#ifdef SUN3_260
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
#endif
|
|
||||||
cpu_string = "260";
|
cpu_string = "260";
|
||||||
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
||||||
cpu_has_vme = TRUE;
|
cpu_has_vme = TRUE;
|
||||||
#if 0 /* def HAVECACHE */
|
#if 0 /* def HAVECACHE */
|
||||||
cache_size = 0x10000; /* 64K */
|
cache_size = 0x10000; /* XXX: not tested yet... */
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUN3_MACH_E :
|
case SUN3_MACH_E :
|
||||||
#ifdef SUN3_E
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
#endif
|
|
||||||
cpu_string = "E";
|
cpu_string = "E";
|
||||||
cpuspeed = 30; /* MHz */ /* XXX - Correct? */
|
cpuspeed = 30; /* MHz */ /* XXX - Correct? */
|
||||||
cpu_has_vme = TRUE;
|
cpu_has_vme = TRUE;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: sun3_startup.c,v 1.42 1995/06/02 16:46:22 gwr Exp $ */
|
/* $NetBSD: sun3_startup.c,v 1.43 1995/06/09 21:58:32 gwr Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994 Gordon W. Ross
|
* Copyright (c) 1994 Gordon W. Ross
|
||||||
|
@ -260,7 +260,7 @@ int keep; /* true: steal, false: clear */
|
||||||
sun3_save_symtab(kehp)
|
sun3_save_symtab(kehp)
|
||||||
struct exec *kehp; /* kernel exec header */
|
struct exec *kehp; /* kernel exec header */
|
||||||
{
|
{
|
||||||
int *symsz, *strsz;
|
int x, *symsz, *strsz;
|
||||||
char *endp;
|
char *endp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -271,12 +271,10 @@ sun3_save_symtab(kehp)
|
||||||
mon_printf("bad magic\n");
|
mon_printf("bad magic\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (kehp->a_text != ((etext+4) - kernel_text)) {
|
/* Boundary between text and data varries a little. */
|
||||||
mon_printf("bad a_text\n");
|
x = kehp->a_text + kehp->a_data;
|
||||||
return;
|
if (x != (edata - kernel_text)) {
|
||||||
}
|
mon_printf("bad a_text+a_data\n");
|
||||||
if (kehp->a_data != (edata - (etext+4))) {
|
|
||||||
mon_printf("bad a_data\n");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (kehp->a_bss != (end - edata)) {
|
if (kehp->a_bss != (end - edata)) {
|
||||||
|
@ -585,57 +583,45 @@ void sun3_verify_hardware()
|
||||||
switch (cpu_machine_id) {
|
switch (cpu_machine_id) {
|
||||||
|
|
||||||
case SUN3_MACH_50 :
|
case SUN3_MACH_50 :
|
||||||
#ifdef SUN3_50
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
hole_start = OBMEM_BW50_ADDR;
|
hole_start = OBMEM_BW50_ADDR;
|
||||||
hole_size = OBMEM_BW2_SIZE;
|
hole_size = OBMEM_BW2_SIZE;
|
||||||
#endif
|
|
||||||
cpu_string = "50";
|
cpu_string = "50";
|
||||||
cpuspeed = 16; /* MHz */
|
cpuspeed = 16; /* MHz */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUN3_MACH_60 :
|
case SUN3_MACH_60 :
|
||||||
#ifdef SUN3_60
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
#endif
|
|
||||||
cpu_string = "60";
|
cpu_string = "60";
|
||||||
cpuspeed = 20; /* MHz */
|
cpuspeed = 20; /* MHz */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUN3_MACH_110:
|
case SUN3_MACH_110:
|
||||||
#ifdef SUN3_110
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
#endif
|
|
||||||
cpu_string = "110";
|
cpu_string = "110";
|
||||||
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
||||||
cpu_has_vme = TRUE;
|
cpu_has_vme = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUN3_MACH_160:
|
case SUN3_MACH_160:
|
||||||
#ifdef SUN3_160
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
#endif
|
|
||||||
cpu_string = "160";
|
cpu_string = "160";
|
||||||
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
||||||
cpu_has_vme = TRUE;
|
cpu_has_vme = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUN3_MACH_260:
|
case SUN3_MACH_260:
|
||||||
#ifdef SUN3_260
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
#endif
|
|
||||||
cpu_string = "260";
|
cpu_string = "260";
|
||||||
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
cpuspeed = 25; /* MHz */ /* XXX - Correct? */
|
||||||
cpu_has_vme = TRUE;
|
cpu_has_vme = TRUE;
|
||||||
#if 0 /* def HAVECACHE */
|
#if 0 /* def HAVECACHE */
|
||||||
cache_size = 0x10000; /* 64K */
|
cache_size = 0x10000; /* XXX: not tested yet... */
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUN3_MACH_E :
|
case SUN3_MACH_E :
|
||||||
#ifdef SUN3_E
|
|
||||||
cpu_match++;
|
cpu_match++;
|
||||||
#endif
|
|
||||||
cpu_string = "E";
|
cpu_string = "E";
|
||||||
cpuspeed = 30; /* MHz */ /* XXX - Correct? */
|
cpuspeed = 30; /* MHz */ /* XXX - Correct? */
|
||||||
cpu_has_vme = TRUE;
|
cpu_has_vme = TRUE;
|
||||||
|
|
Loading…
Reference in New Issue