mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
- Also identify USIIIi+, USIV and USIV+ CPUs.
- Use __FBSDID in identcpu.c. - Remove #ifndef SUN4V around global cpu_impl variable; it doesn't hurt on sun4v for now and once setPQL2() is gone sun4v can stop sharing identcpu.c with sparc64, making the reminder of this file also sparc64-only again. [1] Submitted by: kmacy [1]
This commit is contained in:
parent
84edfa5dd8
commit
8d9b9168aa
2 changed files with 24 additions and 12 deletions
|
|
@ -62,13 +62,16 @@ extern int cpu_impl;
|
|||
extern char sparc64_model[];
|
||||
|
||||
/* Known implementations. */
|
||||
#define CPU_IMPL_SPARC64 0x01
|
||||
#define CPU_IMPL_ULTRASPARCI 0x10
|
||||
#define CPU_IMPL_ULTRASPARCII 0x11
|
||||
#define CPU_IMPL_ULTRASPARCIIi 0x12
|
||||
#define CPU_IMPL_ULTRASPARCIIe 0x13
|
||||
#define CPU_IMPL_ULTRASPARCIII 0x14
|
||||
#define CPU_IMPL_ULTRASPARCIIIp 0x15
|
||||
#define CPU_IMPL_ULTRASPARCIIIi 0x16
|
||||
#define CPU_IMPL_SPARC64 0x01
|
||||
#define CPU_IMPL_ULTRASPARCI 0x10
|
||||
#define CPU_IMPL_ULTRASPARCII 0x11
|
||||
#define CPU_IMPL_ULTRASPARCIIi 0x12
|
||||
#define CPU_IMPL_ULTRASPARCIIe 0x13
|
||||
#define CPU_IMPL_ULTRASPARCIII 0x14
|
||||
#define CPU_IMPL_ULTRASPARCIIIp 0x15
|
||||
#define CPU_IMPL_ULTRASPARCIIIi 0x16
|
||||
#define CPU_IMPL_ULTRASPARCIV 0x18
|
||||
#define CPU_IMPL_ULTRASPARCIVp 0x19
|
||||
#define CPU_IMPL_ULTRASPARCIIIip 0x22
|
||||
|
||||
#endif /* !_MACHINE_VER_H_ */
|
||||
|
|
|
|||
|
|
@ -5,9 +5,11 @@
|
|||
*
|
||||
* As long as the above copyright statement and this notice remain
|
||||
* unchanged, you can do what ever you want with this file.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
|
|
@ -25,9 +27,7 @@ static char cpu_model[128];
|
|||
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD,
|
||||
cpu_model, 0, "Machine model");
|
||||
|
||||
#ifndef SUN4V
|
||||
int cpu_impl;
|
||||
#endif
|
||||
|
||||
void setPQL2(int *const size, int *const ways);
|
||||
|
||||
|
|
@ -88,6 +88,15 @@ cpu_identify(u_long vers, u_int freq, u_int id)
|
|||
case CPU_IMPL_ULTRASPARCIIIi:
|
||||
impls = "UltraSparc-IIIi";
|
||||
break;
|
||||
case CPU_IMPL_ULTRASPARCIV:
|
||||
impls = "UltraSparc-IV";
|
||||
break;
|
||||
case CPU_IMPL_ULTRASPARCIVp:
|
||||
impls = "UltraSparc-IV+";
|
||||
break;
|
||||
case CPU_IMPL_ULTRASPARCIIIip:
|
||||
impls = "UltraSparc-IIIi+";
|
||||
break;
|
||||
default:
|
||||
impls = NULL;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue