Rev 727 | Rev 756 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 727 | Rev 755 | ||
|---|---|---|---|
| Line 75... | Line 75... | ||
| 75 | size_t hardcoded_kdata_size = 0; |
75 | size_t hardcoded_kdata_size = 0; |
| 76 | 76 | ||
| 77 | __address init_addr = 0; |
77 | __address init_addr = 0; |
| 78 | size_t init_size = 0; |
78 | size_t init_size = 0; |
| 79 | 79 | ||
| - | 80 | /** Kernel address space. */ |
|
| - | 81 | as_t *AS_KERNEL = NULL; |
|
| - | 82 | ||
| 80 | void main_bsp(void); |
83 | void main_bsp(void); |
| 81 | void main_ap(void); |
84 | void main_ap(void); |
| 82 | 85 | ||
| 83 | /* |
86 | /* |
| 84 | * These two functions prevent stack from underflowing during the |
87 | * These two functions prevent stack from underflowing during the |
| Line 150... | Line 153... | ||
| 150 | 153 | ||
| 151 | /* Exception handler initialization, before architecture |
154 | /* Exception handler initialization, before architecture |
| 152 | * starts adding its own handlers |
155 | * starts adding its own handlers |
| 153 | */ |
156 | */ |
| 154 | exc_init(); |
157 | exc_init(); |
| 155 | 158 | ||
| - | 159 | /* |
|
| - | 160 | * Memory management subsystems initialization. |
|
| - | 161 | */ |
|
| 156 | arch_pre_mm_init(); |
162 | arch_pre_mm_init(); |
| 157 | early_heap_init(config.heap_addr, config.heap_size + config.heap_delta); |
163 | early_heap_init(config.heap_addr, config.heap_size + config.heap_delta); |
| 158 | frame_init(); |
164 | frame_init(); |
| 159 | page_init(); |
165 | page_init(); |
| 160 | tlb_init(); |
166 | tlb_init(); |
| Line 183... | Line 189... | ||
| 183 | printf("config.init_addr=%X, config.init_size=%d\n", config.init_addr, config.init_size); |
189 | printf("config.init_addr=%X, config.init_size=%d\n", config.init_addr, config.init_size); |
| 184 | 190 | ||
| 185 | /* |
191 | /* |
| 186 | * Create kernel address space. |
192 | * Create kernel address space. |
| 187 | */ |
193 | */ |
| 188 | as = as_create(GET_PTL0_ADDRESS(), AS_KERNEL); |
194 | as = as_create(GET_PTL0_ADDRESS(), FLAG_AS_KERNEL); |
| 189 | if (!as) |
195 | if (!as) |
| 190 | panic("can't create kernel address space\n"); |
196 | panic("can't create kernel address space\n"); |
| 191 | 197 | ||
| 192 | /* |
198 | /* |
| 193 | * Create kernel task. |
199 | * Create kernel task. |