Changeset 40c8c17 in mainline for kernel/arch/ia32/src


Ignore:
Timestamp:
2011-11-26T21:37:40Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
38ff925
Parents:
056ddc30
Message:

Replace multiple definitions of last_frame with config.physmem_end.
Do not duplicate code which calculates the end of physical memory.

Location:
kernel/arch/ia32/src/mm
Files:
2 edited

Legend:

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

    r056ddc30 r40c8c17  
    4949size_t hardcoded_unmapped_kdata_size = 0;
    5050
    51 // XXX: remove me
    52 uintptr_t last_frame = 0;
    53 
    5451static void init_e820_memory(pfn_t minconf, bool low)
    5552{
     
    8582                                    ZONE_AVAILABLE | ZONE_HIGHMEM);
    8683                        }
    87                        
    88                         // XXX: remove me
    89                         if (last_frame < new_base + new_size)
    90                                 last_frame = new_base + new_size;
    9184                } else if ((e820table[i].type == MEMMAP_MEMORY_ACPI) ||
    9285                    (e820table[i].type == MEMMAP_MEMORY_NVS)) {
  • kernel/arch/ia32/src/mm/page.c

    r056ddc30 r40c8c17  
    6666       
    6767        /*
    68          * PA2KA(identity) mapping for all frames until last_frame.
     68         * PA2KA(identity) mapping for all low-memory frames.
    6969         */
    7070        page_table_lock(AS_KERNEL, true);
    71         for (cur = 0; cur < min(config.identity_size, last_frame);
     71        for (cur = 0; cur < min(config.identity_size, config.physmem_end);
    7272            cur += FRAME_SIZE) {
    7373                flags = PAGE_CACHEABLE | PAGE_WRITE;
    74                 if ((PA2KA(cur) >= config.base) && (PA2KA(cur) <
    75                     config.base + config.kernel_size))
     74                if ((PA2KA(cur) >= config.base) &&
     75                    (PA2KA(cur) < config.base + config.kernel_size))
    7676                        flags |= PAGE_GLOBAL;
    7777                page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
Note: See TracChangeset for help on using the changeset viewer.