expose microcode level as property on strand topo nodes
Processors are represented in the hc-scheme topo tree as a hierarchy of chip/core/strand nodes where:
chip - processor package (1:1 relationship to socket)
core - individual processor code (N per chip)
strand - HW thread (N per core)
Each processor strand runs its own microcode. As we've seen with issues like Spectre and Meltdown, it can be important to know what microcode level a systems processors are at to determine if an upgrade is needed to bring in critical security fixes.
This CR is a minor change to the chip enumerator module to expose the processor microcode version as a property on the strand nodes.
Updated by Rob Johnston about 2 years ago
Rather than having the chip topo enumerator doing ioctl's on /dev/ucode,, we'll extend the payload of the FM_IOC_PHYSCPU_INFO ioctl for fmdev to include the microcode version. On the kernel side, the changes look like:
1) expose cpu->cpu_m.mcpu_ucode_info->cui_rev via new cpuid_get_ucode_rev() routine
2) extend cmi_hdl_ops to add an op for getting the microcode rev - basically a wrapper for cpuid_get_ucode_rev()
3) extend implementation of FM_IOC_PHYSCPU_INFO to get microcode rev via new cmi_hdl_ops routine
In userland, it should just be some small changes to the chip enumerator to add a uint32 prop for the microcode version.