Changeset b52da8d7 in mainline for src/main/main.c
- Timestamp:
- 2005-08-29T11:57:26Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c245372b
- Parents:
- 229d5fc1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/main.c
r229d5fc1 rb52da8d7 98 98 config.cpu_count = 1; 99 99 config.cpu_active = 1; 100 size_t size, delta; 101 102 /* 103 * Calculate 'size' that kernel and heap occupies in memory. 104 */ 105 size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE; 106 107 /* 108 * We need the boot stack to start on page boundary. 109 * That is why 'delta' is calculated. 110 */ 111 delta = PAGE_SIZE - ((hardcoded_load_address + size) % PAGE_SIZE); 112 delta = (delta == PAGE_SIZE) ? 0 : delta; 113 114 size += delta; 100 115 101 116 config.base = hardcoded_load_address; 102 117 config.memory_size = get_memory_size(); 103 config.kernel_size = hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE+ CONFIG_STACK_SIZE;118 config.kernel_size = size + CONFIG_STACK_SIZE; 104 119 105 120 context_save(&ctx); 106 context_set(&ctx, FADDR(main_bsp_separated_stack), config.base + hardcoded_ktext_size + hardcoded_kdata_size + CONFIG_HEAP_SIZE, CONFIG_STACK_SIZE);121 context_set(&ctx, FADDR(main_bsp_separated_stack), config.base + size, CONFIG_STACK_SIZE); 107 122 context_restore(&ctx); 108 123 /* not reached */
Note:
See TracChangeset
for help on using the changeset viewer.