summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-17 18:18:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-17 18:18:07 +0000
commit5b61a047422a46a018e71b15003a30d320b777b3 (patch)
tree3cf42769d93adeb27c8a37a358ab1c99ed582190 /sys
parentf5522ad316146ed0a5c6789cec62fddea3a4838a (diff)
put arch type into hw.model, sun4 installboot now works; jason
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/sparc/autoconf.c8
-rw-r--r--sys/arch/sparc/sparc/cpu.c12
-rw-r--r--sys/arch/sparc/stand/installboot/installboot.c6
3 files changed, 16 insertions, 10 deletions
diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c
index a09fbaa9dd3..b36233e2ad5 100644
--- a/sys/arch/sparc/sparc/autoconf.c
+++ b/sys/arch/sparc/sparc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.27 1998/03/25 07:54:57 jason Exp $ */
+/* $OpenBSD: autoconf.c,v 1.28 1998/04/17 18:18:02 deraadt Exp $ */
/* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */
/*
@@ -124,6 +124,7 @@ static void bootpath_build __P((void));
static void bootpath_fake __P((struct bootpath *, char *));
static void bootpath_print __P((struct bootpath *));
int search_prom __P((int, char *));
+char mainbus_model[30];
/*
* The mountroot_hook is provided as a mechanism for devices to perform
@@ -1128,9 +1129,10 @@ mainbus_attach(parent, dev, aux)
#endif
if (CPU_ISSUN4)
- printf(": SUN-4/%d series\n", cpuinfo.classlvl);
+ sprintf(mainbus_model, "SUN-4/%d series", cpuinfo.classlvl);
else
- printf(": %s\n", getpropstring(ca->ca_ra.ra_node, "name"));
+ strcat(mainbus_model, getpropstring(ca->ca_ra.ra_node, "name"));
+ printf(": %s\n", mainbus_model);
/*
* Locate and configure the ``early'' devices. These must be
diff --git a/sys/arch/sparc/sparc/cpu.c b/sys/arch/sparc/sparc/cpu.c
index 920eacba97c..63c6533b1d8 100644
--- a/sys/arch/sparc/sparc/cpu.c
+++ b/sys/arch/sparc/sparc/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.13 1998/03/09 09:15:32 deraadt Exp $ */
+/* $OpenBSD: cpu.c,v 1.14 1998/04/17 18:18:04 deraadt Exp $ */
/* $NetBSD: cpu.c,v 1.56 1997/09/15 20:52:36 pk Exp $ */
/*
@@ -75,8 +75,9 @@
/* The following are used externally (sysctl_hw). */
char machine[] = MACHINE; /* from <machine/param.h> */
char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */
-char cpu_model[100];
+char cpu_model[130];
char cpu_hotfix[40];
+extern char mainbus_model[]; /* from autoconf.c */
/* The CPU configuration driver. */
void cpu_attach __P((struct device *, struct device *, void *));
@@ -168,6 +169,7 @@ cpu_attach(parent, self, aux)
register char *fpuname;
struct confargs *ca = aux;
char fpbuf[40];
+ char model[100];
sc->node = node = ca->ca_ra.ra_node;
@@ -205,9 +207,11 @@ cpu_attach(parent, self, aux)
}
/* XXX - multi-processor: take care of `cpu_model' and `foundfpu' */
- sprintf(cpu_model, "%s @ %s MHz, %s FPU", sc->cpu_name,
+ sprintf(model, "%s @ %s MHz, %s FPU", sc->cpu_name,
clockfreq(sc->hz), fpuname);
- printf(": %s", cpu_model);
+ printf(": %s", model);
+ sprintf(cpu_model, "%s, %s", mainbus_model, model);
+
if (cpu_hotfix[0])
printf("; %s", cpu_hotfix);
printf("\n");
diff --git a/sys/arch/sparc/stand/installboot/installboot.c b/sys/arch/sparc/stand/installboot/installboot.c
index ea3ca3ef8ad..ced55b9ad39 100644
--- a/sys/arch/sparc/stand/installboot/installboot.c
+++ b/sys/arch/sparc/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.1 1997/09/17 10:46:21 downsj Exp $ */
+/* $OpenBSD: installboot.c,v 1.2 1998/04/17 18:18:06 deraadt Exp $ */
/* $NetBSD: installboot.c,v 1.1 1997/06/01 03:39:45 mrg Exp $ */
/*
@@ -66,7 +66,7 @@ int32_t *block_size_p; /* filesystem block size */
int32_t max_block_count;
char *karch;
-char cpumodel[100];
+char cpumodel[130];
int isofsblk = 0;
int isofseblk = 0;
@@ -156,7 +156,7 @@ main(argc, argv)
}
if (strcmp(karch, "sun4") == 0) {
- hflag = 1;
+ hflag = 0;
} else if (strcmp(karch, "sun4c") == 0) {
hflag = 1;
} else if (strcmp(karch, "sun4m") == 0) {