Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jul 2015 05:14:11 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r285524 - head/sys/mips/atheros
Message-ID:  <201507140514.t6E5EB7C056267@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue Jul 14 05:14:10 2015
New Revision: 285524
URL: https://svnweb.freebsd.org/changeset/base/285524

Log:
  Populate hw.model with the CPU model information.
  
  Now you see something like:
  
  # sysctl hw.model
  hw.model: Atheros AR9330 rev 1
  
  Tested:
  
  * Carambola 2, AR9331 SoC

Modified:
  head/sys/mips/atheros/ar71xx_machdep.c

Modified: head/sys/mips/atheros/ar71xx_machdep.c
==============================================================================
--- head/sys/mips/atheros/ar71xx_machdep.c	Tue Jul 14 05:09:58 2015	(r285523)
+++ head/sys/mips/atheros/ar71xx_machdep.c	Tue Jul 14 05:14:10 2015	(r285524)
@@ -304,6 +304,8 @@ ar71xx_platform_check_mac_hints(void)
 	return (0);
 }
 
+extern char cpu_model[];
+
 void
 platform_start(__register_t a0 __unused, __register_t a1 __unused, 
     __register_t a2 __unused, __register_t a3 __unused)
@@ -417,6 +419,8 @@ platform_start(__register_t a0 __unused,
 	printf("  a2 = %08x\n", a2);
 	printf("  a3 = %08x\n", a3);
 
+	strcpy(cpu_model, ar71xx_get_system_type());
+
 	/*
 	 * XXX this code is very redboot specific.
 	 */



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