// 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
// 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;
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
#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
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 <feature.h>
-KIP_KERNEL_FEATURE("io_prot");
-#endif
-