Changeset 8a1afd2 in mainline for kernel/arch/amd64
- 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/amd64
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/_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 *(.data); /* initialized data */ 33 35 *(.rodata .rodata.*); /* string literals */ 34 hardcoded_load_address = .;35 QUAD(PA2KA(BOOT_OFFSET));36 hardcoded_ktext_size = .;37 QUAD(ktext_end - ktext_start + (unmapped_ktext_end - unmapped_ktext_start));38 hardcoded_kdata_size = .;39 QUAD(kdata_end - kdata_start + (unmapped_kdata_end - unmapped_kdata_start));40 hardcoded_unmapped_ktext_size = .;41 QUAD(unmapped_ktext_end - unmapped_ktext_start);42 hardcoded_unmapped_kdata_size = .;43 QUAD(unmapped_kdata_end - unmapped_kdata_start);44 36 *(COMMON); /* global variables */ 45 37 … … 71 63 72 64 #ifdef CONFIG_SMP 73 _hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start);74 65 ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET; 75 66 ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET; -
kernel/arch/amd64/include/arch/boot/boot.h
r7900e5d r8a1afd2 42 42 #ifndef __ASSEMBLER__ 43 43 44 #ifdef CONFIG_SMP 45 46 /* This is only a symbol so the type is dummy. Obtain the value using &. */ 47 extern int _hardcoded_unmapped_size; 48 49 #endif /* CONFIG_SMP */ 44 extern uint8_t unmapped_kdata_end[]; 50 45 51 46 #endif /* __ASSEMBLER__ */ -
kernel/arch/amd64/src/amd64.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 }
Note:
See TracChangeset
for help on using the changeset viewer.