From owner-svn-src-all@freebsd.org Mon Nov 14 21:38:37 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B12D5C419C0; Mon, 14 Nov 2016 21:38:37 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6752C68F; Mon, 14 Nov 2016 21:38:37 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAELcaui097101; Mon, 14 Nov 2016 21:38:36 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAELcaVI097099; Mon, 14 Nov 2016 21:38:36 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201611142138.uAELcaVI097099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Mon, 14 Nov 2016 21:38:36 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2016 21:38:37 -0000 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;