svn commit: r348217 - in head/sys/mips: atheros/ar531x mips

Warner Losh imp at FreeBSD.org
Fri May 24 01:43:40 UTC 2019


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);
 


More information about the svn-src-head mailing list