Changeset a35b458 in mainline for boot/arch/ia64/src/main.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 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/ia64/src/main.c
r3061bc1 ra35b458 67 67 memmap_item_t *memmap = bootinfo.memmap; 68 68 size_t items = 0; 69 69 70 70 if (!bootpar) { 71 71 /* Fake-up a memory map for simulators. */ … … 83 83 size_t mm_size = bootpar->efi_memmap_sz; 84 84 size_t md_size = bootpar->efi_memdesc_sz; 85 85 86 86 /* 87 87 * Walk the EFI memory map using the V1 memory descriptor … … 109 109 continue; 110 110 } 111 111 112 112 memmap[items].base = md->phys_start; 113 113 memmap[items].size = md->pages * EFI_PAGE_SIZE; … … 115 115 } 116 116 } 117 117 118 118 bootinfo.memmap_items = items; 119 119 } … … 134 134 efi_guid_t sal_guid = SAL_SYSTEM_TABLE_GUID; 135 135 sal_system_table_header_t *sal_st; 136 136 137 137 sal_st = efi_vendor_table_find( 138 138 (efi_system_table_t *) bootpar->efi_system_table, sal_guid); 139 139 140 140 sal_system_table_parse(sal_st); 141 141 142 142 bootinfo.sys_freq = sal_base_clock_frequency(); 143 143 } else { … … 150 150 { 151 151 version_print(); 152 152 153 153 printf(" %p|%p: boot info structure\n", &bootinfo, &bootinfo); 154 154 printf(" %p|%p: kernel entry point\n", … … 156 156 printf(" %p|%p: loader entry point\n", 157 157 (void *) LOADER_ADDRESS, (void *) LOADER_ADDRESS); 158 158 159 159 size_t i; 160 160 for (i = 0; i < COMPONENTS; i++) … … 162 162 components[i].addr, components[i].name, 163 163 components[i].inflated, components[i].size); 164 164 165 165 void *dest[COMPONENTS]; 166 166 size_t top = KERNEL_ADDRESS; … … 169 169 for (i = 0; i < min(COMPONENTS, TASKMAP_MAX_RECORDS); i++) { 170 170 top = ALIGN_UP(top, PAGE_SIZE); 171 171 172 172 if (i > 0) { 173 173 bootinfo.taskmap.tasks[bootinfo.taskmap.cnt].addr = … … 175 175 bootinfo.taskmap.tasks[bootinfo.taskmap.cnt].size = 176 176 components[i].inflated; 177 177 178 178 str_cpy(bootinfo.taskmap.tasks[bootinfo.taskmap.cnt].name, 179 179 BOOTINFO_TASK_NAME_BUFLEN, components[i].name); 180 180 181 181 bootinfo.taskmap.cnt++; 182 182 } 183 183 184 184 dest[i] = (void *) top; 185 185 top += components[i].inflated; 186 186 cnt++; 187 187 } 188 188 189 189 printf("\nInflating components ... "); 190 190 191 191 /* 192 192 * We will use the next available address for a copy of each component to … … 197 197 for (i = cnt; i > 0; i--) { 198 198 printf("%s ", components[i - 1].name); 199 199 200 200 /* 201 201 * Copy the component to a location which is guaranteed not to … … 203 203 */ 204 204 memmove((void *) top, components[i - 1].addr, components[i - 1].size); 205 205 206 206 int err = inflate((void *) top, components[i - 1].size, 207 207 dest[i - 1], components[i - 1].inflated); 208 208 209 209 if (err != EOK) { 210 210 printf("\n%s: Inflating error %d, halting.\n", … … 213 213 } 214 214 } 215 215 216 216 printf(".\n"); 217 217 … … 219 219 read_sal_configuration(); 220 220 read_pal_configuration(); 221 221 222 222 printf("Booting the kernel ...\n"); 223 223 jump_to_kernel(&bootinfo);
Note:
See TracChangeset
for help on using the changeset viewer.