Changeset 8a1afd2 in mainline for kernel/arch/ia32
- Timestamp:
- 2018-10-17T22:51:33Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1d18bbc0, d723a80
- Parents:
- 7900e5d
- Location:
- kernel/arch/ia32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/_link.ld.in
r7900e5d r8a1afd2 13 13 14 14 SECTIONS { 15 kernel_load_address = PA2KA(BOOT_OFFSET); 16 15 17 .unmapped BOOT_OFFSET: AT (0) { 16 18 unmapped_ktext_start = .; … … 32 34 *(.rodata .rodata.*); /* string literals */ 33 35 *(COMMON); /* global variables */ 34 hardcoded_load_address = .;35 LONG(PA2KA(BOOT_OFFSET));36 hardcoded_ktext_size = .;37 LONG((ktext_end - ktext_start) + (unmapped_ktext_end - unmapped_ktext_start));38 hardcoded_kdata_size = .;39 LONG((kdata_end - kdata_start) + (unmapped_kdata_end - unmapped_kdata_start));40 hardcoded_unmapped_ktext_size = .;41 LONG(unmapped_ktext_end - unmapped_ktext_start);42 hardcoded_unmapped_kdata_size = .;43 LONG(unmapped_kdata_end - unmapped_kdata_start);44 36 . = ALIGN(8); 45 37 symbol_table = .; … … 68 60 #ifdef CONFIG_SMP 69 61 70 _hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start);71 62 ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET; 72 63 ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET; -
kernel/arch/ia32/include/arch/boot/boot.h
r7900e5d r8a1afd2 44 44 #ifdef CONFIG_SMP 45 45 46 /* This is only a symbol so the type is dummy. Obtain the value using &. */ 47 extern int _hardcoded_unmapped_size; 46 extern uint8_t unmapped_kdata_end[]; 48 47 49 48 #endif /* CONFIG_SMP */ -
kernel/arch/ia32/src/boot/multiboot.S
r7900e5d r8a1afd2 285 285 /** Calculate unmapped address of the end of the kernel. */ 286 286 calc_kernel_end: 287 movl $KA2PA(hardcoded_load_address), %edi 288 movl (%edi), %esi 289 leal KA2PA(0)(%esi), %esi 290 291 movl $KA2PA(hardcoded_ktext_size), %edi 292 addl (%edi), %esi 293 leal KA2PA(0)(%esi), %esi 294 295 movl $KA2PA(hardcoded_kdata_size), %edi 296 addl (%edi), %esi 297 leal KA2PA(0)(%esi), %esi 298 movl %esi, kernel_end 299 287 movl $KA2PA(kdata_end), %edi 288 movl %edi, kernel_end 300 289 ret 301 290 -
kernel/arch/ia32/src/ia32.c
r7900e5d r8a1afd2 94 94 95 95 #ifdef CONFIG_SMP 96 size_t unmapped_size = (uintptr_t) unmapped_kdata_end - BOOT_OFFSET; 96 97 /* Copy AP bootstrap routines below 1 MB. */ 97 memcpy((void *) AP_BOOT_OFFSET, (void *) BOOT_OFFSET, 98 (size_t) &_hardcoded_unmapped_size); 98 memcpy((void *) AP_BOOT_OFFSET, (void *) BOOT_OFFSET, unmapped_size); 99 99 #endif 100 100 } -
kernel/arch/ia32/src/mm/frame.c
r7900e5d r8a1afd2 47 47 48 48 #define PHYSMEM_LIMIT32 UINT64_C(0x100000000) 49 50 size_t hardcoded_unmapped_ktext_size = 0;51 size_t hardcoded_unmapped_kdata_size = 0;52 49 53 50 static void init_e820_memory(pfn_t minconf, bool low) … … 155 152 156 153 #ifdef CONFIG_SMP 154 size_t unmapped_size = 155 (uintptr_t) unmapped_kdata_end - BOOT_OFFSET; 156 157 157 minconf = max(minconf, 158 ADDR2PFN(AP_BOOT_OFFSET + hardcoded_unmapped_ktext_size + 159 hardcoded_unmapped_kdata_size)); 158 ADDR2PFN(AP_BOOT_OFFSET + unmapped_size)); 160 159 #endif 161 160 … … 168 167 /* Reserve AP real mode bootstrap memory */ 169 168 frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH, 170 (hardcoded_unmapped_ktext_size + 171 hardcoded_unmapped_kdata_size) >> FRAME_WIDTH); 169 unmapped_size >> FRAME_WIDTH); 172 170 #endif 173 171 }
Note:
See TracChangeset
for help on using the changeset viewer.