Rev 1251 | Rev 1289 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1251 | Rev 1252 | ||
|---|---|---|---|
| Line 31... | Line 31... | ||
| 31 | #include <arch/mm/page.h> |
31 | #include <arch/mm/page.h> |
| 32 | #include <arch/types.h> |
32 | #include <arch/types.h> |
| 33 | #include <arch/interrupt.h> |
33 | #include <arch/interrupt.h> |
| 34 | #include <arch/asm.h> |
34 | #include <arch/asm.h> |
| 35 | #include <interrupt.h> |
35 | #include <interrupt.h> |
| - | 36 | #include <mm/as.h> |
|
| 36 | 37 | ||
| 37 | #include <config.h> |
38 | #include <config.h> |
| 38 | 39 | ||
| 39 | #include <memstr.h> |
40 | #include <memstr.h> |
| 40 | #include <mm/slab.h> |
41 | #include <mm/slab.h> |
| Line 198... | Line 199... | ||
| 198 | * the heap hasn't been initialized so far. |
199 | * the heap hasn't been initialized so far. |
| 199 | */ |
200 | */ |
| 200 | tss_p = &tss; |
201 | tss_p = &tss; |
| 201 | } |
202 | } |
| 202 | else { |
203 | else { |
| - | 204 | /* We are going to use malloc, which may return |
|
| - | 205 | * non boot-mapped pointer, initialize the CR3 register |
|
| - | 206 | * ahead of page_init */ |
|
| - | 207 | write_cr3((__address) AS_KERNEL->page_table); |
|
| - | 208 | ||
| 203 | tss_p = (struct tss *) malloc(sizeof(tss_t), FRAME_ATOMIC); |
209 | tss_p = (struct tss *) malloc(sizeof(tss_t), FRAME_ATOMIC); |
| 204 | if (!tss_p) |
210 | if (!tss_p) |
| 205 | panic("could not allocate TSS\n"); |
211 | panic("could not allocate TSS\n"); |
| 206 | } |
212 | } |
| 207 | 213 | ||