|
MentOS
0.8.0
The Mentoring Operating System
|
Structures and functions to handle the CPUID. More...
Go to the source code of this file.
Classes | |
| struct | cpuinfo_t |
| Contains the information concerning the CPU. More... | |
Macros | |
| #define | ECX_FLAGS_SIZE 24 |
| Dimension of the exc flags. | |
| #define | EDX_FLAGS_SIZE 32 |
| Dimension of the edx flags. | |
Typedefs | |
| typedef struct cpuinfo_t | cpuinfo_t |
| Contains the information concerning the CPU. | |
Functions | |
| void | get_cpuid (cpuinfo_t *cpuinfo) |
| Main CPUID procedure. More... | |
| void | call_cpuid (pt_regs *registers) |
| Actual CPUID call. More... | |
| void | cpuid_write_vendor (cpuinfo_t *cpuinfo, pt_regs *registers) |
| Extract vendor string. More... | |
| void | cpuid_write_proctype (cpuinfo_t *cpuinfo, pt_regs *registers) |
| void | cpuid_feature_ecx (cpuinfo_t *cpuinfo, uint32_t ecx) |
| EAX=1, ECX contains a list of supported features. More... | |
| void | cpuid_feature_edx (cpuinfo_t *cpuinfo, uint32_t edx) |
| EAX=1, EDX contains a list of supported features. More... | |
| uint32_t | cpuid_get_byte (uint32_t reg, uint32_t position, uint32_t value) |
| Extract single byte from a register. More... | |
| char * | cpuid_brand_index (pt_regs *f) |
| Index of brand strings. TODO: Document. More... | |
| char * | cpuid_brand_string (pt_regs *f) |
| Brand string is contained in EAX, EBX, ECX and EDX. More... | |
Variables | |
| cpuinfo_t | sinfo |
| This will be populated with the information concerning the CPU. | |
Structures and functions to handle the CPUID.
CPUID instruction (identified by a CPUID opcode) is a processor supplementary instruction (its name derived from CPU IDentification) allowing software to discover details of the processor.
| void call_cpuid | ( | pt_regs * | registers | ) |
Actual CPUID call.
| registers | The registers to fill with the result of the call. |
| char* cpuid_brand_index | ( | pt_regs * | f | ) |
Index of brand strings. TODO: Document.
| f | Stack frame. |
| char* cpuid_brand_string | ( | pt_regs * | f | ) |
Brand string is contained in EAX, EBX, ECX and EDX.
| f | Stack frame. |
EAX=1, ECX contains a list of supported features.
| cpuinfo | |
| ecx |
EAX=1, EDX contains a list of supported features.
| cpuinfo | |
| edx |
Extract single byte from a register.
| reg | |
| position | |
| value |
| cpuinfo | |
| registers |
CPUID is called with EAX=1 EAX contains Type, Family, Model and Stepping ID EBX contains the Brand Index if supported, and the APIC ID ECX/EDX contains feature information
Extract vendor string.
| cpuinfo | The struct containing the CPUID infos. |
| registers | The registers. |
| void get_cpuid | ( | cpuinfo_t * | cpuinfo | ) |
Main CPUID procedure.
| cpuinfo | Structure to fill with CPUID information. |