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)
Jan 14 2025, 2:32 AM
Unknown Object (File)
Jan 14 2025, 2:29 AM
Unknown Object (File)
Jan 11 2025, 11:28 PM
Unknown Object (File)
Jan 8 2025, 11:42 AM
Unknown Object (File)
Dec 16 2024, 11:35 PM
Unknown Object (File)
Dec 9 2024, 11:27 PM
Unknown Object (File)
Nov 13 2024, 2:54 AM
Unknown Object (File)
Oct 24 2024, 9:42 PM
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.