Author
Updated
24 Feb 2024Form Number
LP1890PDF size
8 pages, 536 KBAbstract
Protected Processor Identification Number (PPIN) is a distinctive serial number assigned to each processor across both Intel and AMD platforms. Primarily employed in data centers and multi-socket servers, it facilitates the intuitive identification of a specific CPU, particularly in troubleshooting scenarios. Previously, PPIN numbers were only visible in Machine Check Exception (MCE) logs and would be printed only when an error occurred. Now, with the PPIN feature enabled, accessing the PPIN number has become more convenient via the generic interface (sysfs).
This paper offers guidance on enabling PPIN and outlines the process of obtaining the PPIN number. It is intended for Linux administrators seeking to trace a particular processor on a ThinkSystem server. All configurations are based on RHEL 9.1 and utilize AMD CPUs.
Change History
Changes in the February 24, 2024 update:
- Updated Figure 2 and information about obtaining the PPIN by using XCC - PPIN setup in UEFI section
Introduction
Both Intel and AMD processors all have serial number assigned to them, known as the Protected Processor Identification Number (PPIN). This number makes it easy to identify a specific CPU, which is particularly useful in troubleshooting scenarios.
PPIN is calculated based on the physical characteristics of different chips and added in the factory using fuses on the silicon die. Fuses are one-time programmable devices on a chip used to configure or set specific functionalities during the chip manufacturing process. Once set, the fuses cannot be altered, ensuring PPIN uniqueness and security within the same CPU series. However, the uniqueness of the PPIN number is only guaranteed within the same series of CPUs. In different CPU series, PPIN numbers may be duplicated. PPIN is unique to physical cores, logical cores on the same physical core share the same PPIN.
The algorithm developed by CPU vendors calculates a unique PPIN number based on the hardware characteristics of the processor and other factors. Typically, the generated PPIN is linked to the processor's unique serial number.
The software can communicate with the processor through specific instructions or interfaces and request to obtain the PPIN number. This usually requires the operating system or application program to provide corresponding functional interfaces. Through the specified interface, the software can read the PPIN number from the processor.
Linux kernel version 5.18 and later introduces a new sysfs interface to acquire PPIN number. Users can acquire PPIN by reading /sys/devices/system/cpu/cpuX/topology/ppin when enabling PPIN feature.
PPIN setup in UEFI
The PPIN feature can be enabled by following steps:
- In System Setup (F1 at boot), enter the UEFI System Configuration and Boot Management as shown in Figure 1:
- From the BIOS setup menu path, select System Information > AMD CBS GN > CPU Common Options and set PPIN Opt-in to Enable to enable the PPIN feature as shown in Figure 2.
- Save your changes and exit the UEFI System Configuration menu.
- Once the kernel boots up, you can acquire each of processor’s PPIN number by reading the kernel sysfs interface at /sys/devices/system/cpu/cpuX/topology/ppin. Each processor has own unique PPIN number.
Alternatively, you can acquire it via XCC/XCC2 using OneCLI commands. See the following page for details:
https://pubs.lenovo.com/sr630-v3/enable_intel_on_demand#reading-ppin
Note: In some platform, PPIN Opt-in is hidden, it is enabled by default.
PPIN working model in the Linux kernel
PPIN working model is shown as in Figure 3.
At the hardware level, when PPIN is enabled, the PPIN algorithm generates PPIN based on hardware features and stores it in efuse. When the CPU powers on, this is directly reflected in the CPU's MSR registers.
At the kernel level, during CPU initialization, the kernel reads the values from the MSR registers and stores PPIN into the software cpuinfo_x86 structure. The PPIN in this structure is then provided to the created sysfs and MCE (Machine Check Error) software components.
At the user level, PPIN can be obtained through both active and passive methods. In the active method, users can retrieve PPIN by reading /sys/device/system/cpu/cpuX/topology/ppin. In the passive method, MCE generally adopts a passive approach. When the system detects an error, it triggers MCE and inputs PPIN information into MCE log files. However, this paper mainly describes how to obtain PPIN using the active method.
Support scope
The Linux kernel supports PPIN starting from Version 5.18.
All ThinkSystem servers with Intel Xeon Scalable processors or AMD EPYC processors support PPIN.
Troubleshooting
If you cannot acquire PPIN number under the /sys/devices/system/cpu/cpuX/topology/ppin, you can use the following steps to do troubleshooting.
- Check kernel version
Use the command uname -a to check whether your kernel version >= 5.18. If not, upgrade kernel please.
- Check CPU platform
Use lscpu command to check whether your CPU platform supports PPIN feature. For Intel platform, it needs Xeon or later platforms to support this feature. For AMD platform, it needs EPYC or later platforms.
- Check whether PPIN feature is enabled
For Intel if PPIN feature is enabled, lscpu | grep ppin has the intel_ppin flag as shown in Figure 4:
Figure 4. CPU flags for Intel ppinFor AMD, if PPIN feature is enabled, lscpu | grep ppin has the amd_ppin flag as shown in Figure 5:
References
For more information, see the following web pages:
- Linux kernel 5.18
https://kernelnewbies.org/Linux_5.18 - Convenient Intel PPIN Reporting To Come With Linux 5.18
https://www.phoronix.com/news/Intel-PPIN-Linux-5.18 - AMD Plumbing Linux Support For Reading The CPU's Protected Processor Identification Number (PPIN)
https://www.phoronix.com/news/AMD-PPIN-Processor-ID-Linux
Author
Dong Wang is a Linux engineer in the Lenovo Infrastructure Solution Group in Beijing, China.
Thanks to the following people for their contributions to this project:
- Adrian Huang, Lenovo OS engineer, Lenovo ISG, Taiwan
Trademarks
Lenovo and the Lenovo logo are trademarks or registered trademarks of Lenovo in the United States, other countries, or both. A current list of Lenovo trademarks is available on the Web at https://www.lenovo.com/us/en/legal/copytrade/.
The following terms are trademarks of Lenovo in the United States, other countries, or both:
Lenovo®
ThinkSystem®
The following terms are trademarks of other companies:
AMD and AMD EPYC™ are trademarks of Advanced Micro Devices, Inc.
Intel® and Xeon® are trademarks of Intel Corporation or its subsidiaries.
Linux® is the trademark of Linus Torvalds in the U.S. and other countries.
Other company, product, or service names may be trademarks or service marks of others.
Configure and Buy
Full Change History
Changes in the February 24, 2024 update:
- Updated Figure 2 and information about obtaining the PPIN by using XCC - PPIN setup in UEFI section
First published: February 1, 2024
Course Detail
Employees Only Content
The content in this document with a is only visible to employees who are logged in. Logon using your Lenovo ITcode and password via Lenovo single-signon (SSO).
The owner of the document has determined that this content is classified as Lenovo Internal and should not be normally be made available to people who are not employees or contractors. This includes partners, customers, and competitors. The reasons may vary and you should reach out to the authors of the document for clarification, if needed. Be cautious about sharing this content with others as it may contain sensitive information.
Any visitor to the Lenovo Press web site who is not logged on will not be able to see this employee-only content. This content is excluded from search engine indexes and will not appear in any search results.
For all users, including logged-in employees, this employee-only content does not appear in the PDF version of this document.
This functionality is cookie based. The web site will normally remember your login state between browser sessions, however, if you clear cookies at the end of a session or work in an Incognito/Private browser window, then you will need to log in each time.
If you have any questions about this feature of the Lenovo Press web, please email David Watts at dwatts@lenovo.com.