Vystem 0.2
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "std/type.h"
|
||||
#include "std/status.h"
|
||||
#include "cpu/asm.h"
|
||||
#include "devs/devs.h"
|
||||
typedef sh_uint64 sh_tsc_TSC_VALUE;
|
||||
// Reas TSC register.
|
||||
static inline sh_tsc_TSC_VALUE sh_tsc_read_tsc() {
|
||||
@@ -15,4 +16,16 @@ SH_STATUS sh_tsc_init_tsc();
|
||||
sh_tsc_TSC_VALUE sh_tsc_get_kernel_init_tsc();
|
||||
// Return kernel current tsc.
|
||||
sh_tsc_TSC_VALUE sh_tsc_get_kernel_current_tsc();
|
||||
// Estimate CPU frequency using TSC and PIT
|
||||
sh_uint64 sh_tsc_estimate_cpu_freq();
|
||||
// Load CPU frequency
|
||||
void sh_tsc_load_cpu_freq(sh_uint64 cpu_freq);
|
||||
// Detect if CPUID provide hypervisor bit
|
||||
sh_bool sh_tsc_has_hypervisor();
|
||||
// Detect if CPUID provide TSC constant bit
|
||||
sh_bool sh_tsc_is_tsc_constant();
|
||||
// Return CPUID CPU frequence if available
|
||||
SH_STATUS sh_tsc_get_cpu_freq_cpuid(sh_uint64 *freq);
|
||||
// Parse a TSC DevS query
|
||||
SH_STATUS sh_tsc_devs_query(char *sub_path,sh_devs_RESULT *result);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user