Changeset a35b458 in mainline for boot/arch/arm32/src/main.c
- Timestamp:
- 2018-03-02T20:10:49Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/src/main.c
r3061bc1 ra35b458 89 89 mmu_start(); 90 90 version_print(); 91 91 92 92 printf("Boot data: %p -> %p\n", &bdata_start, &bdata_end); 93 93 printf("\nMemory statistics\n"); … … 97 97 printf(" %p|%p: kernel entry point\n", 98 98 (void *) PA2KA(BOOT_OFFSET), (void *) BOOT_OFFSET); 99 99 100 100 for (size_t i = 0; i < COMPONENTS; i++) { 101 101 printf(" %p|%p: %s image (%u/%u bytes)\n", components[i].addr, … … 103 103 components[i].size); 104 104 } 105 105 106 106 void *dest[COMPONENTS]; 107 107 size_t top = 0; … … 110 110 for (size_t i = 0; i < min(COMPONENTS, TASKMAP_MAX_RECORDS); i++) { 111 111 top = ALIGN_UP(top, PAGE_SIZE); 112 112 113 113 if (i > 0) { 114 114 bootinfo.tasks[bootinfo.cnt].addr = TOP2ADDR(top); 115 115 bootinfo.tasks[bootinfo.cnt].size = components[i].inflated; 116 116 117 117 str_cpy(bootinfo.tasks[bootinfo.cnt].name, 118 118 BOOTINFO_TASK_NAME_BUFLEN, components[i].name); 119 119 120 120 bootinfo.cnt++; 121 121 } 122 122 123 123 dest[i] = TOP2ADDR(top); 124 124 top += components[i].inflated; 125 125 cnt++; 126 126 } 127 127 128 128 printf("\nInflating components ... "); 129 129 130 130 for (size_t i = cnt; i > 0; i--) { 131 131 void *tail = components[i - 1].addr + components[i - 1].size; … … 135 135 halt(); 136 136 } 137 137 138 138 printf("%s ", components[i - 1].name); 139 139 140 140 int err = inflate(components[i - 1].addr, components[i - 1].size, 141 141 dest[i - 1], components[i - 1].inflated); … … 147 147 clean_dcache_poc(dest[i - 1], components[i - 1].inflated); 148 148 } 149 149 150 150 printf(".\n"); 151 151 152 152 /* Flush PT too. We need this if we disable caches later */ 153 153 clean_dcache_poc(boot_pt, PTL0_ENTRIES * PTL0_ENTRY_SIZE); 154 154 155 155 printf("Booting the kernel...\n"); 156 156 jump_to_kernel((void *) PA2KA(BOOT_OFFSET), &bootinfo);
Note:
See TracChangeset
for help on using the changeset viewer.