How do I obtain the serial number of the CPU in a PC?
Ivy Bridge CPUs and newer all include a PPIN (Protected Processor Identification Number). Access to this feature can be blocked by the computer's firmware.
https://lore.kernel.org/patchwork/patch/736614/