Rev 813 | Rev 820 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 813 | Rev 815 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | #include <mm/frame.h> |
30 | #include <mm/frame.h> |
31 | #include <config.h> |
31 | #include <config.h> |
32 | 32 | ||
33 | void frame_arch_init(void) |
33 | void frame_arch_init(void) |
34 | { |
34 | { |
- | 35 | zone_create(0, config.memory_size >> FRAME_WIDTH, 1, 0); |
|
- | 36 | ||
35 | /* |
37 | /* |
36 | * Workaround to prevent slab allocator from allocating frame 0. |
38 | * Workaround to prevent slab allocator from allocating frame 0. |
37 | * Frame 0 is |
39 | * Frame 0 is |
38 | * a) not mapped by OFW |
40 | * a) not mapped by OFW |
39 | * b) would be confused with NULL error return code |
41 | * b) would be confused with NULL error return code |
40 | */ |
42 | */ |
41 | frame_region_not_free(0, FRAME_SIZE); |
43 | frame_mark_unavailable(0, 1); |
42 | - | ||
43 | zone_create_in_region(0, config.memory_size & ~(FRAME_SIZE - 1)); |
- | |
44 | } |
44 | } |