MentOS
0.8.0
The Mentoring Operating System
|
CPUID-based function to detect CPU type. More...
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... | |
CPUID-based function to detect CPU type.
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. |