Method for judging SW hardware platform based on Linux kernel
The invention discloses a method for judging an SW hardware platform based on a Linux kernel. The method comprises the following steps of: confirming a CPU (Central Processing Unit) model of SW hardware equipment; cPU information is printed as a judgment basis in the process that the SW hardware equ...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a method for judging an SW hardware platform based on a Linux kernel. The method comprises the following steps of: confirming a CPU (Central Processing Unit) model of SW hardware equipment; cPU information is printed as a judgment basis in the process that the SW hardware equipment kernel starts and initializes the CPU; secondly, listing SW CPU types and hardware classification according to the main platform and the sub-platform, defining in a kernel, and initializing two enumeration structure types type1 and type2 according to the SW CPU types and the hardware types; according to a known CPU model and a CPU identification code obtained through printing, a code for platform judgment is added when the CPU type is detected in the early stage of kernel initialization, then the corresponding CPU model and type are distinguished according to unique cpuid and cpu index of different CPU hardware, and values are assigned to the types of a global variable main platform and a global variable sub |
---|