MicrOS
|
Classes | |
union | magic_union |
Functions | |
uint8_t | cpuid_init () |
Initialization of CPUID. More... | |
uint32_t | cpuid_get_highest_function_parameter () |
Get highest function parameter. More... | |
char * | cpuid_get_vendor_string (char *buffer) |
Get vendor string. More... | |
uint8_t | cpuid_get_stepping_id () |
Get stepping id. More... | |
uint8_t | cpuid_get_model_id () |
Get model id. More... | |
uint8_t | cpuid_get_family_id () |
Get family id. More... | |
uint8_t | cpuid_get_processor_type () |
Get processor type. More... | |
uint8_t | cpuid_is_hyperthreading_available () |
Check if Hyper-Threading is available. More... | |
uint8_t | cpuid_number_of_logical_processors () |
Get number of logical processors. More... | |
uint8_t | cpuid_number_of_physical_processors_cores () |
Get number of physical processors cores. More... | |
uint8_t | cpuid_get_valid_number_cache_entries () |
Get number of valid cache entries. More... | |
uint32_t | cpuid_get_cache_size_in_bytes (uint8_t cache_index) |
Get cache size in bytes. More... | |
cpuid_cache_struct | cpuid_get_cache_data (uint8_t cache_index) |
Get cache data. More... | |
const cpuid_0x00h * | cpuid_get_0x00h_fields () |
Get 0x00h fields. More... | |
const cpuid_0x01h * | cpuid_get_0x01h_fields () |
Get 0x01h fields. More... | |
const cpuid_0x04h * | cpuid_get_0x04h_fields (uint8_t index) |
Get 0x04h fields. More... | |
void | __cpuid_get_manufacturer_string () |
Helper function to get manufacturer id. More... | |
char * | __cpuid_get_processor_brand (char *buffer) |
Get prcessor brand. More... | |
Variables | |
cpuid_0x00h | __cpuid_0x00h |
unsigned char | __cpuid_vendor_string [13] |
cpuid_0x01h | __cpuid_0x01h |
cpuid_0x04h | __cpuid_0x04h [10] |
uint8_t | __cpuid_0x04h_vaild_index = 0 |
void __cpuid_get_manufacturer_string | ( | ) |
Helper function to get manufacturer id.
Put vendor string in __cpuid_vendor_string variable.
char* __cpuid_get_processor_brand | ( | char * | buffer | ) |
Get prcessor brand.
Function copy procesor brand to buffer and terminate string with /0.
buffer | Buffer for vendor string with size at least 48. |
const cpuid_0x00h* cpuid_get_0x00h_fields | ( | ) |
Get 0x00h fields.
const cpuid_0x01h* cpuid_get_0x01h_fields | ( | ) |
Get 0x01h fields.
Result will be valid only if cpuid_get_highest_function_parameter() returns value 1 or higher.
const cpuid_0x04h* cpuid_get_0x04h_fields | ( | uint8_t | index | ) |
Get 0x04h fields.
Result will be valid only if cpuid_get_highest_function_parameter() returns value 4 or higher.
index | Index of struct to return. |
cpuid_cache_struct cpuid_get_cache_data | ( | uint8_t | cache_index | ) |
Get cache data.
Result will be valid only if cpuid_get_highest_function_parameter() returns value 4 or higher.
cache_index | Index of cache to return. To get max number use cpuid_get_valid_number_cache_entries(). If invalid 0 will be returned. |
uint32_t cpuid_get_cache_size_in_bytes | ( | uint8_t | cache_index | ) |
Get cache size in bytes.
Result will be valid only if cpuid_get_highest_function_parameter() returns value 4 or higher.
cache_index | Index of cache to return. To get max number use cpuid_get_valid_number_cache_entries(). If invalid 0 will be returned. |
uint8_t cpuid_get_family_id | ( | ) |
Get family id.
Result will be valid only if cpuid_get_highest_function_parameter() returns value 1 or higher.
uint32_t cpuid_get_highest_function_parameter | ( | ) |
Get highest function parameter.
Indicates how many function parameters CPUID supports. You should use it to determine how much data you can aquire from CPUID functions.
uint8_t cpuid_get_model_id | ( | ) |
Get model id.
Result will be valid only if cpuid_get_highest_function_parameter() returns value 1 or higher.
uint8_t cpuid_get_processor_type | ( | ) |
Get processor type.
Result will be valid only if cpuid_get_highest_function_parameter() returns value 1 or higher.
uint8_t cpuid_get_stepping_id | ( | ) |
Get stepping id.
Result will be valid only if cpuid_get_highest_function_parameter() returns value 1 or higher.
uint8_t cpuid_get_valid_number_cache_entries | ( | ) |
Get number of valid cache entries.
Number that determines how much cache entries are stored. Used in function cpuid_get_cache_size_in_bytes(uint8_t cache_index), cpuid_get_cache_data(uint8_t cache_index).
Result will be valid only if cpuid_get_highest_function_parameter() returns value 4 or higher.
char* cpuid_get_vendor_string | ( | char * | buffer | ) |
Get vendor string.
Function copy vendor string to buffer and terminate string with /0.
buffer | Buffer for vendor string with size at least 13. |
uint8_t cpuid_init | ( | ) |
Initialization of CPUID.
Sets internal variables.
uint8_t cpuid_is_hyperthreading_available | ( | ) |
Check if Hyper-Threading is available.
Result will be valid only if cpuid_get_highest_function_parameter() returns value 1 or higher.
uint8_t cpuid_number_of_logical_processors | ( | ) |
Get number of logical processors.
Addressable IDs for logical processors in the same Package. Valid if Hyper-Threading is enabled.
Result will be valid only if cpuid_get_highest_function_parameter() returns value 1 or higher.
uint8_t cpuid_number_of_physical_processors_cores | ( | ) |
Get number of physical processors cores.
Addressable IDs for physical processors cores in a physical package. Result will be valid only if cpuid_get_highest_function_parameter() returns value 4 or higher.
cpuid_0x00h __cpuid_0x00h |
cpuid_0x01h __cpuid_0x01h |
cpuid_0x04h __cpuid_0x04h[10] |
uint8_t __cpuid_0x04h_vaild_index = 0 |
unsigned char __cpuid_vendor_string[13] |