[MIPS] Print Config7 on boot for several MIPS architectures

Config7 contains useful fields, for instance, field AR indicating that the D-cache is configured to avoid cache aliases. This patch brings printing of config7 for MIPS 24K, 74K, 1004K.

Reviewed by:	adrian
Approved by:	adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D8514
This commit is contained in:
Michael Zhilin 2016-11-14 21:38:36 +00:00
parent 047dd1cd66
commit 679761c0e0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308653
2 changed files with 10 additions and 1 deletions

View File

@ -249,7 +249,8 @@ MIPS_RW32_COP0_SEL(config5, MIPS_COP_0_CONFIG, 5);
#if defined(CPU_NLM) || defined(BERI_LARGE_TLB)
MIPS_RW32_COP0_SEL(config6, MIPS_COP_0_CONFIG, 6);
#endif
#if defined(CPU_NLM) || defined(CPU_MIPS1004K)
#if defined(CPU_NLM) || defined(CPU_MIPS1004K) || defined (CPU_MIPS74K) || \
defined(CPU_MIPS24K)
MIPS_RW32_COP0_SEL(config7, MIPS_COP_0_CONFIG, 7);
#endif
MIPS_RW32_COP0(count, MIPS_COP_0_COUNT);

View File

@ -337,6 +337,9 @@ static void
cpu_identify(void)
{
uint32_t cfg0, cfg1, cfg2, cfg3;
#if defined(CPU_MIPS1004K) || defined (CPU_MIPS74K) || defined (CPU_MIPS24K)
uint32_t cfg7;
#endif
printf("cpu%d: ", 0); /* XXX per-cpu */
switch (cpuinfo.cpu_vendor) {
case MIPS_PRID_CID_MTI:
@ -479,6 +482,11 @@ cpu_identify(void)
/* Print Config3 if it contains any useful info */
if (cfg3 & ~(0x80000000))
printf(" Config3=0x%b\n", cfg3, "\20\14ULRI\2SmartMIPS\1TraceLogic");
#if defined(CPU_MIPS1004K) || defined (CPU_MIPS74K) || defined (CPU_MIPS24K)
cfg7 = mips_rd_config7();
printf(" Config7=0x%b\n", cfg7, "\20\40WII\21AR");
#endif
}
static struct rman cpu_hardirq_rman;