From d029cb6152ecc692603ec44312805f84aa4f0140 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Tue, 4 Oct 2016 12:01:08 +0000 Subject: [PATCH] Read the Multiprocessing Extensions bit from the Multiprocessor Affinity register. Sponsored by: ABT Systems Ltd X-Differential Revision: https://reviews.freebsd.org/D8092 --- sys/arm/arm/cpuinfo.c | 2 ++ sys/arm/include/cpuinfo.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/sys/arm/arm/cpuinfo.c b/sys/arm/arm/cpuinfo.c index b2d96a7b3ef1..405774df075e 100644 --- a/sys/arm/arm/cpuinfo.c +++ b/sys/arm/arm/cpuinfo.c @@ -131,6 +131,8 @@ cpuinfo_init(void) cpuinfo.generic_timer_ext = (cpuinfo.id_pfr1 >> 16) & 0xF; cpuinfo.virtualization_ext = (cpuinfo.id_pfr1 >> 12) & 0xF; cpuinfo.security_ext = (cpuinfo.id_pfr1 >> 4) & 0xF; + /* mpidr */ + cpuinfo.mp_ext = (cpuinfo.mpidr >> 31u) & 0x1; /* L1 Cache sizes */ if (CPU_CT_FORMAT(cpuinfo.ctr) == CPU_CT_ARMV7) { diff --git a/sys/arm/include/cpuinfo.h b/sys/arm/include/cpuinfo.h index 210e4324902b..63043906d44f 100644 --- a/sys/arm/include/cpuinfo.h +++ b/sys/arm/include/cpuinfo.h @@ -105,6 +105,9 @@ struct cpuinfo { int dcache_line_mask; int icache_line_size; int icache_line_mask; + + /* mpidr */ + int mp_ext; }; extern struct cpuinfo cpuinfo;