Rev 2264 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2264 | Rev 2352 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | */ |
33 | */ |
34 | 34 | ||
35 | #include <mm/frame.h> |
35 | #include <mm/frame.h> |
36 | #include <arch/mm/frame.h> |
36 | #include <arch/mm/frame.h> |
37 | #include <config.h> |
37 | #include <config.h> |
- | 38 | #include <arch/debug/print.h> |
|
38 | 39 | ||
39 | uintptr_t last_frame = 0; |
40 | uintptr_t last_frame = 0; |
40 | 41 | ||
41 | /** Create memory zones. */ |
42 | /** Create memory zones. */ |
42 | void frame_arch_init(void) |
43 | void frame_arch_init(void) |
43 | { |
44 | { |
44 | // all memory as one zone |
45 | // all memory as one zone |
45 | zone_create(0, ADDR2PFN(config.memory_size), 2, 0); |
46 | zone_create(0, ADDR2PFN(config.memory_size), |
- | 47 | BOOT_PAGE_TABLE_START_FRAME + BOOT_PAGE_TABLE_SIZE_IN_FRAMES, 0); |
|
46 | last_frame = config.memory_size; |
48 | last_frame = config.memory_size; |
47 | 49 | ||
48 | // blacklist interrupt vector |
50 | // blacklist boot page table |
49 | frame_mark_unavailable(0, 1); |
51 | frame_mark_unavailable(BOOT_PAGE_TABLE_START_FRAME, BOOT_PAGE_TABLE_SIZE_IN_FRAMES); |
50 | } |
52 | } |
51 | 53 | ||
- | 54 | ||
- | 55 | /** Frees the boot page table. */ |
|
- | 56 | void boot_page_table_free(void) |
|
- | 57 | { |
|
- | 58 | int i; |
|
- | 59 | for (i = 0; i < BOOT_PAGE_TABLE_SIZE_IN_FRAMES; ++i) { |
|
- | 60 | frame_free (i * FRAME_SIZE + BOOT_PAGE_TABLE_ADDRESS); |
|
- | 61 | } |
|
- | 62 | } |
|
- | 63 | ||
- | 64 | ||
52 | /** @} |
65 | /** @} |
53 | */ |
66 | */ |