Page MenuHomeFreeBSD

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

Authored by sgalabov on Feb 6 2017, 12:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 26, 7:10 PM
Unknown Object (File)
Sat, Apr 25, 4:15 PM
Unknown Object (File)
Sat, Apr 25, 1:23 AM
Unknown Object (File)
Fri, Apr 24, 7:15 PM
Unknown Object (File)
Fri, Apr 24, 6:49 PM
Unknown Object (File)
Fri, Apr 24, 8:49 AM
Unknown Object (File)
Thu, Apr 23, 1:31 PM
Unknown Object (File)
Mon, Apr 20, 11:01 AM
Subscribers

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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 - subversion.
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.