1 /* IA32/AMD64 specific */
12 // can access user memory directly
13 Access_user_mem = Access_user_mem_direct,
17 /// Timer vector used with APIC timer or IOAPIC
18 Apic_timer_vector = APIC_IRQ_BASE + 0,
29 static unsigned scheduler_irq_vector;
32 static const bool enable_io_protection = true;
34 static const bool enable_io_protection = false;
37 #ifdef CONFIG_SCHED_PIT
38 static const unsigned scheduler_mode = SCHED_PIT;
39 static const unsigned scheduler_granularity = 1000U;
40 static const unsigned default_time_slice = 10 * scheduler_granularity;
43 #ifdef CONFIG_SCHED_RTC
44 static const unsigned scheduler_mode = SCHED_RTC;
45 # ifdef CONFIG_SLOW_RTC
46 static const unsigned scheduler_granularity = 15625U;
47 static const unsigned default_time_slice = 10 * scheduler_granularity;
49 static const unsigned scheduler_granularity = 976U;
50 static const unsigned default_time_slice = 10 * scheduler_granularity;
54 #ifdef CONFIG_ONE_SHOT
55 static const bool scheduler_one_shot = true;
57 static const bool scheduler_one_shot = false;
60 #ifdef CONFIG_SCHED_APIC
61 static const unsigned scheduler_mode = SCHED_APIC;
62 # ifdef CONFIG_ONE_SHOT
63 static const unsigned scheduler_granularity = 1U;
64 static const unsigned default_time_slice = 10000 * scheduler_granularity;
66 static const unsigned scheduler_granularity = 1000U;
67 static const unsigned default_time_slice = 10 * scheduler_granularity;
71 #ifdef CONFIG_SCHED_HPET
72 static const unsigned scheduler_mode = SCHED_HPET;
73 static const unsigned scheduler_granularity = 1000U;
74 static const unsigned default_time_slice = 10 * scheduler_granularity;
77 #ifdef CONFIG_POWERSAVE_GETCHAR
78 static const bool getchar_does_hlt = true;
80 static const bool getchar_does_hlt = false;
83 static bool getchar_does_hlt_works_ok;
86 #ifdef CONFIG_WATCHDOG
89 static const bool watchdog = false;
92 // static const bool hlt_works_ok = false;
93 static bool hlt_works_ok;
94 static const bool pic_prio_modify = true;
95 #ifdef CONFIG_SYNC_TSC
96 static const bool kinfo_timer_uses_rdtsc = true;
98 static const bool kinfo_timer_uses_rdtsc = false;
101 static const bool old_sigma0_adapter_hack = false;
103 // the default uart to use for serial console
104 static const unsigned default_console_uart = 1;
105 static const unsigned default_console_uart_baudrate = 115200;
107 static char const char_micro;
109 static bool found_vmware;
116 IMPLEMENTATION[ia32,amd64]:
120 bool Config::hlt_works_ok = true;
122 bool Config::found_vmware = false;
123 char const Config::char_micro = '\265';
124 bool Config::apic = false;
125 bool Config::getchar_does_hlt_works_ok = false;
126 unsigned Config::scheduler_irq_vector;
128 #ifdef CONFIG_WATCHDOG
129 bool Config::watchdog = false;
132 const char *const Config::kernel_warn_config_string =
133 #ifdef CONFIG_SCHED_RTC
134 " CONFIG_SCHED_RTC is on\n"
136 #ifndef CONFIG_INLINE
137 " CONFIG_INLINE is off\n"
139 #ifndef CONFIG_NDEBUG
140 " CONFIG_NDEBUG is off\n"
142 #ifdef CONFIG_PROFILE
143 " CONFIG_PROFILE is on\n"
145 #ifndef CONFIG_NO_FRAME_PTR
146 " CONFIG_NO_FRAME_PTR is off\n"
148 #ifdef CONFIG_LIST_ALLOC_SANITY
149 " CONFIG_LIST_ALLOC_SANITY is on\n"
151 #ifdef CONFIG_BEFORE_IRET_SANITY
152 " CONFIG_BEFORE_IRET_SANITY is on\n"
154 #ifdef CONFIG_FINE_GRAINED_CPUTIME
155 " CONFIG_FINE_GRAINED_CPUTIME is on\n"
157 #ifdef CONFIG_JDB_ACCOUNTING
158 " CONFIG_JDB_ACCOUNTING is on\n"
162 IMPLEMENT FIASCO_INIT
166 #ifdef CONFIG_WATCHDOG
167 if (Koptions::o()->opt(Koptions::F_watchdog))
174 if (Koptions::o()->opt(Koptions::F_nohlt))
175 hlt_works_ok = false;
177 if (Koptions::o()->opt(Koptions::F_apic))
180 if (scheduler_mode == SCHED_APIC)
184 #ifdef CONFIG_IO_PROT
186 KIP_KERNEL_FEATURE("io_prot");