]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/ppc32/config-ppc32.cpp
447a18cf073ec0d2ad06d1598212d88017bd1d89
[l4.git] / kernel / fiasco / src / kern / ppc32 / config-ppc32.cpp
1 INTERFACE [ppc32]:
2
3 #include <cstring>
4
5 EXTENSION class Config
6 {
7 public:
8   enum
9   {
10     // cannot access user memory directly
11     Access_user_mem = No_access_user_mem,
12
13     PAGE_SHIFT = ARCH_PAGE_SHIFT,
14     PAGE_SIZE  = 1 << PAGE_SHIFT,
15     PAGE_MASK  = ~(PAGE_SIZE - 1),
16
17     SUPERPAGE_SHIFT = 22,
18     SUPERPAGE_SIZE  = 1 << SUPERPAGE_SHIFT,
19     SUPERPAGE_MASK  = ~(SUPERPAGE_SIZE -1),
20     hlt_works_ok = 1,
21     Irq_shortcut = 0, //TODO: set
22   };
23
24   enum
25   {
26     Kmem_size     = 8*1024*1024, //8 MB
27     Htab_entries  = 8, //number of entries in page-table-entry group
28                        //, min=1, max=8
29   };
30
31   enum
32   {
33 #ifdef CONFIG_ONE_SHOT
34     scheduler_one_shot          = 1,
35     scheduler_granularity       = 1UL,
36     default_time_slice          = 10000 * scheduler_granularity,
37 #else
38     scheduler_one_shot          = 0,
39     scheduler_granularity       = 1000UL,
40     default_time_slice          = 10 * scheduler_granularity,
41 #endif
42   };
43
44   static unsigned const default_console_uart = 3;
45   static unsigned const default_console_uart_baudrate = 115200;
46   static const char char_micro;
47
48 //TODO: check values
49   static const bool getchar_does_hlt = true;
50   static const bool getchar_does_hlt_works_ok = true;
51
52 //TODO: check
53   static const bool enable_io_protection = false;
54 };
55
56
57 //---------------------------------------------------------------------------
58 IMPLEMENTATION [ppc32]:
59
60 char const Config::char_micro = '\265';
61 const char *const Config::kernel_warn_config_string = 0;
62 //static int Config::serial_esc;
63 //---------------------------------------------------------------------------
64 IMPLEMENTATION [ppc32 & serial]:
65
66 IMPLEMENT FIASCO_INIT
67 void Config::init()
68 {
69   serial_esc = SERIAL_ESC_IRQ;
70 }
71
72 //---------------------------------------------------------------------------
73 IMPLEMENTATION [ppc32 & !serial]:
74
75 IMPLEMENT FIASCO_INIT
76 void Config::init()
77 {}