fix(inspur): show microcode version for every CPU, not just the first
Dedup by version caused CPU1 Microcode to be omitted when both CPUs run the same version, leaving the firmware column blank for the second socket. Each CPU gets its own firmware entry keyed by index. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
f2c04cf0e8
commit
9505303d1d
+1
-3
@@ -102,7 +102,6 @@ func parseCPUInfo(text string, hw *models.HardwareConfig) {
|
||||
return
|
||||
}
|
||||
|
||||
seenMicrocode := make(map[string]bool)
|
||||
for _, proc := range cpuInfo.Processors {
|
||||
if proc.ProcStatus != 1 && proc.ConfigStatus != 1 {
|
||||
continue
|
||||
@@ -120,12 +119,11 @@ func parseCPUInfo(text string, hw *models.HardwareConfig) {
|
||||
TDP: proc.TDP,
|
||||
PPIN: proc.PPIN,
|
||||
})
|
||||
if proc.MicroCode != "" && !seenMicrocode[proc.MicroCode] {
|
||||
if proc.MicroCode != "" {
|
||||
hw.Firmware = append(hw.Firmware, models.FirmwareInfo{
|
||||
DeviceName: fmt.Sprintf("CPU%d Microcode", proc.ProcID),
|
||||
Version: proc.MicroCode,
|
||||
})
|
||||
seenMicrocode[proc.MicroCode] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user