Date: Mon, 14 Nov 2016 21:38:36 +0000 (UTC) From: Michael Zhilin <mizhka@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308653 - in head/sys/mips: include mips Message-ID: <201611142138.uAELcaVI097099@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mizhka Date: Mon Nov 14 21:38:36 2016 New Revision: 308653 URL: https://svnweb.freebsd.org/changeset/base/308653 Log: [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 Modified: head/sys/mips/include/cpufunc.h head/sys/mips/mips/cpu.c Modified: head/sys/mips/include/cpufunc.h ============================================================================== --- head/sys/mips/include/cpufunc.h Mon Nov 14 21:27:18 2016 (r308652) +++ head/sys/mips/include/cpufunc.h Mon Nov 14 21:38:36 2016 (r308653) @@ -249,7 +249,8 @@ MIPS_RW32_COP0_SEL(config5, MIPS_COP_0_C #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); Modified: head/sys/mips/mips/cpu.c ============================================================================== --- head/sys/mips/mips/cpu.c Mon Nov 14 21:27:18 2016 (r308652) +++ head/sys/mips/mips/cpu.c Mon Nov 14 21:38:36 2016 (r308653) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611142138.uAELcaVI097099>