Rev 1729 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1729 | Rev 1757 | ||
|---|---|---|---|
| Line 85... | Line 85... | ||
| 85 | #include <arch/smp/mps.h> |
85 | #include <arch/smp/mps.h> |
| 86 | #endif /* CONFIG_SMP */ |
86 | #endif /* CONFIG_SMP */ |
| 87 | #include <smp/smp.h> |
87 | #include <smp/smp.h> |
| 88 | 88 | ||
| 89 | /** Global configuration structure. */ |
89 | /** Global configuration structure. */ |
| 90 | config_t config = { |
90 | config_t config; |
| 91 | .mm_initialized = false |
- | |
| 92 | }; |
- | |
| 93 | 91 | ||
| 94 | /** Initial user-space tasks */ |
92 | /** Initial user-space tasks */ |
| 95 | init_t init = { |
93 | init_t init = { |
| 96 | 0 |
94 | 0 |
| 97 | }; |
95 | }; |
| 98 | 96 | ||
| 99 | context_t ctx; |
97 | context_t ctx; |
| 100 | 98 | ||
| 101 | /** |
99 | /* |
| 102 | * These 'hardcoded' variables will be intialized by |
100 | * These 'hardcoded' variables will be intialized by |
| 103 | * the linker or the low level assembler code with |
101 | * the linker or the low level assembler code with |
| 104 | * appropriate sizes and addresses. |
102 | * appropriate sizes and addresses. |
| 105 | */ |
103 | */ |
| 106 | __address hardcoded_load_address = 0; |
104 | __address hardcoded_load_address = 0; /**< Virtual address of where the kernel is loaded. */ |
| 107 | size_t hardcoded_ktext_size = 0; |
105 | size_t hardcoded_ktext_size = 0; /**< Size of the kernel code in bytes. */ |
| 108 | size_t hardcoded_kdata_size = 0; |
106 | size_t hardcoded_kdata_size = 0; /**< Size of the kernel data in bytes. */ |
| 109 | 107 | ||
| 110 | void main_bsp(void); |
108 | void main_bsp(void); |
| 111 | void main_ap(void); |
109 | void main_ap(void); |
| 112 | 110 | ||
| 113 | /* |
111 | /* |
| Line 199... | Line 197... | ||
| 199 | slab_cache_init(); |
197 | slab_cache_init(); |
| 200 | btree_init(); |
198 | btree_init(); |
| 201 | as_init(); |
199 | as_init(); |
| 202 | page_init(); |
200 | page_init(); |
| 203 | tlb_init(); |
201 | tlb_init(); |
| 204 | config.mm_initialized = true; |
- | |
| 205 | arch_post_mm_init(); |
202 | arch_post_mm_init(); |
| 206 | 203 | ||
| 207 | version_print(); |
204 | version_print(); |
| 208 | printf("%.*p: hardcoded_ktext_size=%zdK, hardcoded_kdata_size=%zdK\n", sizeof(__address) * 2, config.base, hardcoded_ktext_size >> 10, hardcoded_kdata_size >> 10); |
205 | printf("%.*p: hardcoded_ktext_size=%zdK, hardcoded_kdata_size=%zdK\n", sizeof(__address) * 2, config.base, hardcoded_ktext_size >> 10, hardcoded_kdata_size >> 10); |
| 209 | 206 | ||