Commit 7c914258 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Revise WFE detection

Detail:
  s/CPUFeatures - Take account of the fact that single-core ARMv7+ chips implement MPIDR but aren't guaranteed to implement a useful WFE. So for ARMv7+, only report WFE as being available/useful if MPIDR indicates that virtualisation extensions are supported.
Admin:
  Tested on Raspberry Pi 1 & 3, BB-xM


Version 5.35, 4.79.2.322. Tagged as 'Kernel-5_35-4_79_2_322'
parent 0b904557
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.321"
Module_MinorVersion SETS "4.79.2.322"
Module_Date SETS "22 May 2016"
Module_ApplicationDate SETS "22-May-16"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.321)"
Module_HelpVersion SETS "5.35 (22 May 2016) 4.79.2.321"
Module_FullVersion SETS "5.35 (4.79.2.322)"
Module_HelpVersion SETS "5.35 (22 May 2016) 4.79.2.322"
END
......@@ -5,12 +5,12 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.321
#define Module_MinorVersion_CMHG 4.79.2.322
#define Module_Date_CMHG 22 May 2016
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.321"
#define Module_MinorVersion "4.79.2.322"
#define Module_Date "22 May 2016"
#define Module_ApplicationDate "22-May-16"
......@@ -18,6 +18,6 @@
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.321)"
#define Module_HelpVersion "5.35 (22 May 2016) 4.79.2.321"
#define Module_FullVersion "5.35 (4.79.2.322)"
#define Module_HelpVersion "5.35 (22 May 2016) 4.79.2.322"
#define Module_LibraryVersionInfo "5:35"
......@@ -250,9 +250,10 @@ CalcCPUFeatures ROUT
MRC p15, 0, r5, c0, c0, 1 ; Cache type register
TST r5, #1<<31 ; EQ = ARMv6, NE = ARMv7+
SetFeatureEQ Rotated_loads
; Guess whether WFE does something useful by whether we're a multicore chip (i.e. MPIDR is implemented)
; Guess whether WFE does something useful by whether we're a multicore chip
MRC p15, 0, r5, c0, c0, 5 ; MPIDR
MRC p15, 0, r6, c0, c0, 0 ; MIDR
MRCEQ p15, 0, r6, c0, c0, 0 ; ARMv6: Register is optional, so compare value against MIDR to see if it's implemented. There's no virtualisation extensions flag so assume the check against MIDR will be good enough.
BICNE r6, r5, #1<<31 ; ARMv7+: Register is mandatory, but useful WFE still not guaranteed. So check if virtualisation extensions implemented (bit 31 set).
TEQ r5, r6
SetFeatureNE WFE
; Detect instructions introduced by virtualisation extensions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment