add machine model name to cpu_model.

This commit is contained in:
sato 2000-02-10 02:15:01 +00:00
parent 549e292ae4
commit 1dd1e143a9
4 changed files with 20 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.16 2000/01/19 20:05:35 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.17 2000/02/10 02:15:01 sato Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2000/01/19 20:05:35 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.17 2000/02/10 02:15:01 sato Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
#include "opt_vr41x1.h"
@ -121,7 +121,9 @@ extern int (*mountroot) __P((void));
/* the following is used externally (sysctl_hw) */
char machine[] = MACHINE; /* from <machine/param.h> */
char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */
char cpu_model[40];
char cpu_model[128];
char cpu_name[40]; /* set cpu depend xx_init() */
/* maps for VM objects */
vm_map_t exec_map = NULL;
@ -455,6 +457,7 @@ cpu_startup()
* Good {morning,afternoon,evening,night}.
*/
printf(version);
sprintf(cpu_model, "%s (%s)\n", platid_name(&platid), cpu_name);
printf("%s\n", cpu_model);
format_bytes(pbuf, sizeof(pbuf), ctob(physmem));
printf("total memory = %s\n", pbuf);

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.h,v 1.1.1.1 1999/09/16 12:23:20 takemura Exp $ */
/* $NetBSD: machdep.h,v 1.2 2000/02/10 02:15:01 sato Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@ -33,3 +33,7 @@
/* the following is used externally (sysctl_hw) */
extern char machine[];
extern char cpu_model[];
/* others.. */
extern char cpu_name[];

View File

@ -1,4 +1,4 @@
/* $NetBSD: tx39.c,v 1.12 2000/01/16 21:47:00 uch Exp $ */
/* $NetBSD: tx39.c,v 1.13 2000/02/10 02:15:02 sato Exp $ */
/*
* Copyright (c) 1999, 2000, by UCHIYAMA Yasushi
@ -44,7 +44,7 @@
#include <machine/bus.h>
#include <machine/intr.h>
#include <hpcmips/hpcmips/machdep.h> /* cpu_model */
#include <hpcmips/hpcmips/machdep.h> /* cpu_name */
#include <hpcmips/tx/tx39biureg.h>
#include <hpcmips/tx/tx39reg.h>
@ -117,20 +117,20 @@ tx_init()
switch (model) {
default:
/* Unknown TOSHIBA TX39-series */
sprintf(cpu_model, "Unknown TOSHIBA TX39-series %x.%x",
sprintf(cpu_name, "Unknown TOSHIBA TX39-series %x.%x",
cpu_id.cpu.cp_majrev, cpu_id.cpu.cp_minrev);
break;
case TMPR3912:
tx39clock_cpuspeed(&cpuclock, &cpuspeed);
sprintf(cpu_model, "TOSHIBA TMPR3912 %d.%02d MHz",
sprintf(cpu_name, "TOSHIBA TMPR3912 %d.%02d MHz",
cpuclock / 1000000, (cpuclock % 1000000) / 10000);
break;
case TMPR3922:
tx39clock_cpuspeed(&cpuclock, &cpuspeed);
rev = tx_conf_read(tc, TX3922_REVISION_REG);
sprintf(cpu_model, "TOSHIBA TMPR3922 rev. %x.%x "
sprintf(cpu_name, "TOSHIBA TMPR3922 rev. %x.%x "
"%d.%02d MHz", (rev >> 4) & 0xf, rev & 0xf,
cpuclock / 1000000, (cpuclock % 1000000) / 10000);
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vr.c,v 1.11 2000/01/28 15:08:38 takemura Exp $ */
/* $NetBSD: vr.c,v 1.12 2000/02/10 02:15:03 sato Exp $ */
/*-
* Copyright (c) 1999
@ -55,7 +55,7 @@
#include <hpcmips/vr/vr_asm.h>
#include <hpcmips/vr/vripreg.h>
#include <hpcmips/vr/rtcreg.h>
#include <hpcmips/hpcmips/machdep.h> /* XXXjrs replace with vectors */
#include <hpcmips/hpcmips/machdep.h> /* cpu_name */
#include <machine/bootinfo.h>
#include "vrip.h"
@ -146,14 +146,14 @@ vr_init()
platform.reboot = vr_reboot;
#if NVRBCU > 0
sprintf(cpu_model, "NEC %s rev%d.%d %d.%03dMHz",
sprintf(cpu_name, "NEC %s rev%d.%d %d.%03dMHz",
vrbcu_vrip_getcpuname(),
vrbcu_vrip_getcpumajor(),
vrbcu_vrip_getcpuminor(),
vrbcu_vrip_getcpuclock() / 1000000,
(vrbcu_vrip_getcpuclock() % 1000000) / 1000);
#else
sprintf(cpu_model, "NEC VR41xx");
sprintf(cpu_name, "NEC VR41xx");
#endif
}