sys/arm/arm/identcpu-v4.c: fix identify_arm_cpu()
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 :-) Reviewed by: manu Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D9460
This commit is contained in:
parent
db6a9c12ba
commit
59cd18b093
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=313343
@ -294,8 +294,7 @@ u_int cpu_pfr(int num)
|
|||||||
void
|
void
|
||||||
identify_arm_cpu(void)
|
identify_arm_cpu(void)
|
||||||
{
|
{
|
||||||
u_int cpuid;
|
u_int cpuid, ctrl;
|
||||||
u_int8_t ctrl;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ctrl = cpu_get_control();
|
ctrl = cpu_get_control();
|
||||||
|
Loading…
Reference in New Issue
Block a user