Changeset 40c8c17 in mainline for kernel/arch/ia32/src/mm/page.c


Ignore:
Timestamp:
2011-11-26T21:37:40Z (12 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.