Remove fpu_model from struct _cpu. Instead, have initialise_arm_fpe()

printf() the FPE version number itself.
This commit is contained in:
bjh21 2002-03-10 11:32:00 +00:00
parent 63231772e8
commit 9bb7807c7b
3 changed files with 13 additions and 18 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.c,v 1.23 2002/03/10 11:06:01 bjh21 Exp $ */
/* $NetBSD: cpu.c,v 1.24 2002/03/10 11:32:00 bjh21 Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@ -46,7 +46,7 @@
#include <sys/param.h>
__RCSID("$NetBSD: cpu.c,v 1.23 2002/03/10 11:06:01 bjh21 Exp $");
__RCSID("$NetBSD: cpu.c,v 1.24 2002/03/10 11:32:00 bjh21 Exp $");
#include <sys/systm.h>
#include <sys/malloc.h>
@ -566,25 +566,19 @@ identify_arm_fpu(struct device *dv, int cpu_number)
switch (cpu->fpu_class) {
case FPU_CLASS_NONE :
strcpy(cpu->fpu_model, "None");
break;
case FPU_CLASS_FPE :
printf("%s: FPE: %s\n", dv->dv_xname, cpu->fpu_model);
printf("%s: no FP hardware found\n", dv->dv_xname);
break;
case FPU_CLASS_FPA :
printf("%s: FPE: %s\n", dv->dv_xname, cpu->fpu_model);
if (cpu->fpu_type == FPU_TYPE_FPA11) {
strcpy(cpu->fpu_model, "FPA11");
if (cpu->fpu_type == FPU_TYPE_FPA11)
printf("%s: FPA11 found\n", dv->dv_xname);
} else {
strcpy(cpu->fpu_model, "FPA");
else
printf("%s: FPA10 found\n", dv->dv_xname);
}
break;
case FPU_CLASS_FPU :
sprintf(cpu->fpu_model, "Unknown FPU (ID=%02x)\n",
cpu->fpu_type);
printf("%s: %s\n", dv->dv_xname, cpu->fpu_model);
printf("%s: Unknown FPU (ID=%02x)\n",
dv->dv_xname, cpu->fpu_type);
break;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: armfpe_init.c,v 1.1 2001/11/24 01:26:25 thorpej Exp $ */
/* $NetBSD: armfpe_init.c,v 1.2 2002/03/10 11:32:00 bjh21 Exp $ */
/*
* Copyright (C) 1996 Mark Brinicombe
@ -94,13 +94,15 @@ initialise_arm_fpe(cpu)
cpu->fpu_class = FPU_CLASS_FPE;
cpu->fpu_type = FPU_TYPE_ARMLTD_FPE;
strcpy(cpu->fpu_model, fpe_arm_header.core_identity_addr);
printf("%s: FPE: %s",
curcpu()->ci_dev->dv_xname, fpe_arm_header.core_identity_addr);
error = arm_fpe_boot(cpu);
if (error != 0) {
strcat(cpu->fpu_model, " - boot failed");
printf(" - boot failed\n");
return(1);
}
printf("\n");
return(0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpus.h,v 1.12 2002/03/10 00:44:10 bjh21 Exp $ */
/* $NetBSD: cpus.h,v 1.13 2002/03/10 11:32:01 bjh21 Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@ -66,7 +66,6 @@ typedef struct _cpu {
u_int fpu_class; /* The FPU class */
u_int fpu_type; /* The FPU type */
char fpu_model[256]; /* Text description of FPU */
} cpu_t;