Changeset 4cc2ddd in mainline for kernel/arch/ia32/src/mm/frame.c


Ignore:
Timestamp:
2008-01-15T13:19:35Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
62da45a
Parents:
22e8166d
Message:

amd64: shorten kernel address space by 2 GB to support proper mapping of more than 2 GB of physical memory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/mm/frame.c

    r22e8166d r4cc2ddd  
    6262        for (i = 0; i < e820counter; i++) {
    6363                if (e820table[i].type == MEMMAP_MEMORY_AVAILABLE) {
    64                         start = ADDR2PFN(ALIGN_UP(e820table[i].base_address,
    65                                                   FRAME_SIZE));
    66                         size = SIZE2FRAMES(ALIGN_DOWN(e820table[i].size,
    67                                                    FRAME_SIZE));
    68                         if (minconf < start || minconf >= start + size)
     64                        start = ADDR2PFN(ALIGN_UP(e820table[i].base_address, FRAME_SIZE));
     65                        size = SIZE2FRAMES(ALIGN_DOWN(e820table[i].size, FRAME_SIZE));
     66                        if ((minconf < start) || (minconf >= start + size))
    6967                                conf = start;
    7068                        else
     
    112110{
    113111        static pfn_t minconf;
    114 
     112       
    115113        if (config.cpu_active == 1) {
    116114                cmd_initialize(&e820_info);
    117115                cmd_register(&e820_info);
    118116
    119 
    120117                minconf = 1;
    121118#ifdef CONFIG_SMP
    122119                minconf = max(minconf,
    123                               ADDR2PFN(AP_BOOT_OFFSET+hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size));
     120                        ADDR2PFN(AP_BOOT_OFFSET + hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size));
    124121#endif
    125122#ifdef CONFIG_SIMICS_FIX
     
    134131                /* Reserve AP real mode bootstrap memory */
    135132                frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH,
    136                                        (hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size) >> FRAME_WIDTH);
     133                        (hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size) >> FRAME_WIDTH);
    137134               
    138135#ifdef CONFIG_SIMICS_FIX
    139136                /* Don't know why, but these addresses help */
    140                 frame_mark_unavailable(0xd000 >> FRAME_WIDTH,3);
     137                frame_mark_unavailable(0xd000 >> FRAME_WIDTH, 3);
    141138#endif
    142139#endif
Note: See TracChangeset for help on using the changeset viewer.