Rev 4346 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4346 | Rev 4691 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | * @brief Frame related functions. |
33 | * @brief Frame related functions. |
34 | */ |
34 | */ |
35 | 35 | ||
36 | #include <mm/frame.h> |
36 | #include <mm/frame.h> |
37 | #include <arch/mm/frame.h> |
37 | #include <arch/mm/frame.h> |
38 | #include <arch/drivers/gxemul.h> |
- | |
39 | #include <config.h> |
38 | #include <config.h> |
40 | 39 | ||
- | 40 | #ifdef MACHINE_testarm |
|
- | 41 | #include <arch/mach/testarm/testarm.h> |
|
- | 42 | #endif |
|
- | 43 | ||
- | 44 | #ifdef MACHINE_integratorcp |
|
- | 45 | #include <arch/mach/integratorcp/integratorcp.h> |
|
- | 46 | #endif |
|
- | 47 | ||
41 | /** Address of the last frame in the memory. */ |
48 | /** Address of the last frame in the memory. */ |
42 | uintptr_t last_frame = 0; |
49 | uintptr_t last_frame = 0; |
43 | 50 | ||
44 | /** Creates memory zones. */ |
51 | /** Creates memory zones. */ |
45 | void frame_arch_init(void) |
52 | void frame_arch_init(void) |
46 | { |
53 | { |
47 | last_frame = *((uintptr_t *) (GXEMUL_MP_ADDRESS + GXEMUL_MP_MEMSIZE_OFFSET)); |
54 | last_frame = machine_get_memory_size(); |
48 | 55 | ||
49 | /* All memory as one zone */ |
56 | /* All memory as one zone */ |
50 | zone_create(0, ADDR2PFN(last_frame), |
57 | zone_create(0, ADDR2PFN(last_frame), |
51 | BOOT_PAGE_TABLE_START_FRAME + BOOT_PAGE_TABLE_SIZE_IN_FRAMES, 0); |
58 | BOOT_PAGE_TABLE_START_FRAME + BOOT_PAGE_TABLE_SIZE_IN_FRAMES, 0); |
52 | 59 | ||
53 | /* blacklist boot page table */ |
60 | /* blacklist boot page table */ |
54 | frame_mark_unavailable(BOOT_PAGE_TABLE_START_FRAME, |
61 | frame_mark_unavailable(BOOT_PAGE_TABLE_START_FRAME, |
55 | BOOT_PAGE_TABLE_SIZE_IN_FRAMES); |
62 | BOOT_PAGE_TABLE_SIZE_IN_FRAMES); |
- | 63 | ||
- | 64 | machine_frame_init(); |
|
56 | } |
65 | } |
57 | 66 | ||
58 | /** Frees the boot page table. */ |
67 | /** Frees the boot page table. */ |
59 | void boot_page_table_free(void) |
68 | void boot_page_table_free(void) |
60 | { |
69 | { |