Changeset aed4eca in mainline
- Timestamp:
- 2005-09-21T19:19:16Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 74b2f5bf
- Parents:
- 84dd253
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/main.c
r84dd253 raed4eca 81 81 82 82 /* 83 * Size of heap. 84 */ 85 static size_t heap_size; 86 87 /* 83 88 * Extra space on heap to make the stack start on page boundary. 84 89 */ … … 108 113 config.cpu_count = 1; 109 114 config.cpu_active = 1; 110 111 kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE; 115 config.base = hardcoded_load_address; 116 config.memory_size = get_memory_size(); 117 118 heap_size = CONFIG_HEAP_SIZE + (config.memory_size/FRAME_SIZE)*sizeof(frame_t); 119 120 kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + heap_size; 112 121 heap_delta = PAGE_SIZE - ((hardcoded_load_address + kernel_size) % PAGE_SIZE); 113 122 heap_delta = (heap_delta == PAGE_SIZE) ? 0 : heap_delta; 114 123 kernel_size += heap_delta; 115 124 116 config.base = hardcoded_load_address;117 config.memory_size = get_memory_size();118 125 config.kernel_size = kernel_size + CONFIG_STACK_SIZE; 119 126 120 127 context_save(&ctx); 121 early_mapping(config.base + hardcoded_ktext_size + hardcoded_kdata_size + heap_delta, CONFIG_STACK_SIZE + CONFIG_HEAP_SIZE);128 early_mapping(config.base + hardcoded_ktext_size + hardcoded_kdata_size + heap_delta, CONFIG_STACK_SIZE + heap_size); 122 129 context_set(&ctx, FADDR(main_bsp_separated_stack), config.base + kernel_size, CONFIG_STACK_SIZE); 123 130 context_restore(&ctx); … … 140 147 141 148 arch_pre_mm_init(); 142 heap_init(config.base + hardcoded_ktext_size + hardcoded_kdata_size, CONFIG_HEAP_SIZE+ heap_delta);149 heap_init(config.base + hardcoded_ktext_size + hardcoded_kdata_size, heap_size + heap_delta); 143 150 frame_init(); 144 151 page_init();
Note:
See TracChangeset
for help on using the changeset viewer.