![]() |
FrostWing
A lightweight raw-control operating system.
|
The CPUID instructions. More...


Go to the source code of this file.
Functions | |
| static int | cpuid_string (int code, int where[4]) |
| Executes the CPUID instruction with the given code and stores the results. | |
| cstring | cpu_string () |
| Returns a string representing the CPU type. | |
| void | cpuid (int32 reg, int32 *eax, int32 *ebx, int32 *ecx, int32 *edx) |
| Executes the CPUID instruction and retrieves values of the specified registers. | |
| cstring | get_cpu_vendor () |
| Retrieve the CPU vendor string. | |
| cstring | get_cpu_name () |
| Retrieve the CPU name. | |
| void | print_cpu_info () |
| Print CPU information, including the vendor and CPU string. | |
| void | print_L1_cache_info () |
| Retrieve and print L1 cache information. | |
| void | print_L2_cache_info () |
| Retrieve and print L2 cache information. | |
| void | print_L3_cache_info () |
| Retrieve and print L3 cache information. | |
The CPUID instructions.
Definition in file cpuid2.h.
| cstring cpu_string | ( | ) |
Returns a string representing the CPU type.
This function queries the CPU type using the cpuid instruction and returns a string representation of the CPU type.
|
inline |
Executes the CPUID instruction and retrieves values of the specified registers.
This function executes the CPUID instruction with the given register and stores the values in the provided pointers for EAX, EBX, ECX, and EDX registers.
| reg | The register to query with CPUID. |
| eax | Pointer to store the value of EAX register. |
| ebx | Pointer to store the value of EBX register. |
| ecx | Pointer to store the value of ECX register. |
| edx | Pointer to store the value of EDX register. |
|
inlinestatic |
Executes the CPUID instruction with the given code and stores the results.
This function executes the CPUID instruction with the specified code and stores the results in the provided array where.
| code | The CPUID code to query. |
| where | An integer array to store the result, with at least 4 elements. |
| cstring get_cpu_name | ( | ) |
Retrieve the CPU name.
| cstring get_cpu_vendor | ( | ) |
Retrieve the CPU vendor string.