Changeset 6e5252a in mainline for kernel/arch/ia32/src/mm/frame.c


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/src/mm/frame.c

    r2214382 r6e5252a  
    152152
    153153#ifdef CONFIG_SMP
    154                 size_t unmapped_size =
    155                     (uintptr_t) unmapped_end - BOOT_OFFSET;
    156 
    157                 minconf = max(minconf,
    158                     ADDR2PFN(AP_BOOT_OFFSET + unmapped_size));
     154                // FIXME: What is the purpose of minconf? Can we remove it?
     155                uintptr_t ap_end = ALIGN_UP((uintptr_t) ap_bootstrap_end, FRAME_SIZE);
     156                minconf = max(minconf, ADDR2PFN(ap_end));
    159157#endif
    160158
     
    165163
    166164#ifdef CONFIG_SMP
     165                // TODO: should go away implicitly with section table
     166
    167167                /* Reserve AP real mode bootstrap memory */
     168                size_t ap_size =
     169                    ALIGN_UP(ap_bootstrap_end - ap_bootstrap_start, FRAME_SIZE);
    168170                frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH,
    169                     unmapped_size >> FRAME_WIDTH);
     171                    ap_size >> FRAME_WIDTH);
    170172#endif
    171173        }
Note: See TracChangeset for help on using the changeset viewer.