Rev 815 | Rev 821 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 815 | Rev 820 | ||
---|---|---|---|
Line 27... | Line 27... | ||
27 | */ |
27 | */ |
28 | 28 | ||
29 | #include <arch/mm/frame.h> |
29 | #include <arch/mm/frame.h> |
30 | #include <mm/frame.h> |
30 | #include <mm/frame.h> |
31 | #include <config.h> |
31 | #include <config.h> |
- | 32 | #include <align.h> |
|
32 | 33 | ||
33 | void frame_arch_init(void) |
34 | void frame_arch_init(void) |
34 | { |
35 | { |
35 | zone_create(0, config.memory_size >> FRAME_WIDTH, 1, 0); |
36 | zone_create(0, config.memory_size >> FRAME_WIDTH, ADDR2PFN(ALIGN_UP(config.base + config.kernel_size + CONFIG_STACK_SIZE, FRAME_SIZE)), 0); |
36 | 37 | ||
37 | /* |
38 | /* |
38 | * Workaround to prevent slab allocator from allocating frame 0. |
39 | * Workaround to prevent slab allocator from allocating frame 0. |
39 | * Frame 0 is |
40 | * Frame 0 is |
40 | * a) not mapped by OFW |
41 | * a) not mapped by OFW |