diff options
author | ian <ian@FreeBSD.org> | 2015-02-14 18:54:52 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2015-02-14 18:54:52 +0000 |
commit | 4b0d911e54f8831860581067a8706c9fbf80d189 (patch) | |
tree | 13e6859ac5b85d13eab0e57750c75bf07a753b98 /sys/arm | |
parent | a446d16b44627b23127cac21340b9efadb2d7ccd (diff) | |
download | FreeBSD-src-4b0d911e54f8831860581067a8706c9fbf80d189.zip FreeBSD-src-4b0d911e54f8831860581067a8706c9fbf80d189.tar.gz |
Add logic for handling new-style ARM cpu ID info.
Submitted by: Michal Meloun <meloun@miracle.cz>
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/cpuinfo.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arm/arm/cpuinfo.c b/sys/arm/arm/cpuinfo.c index d20c561..b0b8a88 100644 --- a/sys/arm/arm/cpuinfo.c +++ b/sys/arm/arm/cpuinfo.c @@ -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; } |