X-Git-Url: https://rtime.felk.cvut.cz/gitweb/l4.git/blobdiff_plain/06f25c3cb5b018671acea414e77646acd5ef566c..c02c23b58bcb65fea74d86d33bcc1b094ef97902:/kernel/fiasco/src/kern/ia32/config-ia32.cpp diff --git a/kernel/fiasco/src/kern/ia32/config-ia32.cpp b/kernel/fiasco/src/kern/ia32/config-ia32.cpp index 0533587f1..8a32b753f 100644 --- a/kernel/fiasco/src/kern/ia32/config-ia32.cpp +++ b/kernel/fiasco/src/kern/ia32/config-ia32.cpp @@ -12,75 +12,69 @@ public: // can access user memory directly Access_user_mem = Access_user_mem_direct, - Max_num_dirqs = 128, - /// Timer vector used with APIC timer or IOAPIC Apic_timer_vector = APIC_IRQ_BASE + 0, }; - enum + static unsigned scheduler_irq_vector; + + enum Scheduler_config { SCHED_PIT = 0, SCHED_RTC, SCHED_APIC, SCHED_HPET, - }; - - static unsigned scheduler_irq_vector; -#ifdef CONFIG_IO_PROT - static const bool enable_io_protection = true; -#else - static const bool enable_io_protection = false; +#ifdef CONFIG_SCHED_PIT + Scheduler_mode = SCHED_PIT, + Scheduler_granularity = 1000U, + Default_time_slice = 10 * Scheduler_granularity, #endif -#ifdef CONFIG_SCHED_PIT - static const unsigned scheduler_mode = SCHED_PIT; - static const unsigned scheduler_granularity = 1000U; - static const unsigned default_time_slice = 10 * scheduler_granularity; +#ifdef CONFIG_ONE_SHOT + Scheduler_one_shot = true, +#else + Scheduler_one_shot = false, #endif #ifdef CONFIG_SCHED_RTC - static const unsigned scheduler_mode = SCHED_RTC; + Scheduler_mode = SCHED_RTC, # ifdef CONFIG_SLOW_RTC - static const unsigned scheduler_granularity = 15625U; - static const unsigned default_time_slice = 10 * scheduler_granularity; + Scheduler_granularity = 15625U, # else - static const unsigned scheduler_granularity = 976U; - static const unsigned default_time_slice = 10 * scheduler_granularity; + Scheduler_granularity = 976U, # endif -#endif - -#ifdef CONFIG_ONE_SHOT - static const bool scheduler_one_shot = true; -#else - static const bool scheduler_one_shot = false; + Default_time_slice = 10 * Scheduler_granularity, #endif #ifdef CONFIG_SCHED_APIC - static const unsigned scheduler_mode = SCHED_APIC; + Scheduler_mode = SCHED_APIC, # ifdef CONFIG_ONE_SHOT - static const unsigned scheduler_granularity = 1U; - static const unsigned default_time_slice = 10000 * scheduler_granularity; + Scheduler_granularity = 1U, + Default_time_slice = 10000 * Scheduler_granularity, # else - static const unsigned scheduler_granularity = 1000U; - static const unsigned default_time_slice = 10 * scheduler_granularity; + Scheduler_granularity = 1000U, + Default_time_slice = 10 * Scheduler_granularity, # endif #endif #ifdef CONFIG_SCHED_HPET - static const unsigned scheduler_mode = SCHED_HPET; - static const unsigned scheduler_granularity = 1000U; - static const unsigned default_time_slice = 10 * scheduler_granularity; + Scheduler_mode = SCHED_HPET, + Scheduler_granularity = 1000U, + Default_time_slice = 10 * Scheduler_granularity, #endif + }; -#ifdef CONFIG_POWERSAVE_GETCHAR - static const bool getchar_does_hlt = true; + enum + { + Pic_prio_modify = true, +#ifdef CONFIG_SYNC_TSC + Kip_timer_uses_rdtsc = true, #else - static const bool getchar_does_hlt = false; + Kip_timer_uses_rdtsc = false, #endif + }; - static bool getchar_does_hlt_works_ok; static bool apic; #ifdef CONFIG_WATCHDOG @@ -91,14 +85,6 @@ public: // static const bool hlt_works_ok = false; static bool hlt_works_ok; - static const bool pic_prio_modify = true; -#ifdef CONFIG_SYNC_TSC - static const bool kinfo_timer_uses_rdtsc = true; -#else - static const bool kinfo_timer_uses_rdtsc = false; -#endif - - static const bool old_sigma0_adapter_hack = false; // the default uart to use for serial console static const unsigned default_console_uart = 1; @@ -122,7 +108,6 @@ bool Config::hlt_works_ok = true; bool Config::found_vmware = false; char const Config::char_micro = '\265'; bool Config::apic = false; -bool Config::getchar_does_hlt_works_ok = false; unsigned Config::scheduler_irq_vector; #ifdef CONFIG_WATCHDOG @@ -139,9 +124,6 @@ const char *const Config::kernel_warn_config_string = #ifndef CONFIG_NDEBUG " CONFIG_NDEBUG is off\n" #endif -#ifdef CONFIG_PROFILE - " CONFIG_PROFILE is on\n" -#endif #ifndef CONFIG_NO_FRAME_PTR " CONFIG_NO_FRAME_PTR is off\n" #endif @@ -177,12 +159,7 @@ Config::init_arch() if (Koptions::o()->opt(Koptions::F_apic)) apic = true; - if (scheduler_mode == SCHED_APIC) + if (Scheduler_mode == SCHED_APIC) apic = true; } -#ifdef CONFIG_IO_PROT -#include -KIP_KERNEL_FEATURE("io_prot"); -#endif -