]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/arm/config-arm.cpp
update
[l4.git] / kernel / fiasco / src / kern / arm / config-arm.cpp
1 /* ARM specific */
2 INTERFACE [arm]:
3
4 EXTENSION class Config
5 {
6 public:
7
8   enum
9   {
10     PAGE_SHIFT = ARCH_PAGE_SHIFT,
11     PAGE_SIZE  = 1 << PAGE_SHIFT,
12     PAGE_MASK  = ~(PAGE_SIZE - 1),
13
14     SUPERPAGE_SHIFT = 20,
15     SUPERPAGE_SIZE  = 1 << SUPERPAGE_SHIFT,
16     SUPERPAGE_MASK  = ~(SUPERPAGE_SIZE -1),
17
18     hlt_works_ok = 1,
19     Irq_shortcut = 1,
20   };
21
22   enum
23   {
24 #ifdef CONFIG_ONE_SHOT
25     scheduler_one_shot          = 1,
26     scheduler_granularity       = 1UL,
27     default_time_slice          = 10000 * scheduler_granularity,
28 #else
29     scheduler_one_shot          = 0,
30     scheduler_granularity       = 1000UL,
31     default_time_slice          = 10 * scheduler_granularity,
32 #endif
33   };
34
35   enum
36   {
37     KMEM_SIZE = 8 << 20,
38   };
39
40   // the default uart to use for serial console
41   static unsigned const default_console_uart    = 3;
42   static unsigned const default_console_uart_baudrate = 115200;
43
44   static const bool getchar_does_hlt = false;
45   static const bool getchar_does_hlt_works_ok = true;
46   static const char char_micro;
47   static const bool enable_io_protection = false;
48
49 #ifdef CONFIG_VMEM_ALLOC_TEST
50   static bool const VMEM_ALLOC_TEST = true;
51 #else
52   static bool const VMEM_ALLOC_TEST = false;
53 #endif
54
55   static const bool cache_enabled = true;
56
57   enum
58   {
59 #ifdef CONFIG_ARM_CA9_ENABLE_SWP
60     Cp15_c1_use_a9_swp_enable = 1,
61 #else
62     Cp15_c1_use_a9_swp_enable = 0,
63 #endif
64 #ifdef CONFIG_ARM_ALIGNMENT_CHECK
65     Cp15_c1_use_alignment_check = 1,
66 #else
67     Cp15_c1_use_alignment_check = 0,
68 #endif
69
70     Support_arm_linux_cache_API = 1,
71   };
72
73 };
74
75 //---------------------------------------------------------------------------
76 IMPLEMENTATION [arm]:
77
78 char const Config::char_micro = '\265';
79 const char *const Config::kernel_warn_config_string = 0;
80
81 //---------------------------------------------------------------------------
82 IMPLEMENTATION [arm && serial]:
83
84 IMPLEMENT FIASCO_INIT
85 void Config::init()
86 {
87   serial_esc = SERIAL_ESC_IRQ;
88 }
89
90
91 //---------------------------------------------------------------------------
92 IMPLEMENTATION [arm && !serial]:
93
94 IMPLEMENT FIASCO_INIT
95 void Config::init()
96 {}
97
98 //---------------------------------------------------------------------------
99 IMPLEMENTATION [armv6plus]:
100
101 #include "feature.h"
102
103 KIP_KERNEL_FEATURE("armv6plus");