Changeset 6e5252a in mainline for kernel/arch/ia32/_link.ld.in


Ignore:
Timestamp:
2018-11-13T20:22:20Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
156bae23
Parents:
2214382
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-10-23 21:48:41)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-13 20:22:20)
Message:

Place AP bootstrap correctly via linker script instead of manual copy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/_link.ld.in

    r2214382 r6e5252a  
    1414ENTRY(multiboot_image_start)
    1515
     16PHDRS {
     17        ap_boot PT_LOAD ;
     18        unmapped PT_LOAD ;
     19        mapped PT_LOAD ;
     20}
     21
    1622SECTIONS {
    1723        kernel_load_address = PA2KA(BOOT_OFFSET);
    1824
    19         .unmapped (BOOT_OFFSET + SIZEOF_HEADERS): AT (BOOT_OFFSET + SIZEOF_HEADERS) {
     25        .ap_bootstrap (AP_BOOT_OFFSET): AT (AP_BOOT_OFFSET) {
     26                ap_bootstrap_start = .;
     27
     28                /* Must be first. */
     29                *(.multiboot);
     30
     31                *(K_AP_TEXT_START);
     32                *(K_AP_DATA_START);
     33                ap_bootstrap_end = .;
     34        } :ap_boot
     35
     36        .unmapped (BOOT_OFFSET): AT (BOOT_OFFSET) {
    2037                unmapped_start = .;
    2138                *(K_TEXT_START);
    2239                *(K_DATA_START);
    2340                unmapped_end = .;
    24         }
     41        } :unmapped
    2542
    26         .mapped (PA2KA(BOOT_OFFSET) + SIZEOF_HEADERS + SIZEOF(.unmapped)): AT (BOOT_OFFSET + SIZEOF_HEADERS + SIZEOF(.unmapped)) {
     43        .mapped (PA2KA(BOOT_OFFSET) + SIZEOF(.unmapped)): AT (BOOT_OFFSET + SIZEOF(.unmapped)) {
    2744                ktext_start = .;
    2845                *(.text .text.*);
     
    4158                *(symtab.*);            /* Symbol table, must be LAST symbol! */
    4259                kdata_end = .;
    43         }
     60        } :mapped
    4461
    4562#ifdef CONFIG_LINE_DEBUG
     
    6178
    6279#ifdef CONFIG_SMP
    63 
    64         ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET;
    65         ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET;
    6680        protected_ap_gdtr = PA2KA(ap_gdtr);
    67 
    6881#endif /* CONFIG_SMP */
    6982
Note: See TracChangeset for help on using the changeset viewer.