Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 May 2019 01:43:35 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348217 - in head/sys/mips: atheros/ar531x mips
Message-ID:  <201905240143.x4O1hZ0J003912@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri May 24 01:43:35 2019
New Revision: 348217
URL: https://svnweb.freebsd.org/changeset/base/348217

Log:
  Display CPU model in dmesg on mips targets
  
  Also, save the CPU model for atheros ar531x boards.
  
  Submitted by: Hiroki Mori
  Differential Revision: https://reviews.freebsd.org/D20371

Modified:
  head/sys/mips/atheros/ar531x/ar5315_machdep.c
  head/sys/mips/mips/machdep.c

Modified: head/sys/mips/atheros/ar531x/ar5315_machdep.c
==============================================================================
--- head/sys/mips/atheros/ar531x/ar5315_machdep.c	Fri May 24 01:43:29 2019	(r348216)
+++ head/sys/mips/atheros/ar531x/ar5315_machdep.c	Fri May 24 01:43:35 2019	(r348217)
@@ -146,6 +146,8 @@ SYSCTL_STRING(_hw_device, OID_AUTO, revision, CTLFLAG_
 	   "Board revision");
 #endif
 
+extern char cpu_model[];
+
 void
 platform_start(__register_t a0 __unused, __register_t a1 __unused, 
     __register_t a2 __unused, __register_t a3 __unused)
@@ -259,6 +261,8 @@ platform_start(__register_t a0 __unused, __register_t 
 	printf("  a1 = %08x\n", a1);
 	printf("  a2 = %08x\n", a2);
 	printf("  a3 = %08x\n", a3);
+
+	strcpy(cpu_model, ar5315_get_system_type());
 
 	/*
 	 * XXX this code is very redboot specific.

Modified: head/sys/mips/mips/machdep.c
==============================================================================
--- head/sys/mips/mips/machdep.c	Fri May 24 01:43:29 2019	(r348216)
+++ head/sys/mips/mips/machdep.c	Fri May 24 01:43:35 2019	(r348217)
@@ -186,6 +186,8 @@ cpu_startup(void *dummy)
 	if (boothowto & RB_VERBOSE)
 		bootverbose++;
 
+	printf("CPU model: %s\n", cpu_model);
+
 	printf("real memory  = %ju (%juK bytes)\n", ptoa((uintmax_t)realmem),
 	    ptoa((uintmax_t)realmem) / 1024);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905240143.x4O1hZ0J003912>