svn commit: r278770 - head/sys/arm/arm

Ian Lepore ian at FreeBSD.org
Sat Feb 14 18:54:53 UTC 2015


Author: ian
Date: Sat Feb 14 18:54:52 2015
New Revision: 278770
URL: https://svnweb.freebsd.org/changeset/base/278770

Log:
  Add logic for handling new-style ARM cpu ID info.
  
  Submitted by:	Michal Meloun <meloun at miracle.cz>

Modified:
  head/sys/arm/arm/cpuinfo.c

Modified: head/sys/arm/arm/cpuinfo.c
==============================================================================
--- head/sys/arm/arm/cpuinfo.c	Sat Feb 14 18:45:43 2015	(r278769)
+++ head/sys/arm/arm/cpuinfo.c	Sat Feb 14 18:54:52 2015	(r278770)
@@ -58,9 +58,13 @@ cpuinfo_init(void)
 			/* ARMv4T CPU */
 			cpuinfo.architecture = 1;
 			cpuinfo.revision = (cpuinfo.midr >> 16) & 0x7F;
-		} 
+		} else {
+			/* ARM new id scheme */
+			cpuinfo.architecture = (cpuinfo.midr >> 16) & 0x0F;
+			cpuinfo.revision = (cpuinfo.midr >> 20) & 0x0F;
+		}
 	} else {
-		/* must be new id scheme */
+		/* non ARM -> must be new id scheme */
 		cpuinfo.architecture = (cpuinfo.midr >> 16) & 0x0F;
 		cpuinfo.revision = (cpuinfo.midr >> 20) & 0x0F;
 	}	


More information about the svn-src-all mailing list