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)
Thu, Apr 11, 2:20 AM
Unknown Object (File)
Wed, Apr 10, 7:25 PM
Unknown Object (File)
Wed, Apr 10, 12:39 PM
Unknown Object (File)
Jan 17 2024, 5:12 AM
Unknown Object (File)
Jan 16 2024, 6:44 PM
Unknown Object (File)
Dec 24 2023, 10:29 AM
Unknown Object (File)
Dec 20 2023, 2:14 AM
Unknown Object (File)
Sep 17 2023, 9:46 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.