mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
timekeeper sources: add an option to disable each one of them
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <kernel/vmm.h>
|
||||
#include <kernel/interrupt.h>
|
||||
#include <arch/tsc.h>
|
||||
#include <kernel/cmdline.h>
|
||||
|
||||
#include <uacpi/acpi.h>
|
||||
#include <uacpi/tables.h>
|
||||
@@ -62,6 +63,9 @@ static void counterirq(isr_t *isr, context_t *context) {
|
||||
}
|
||||
|
||||
static bool hpet_probe(void) {
|
||||
if (cmdline_get("nohpet"))
|
||||
return false;
|
||||
|
||||
bool usable = false;
|
||||
struct acpi_hpet *table;
|
||||
uacpi_table tbl;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <arch/cpuid.h>
|
||||
#include <kernel/pmm.h>
|
||||
#include <arch/tsc.h>
|
||||
#include <kernel/cmdline.h>
|
||||
|
||||
#define KVM_TIMER_SYSTEM_TIME_ALIGNMENT 4
|
||||
#define KVM_TIMER_SYSTEM_TIME_ENABLE 1
|
||||
@@ -23,6 +24,9 @@ typedef struct {
|
||||
} __attribute__((packed)) kvm_timer_info_t;
|
||||
|
||||
static bool kvm_timer_probe(void) {
|
||||
if (cmdline_get("nokvmclock"))
|
||||
return false;
|
||||
|
||||
// figure out if we are running in kvm
|
||||
uint32_t base = cpuid_find_hypervisor_base_kvm();
|
||||
if (base == 0)
|
||||
|
||||
@@ -3,8 +3,13 @@
|
||||
#include <arch/cpuid.h>
|
||||
#include <logging.h>
|
||||
#include <kernel/alloc.h>
|
||||
#include <arch/hpet.h>
|
||||
#include <kernel/cmdline.h>
|
||||
|
||||
static bool tsc_probe(void) {
|
||||
if (cmdline_get("notsc"))
|
||||
return false;
|
||||
|
||||
cpuid_results_t cpuid_results;
|
||||
|
||||
uint32_t max_extended_leaf = cpuid_extended_max_leaf();
|
||||
|
||||
Reference in New Issue
Block a user