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
-4
@@ -117,7 +117,6 @@ func ParseAssetJSON(content []byte, pcieSlotDeviceNames map[int]string, pcieSlot
|
||||
}
|
||||
|
||||
// Parse CPU info
|
||||
seenMicrocode := make(map[string]bool)
|
||||
for i, cpu := range asset.CpuInfo {
|
||||
config.CPUs = append(config.CPUs, models.CPU{
|
||||
Socket: i,
|
||||
@@ -133,13 +132,11 @@ func ParseAssetJSON(content []byte, pcieSlotDeviceNames map[int]string, pcieSlot
|
||||
PPIN: cpu.PPIN,
|
||||
})
|
||||
|
||||
// Add CPU microcode to firmware list (deduplicated)
|
||||
if cpu.MicroCodeVer != "" && !seenMicrocode[cpu.MicroCodeVer] {
|
||||
if cpu.MicroCodeVer != "" {
|
||||
config.Firmware = append(config.Firmware, models.FirmwareInfo{
|
||||
DeviceName: fmt.Sprintf("CPU%d Microcode", i),
|
||||
Version: cpu.MicroCodeVer,
|
||||
})
|
||||
seenMicrocode[cpu.MicroCodeVer] = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user