NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-sgimips/46311: sys/arch/sgimips/dev/imc.c refers to uninitialized mach_boardrev variable



>Number:         46311
>Category:       port-sgimips
>Synopsis:       sys/arch/sgimips/dev/imc.c refers to uninitialized 
>mach_boardrev variable
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-sgimips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 08 23:35:00 +0000 2012
>Originator:     Miod Vallat
>Release:        
>Organization:
>Environment:
>Description:
sys/arch/sgimips/dev/imc.c will select different settings depending upon the 
value of mach_boardrev, in the IP22/IP24 case. However this variable is never 
set in machdep.c on those systems (and has a value of zero).

The affected logic is borrowed from Linux, which uses the board revision 
computed from the IMC SysID register here.
>How-To-Repeat:
Code inspection.
>Fix:
Either initialize mach_boardrev in the IP22/IP24 case, or use the IMC SysID 
register instead of mach_boardrev in the arbitration logic.



Home | Main Index | Thread Index | Old Index