Page MenuHomeFreeBSD

ARM: Use a 32-bit variable for control register instead of 8-bit

Authored by sgalabov on Feb 6 2017, 12:48 PM.



identify_arm_cpu() in sys/arm/arm/identcpu-v4.c incorrectly uses a u_int8_t variable to store the result of cpu_get_control().
It should really use a u_int variable, the same way as done for cpu_ident() in the same function, as both cpuid and control registers are 32-bit..
This issue causes users of identcpu-v4 to incorrectly report things such as icache status (bit 12 in cpu control register) and basically anything defined in bits above bit 7 :-)

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sgalabov updated this revision to Diff 24798.Feb 6 2017, 12:48 PM
sgalabov retitled this revision from to ARM: Use a 32-bit variable for control register instead of 8-bit.
sgalabov updated this object.
sgalabov edited the test plan for this revision. (Show Details)
sgalabov added a reviewer: ARM.
sgalabov set the repository for this revision to rS FreeBSD src repository.
manu accepted this revision.Feb 6 2017, 1:50 PM
manu added a reviewer: manu.
This revision is now accepted and ready to land.Feb 6 2017, 1:50 PM
This revision was automatically updated to reflect the committed changes.