Changeset ef67bab in mainline for generic/src/mm/page.c


Ignore:
Timestamp:
2006-02-01T00:02:16Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
071a8ae6
Parents:
fc1e4f6
Message:

Memory management work.
Remove the last (i.e. 'root') argument from page_mapping_insert() and page_mapping_find().
Page table address is now extracted from the first (i.e. 'as') argument.
Add a lot of infrastructure to make the above possible.
sparc64 is now broken, most likely because of insufficient identity mapping of physical memory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/mm/page.c

    rfc1e4f6 ref67bab  
    4949{
    5050        page_arch_init();
    51         page_mapping_insert(AS_KERNEL, 0x0, 0x0, PAGE_NOT_PRESENT, 0);
    5251}
    5352
     
    6968
    7069        for (i = 0; i < cnt; i++)
    71                 page_mapping_insert(AS_KERNEL, s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0);
     70                page_mapping_insert(AS_KERNEL, s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE);
    7271
    7372}
     
    7877 * using 'flags'. Allocate and setup any missing page tables.
    7978 *
    80  * @param as Address space to wich page belongs. Must be locked prior the call.
     79 * The address space must be locked and interrupts must be disabled.
     80 *
     81 * @param as Address space to wich page belongs..
    8182 * @param page Virtual address of the page to be mapped.
    8283 * @param frame Physical address of memory frame to which the mapping is done.
    8384 * @param flags Flags to be used for mapping.
    84  * @param root Explicit PTL0 address.
    8585 */
    86 void page_mapping_insert(as_t *as, __address page, __address frame, int flags, __address root)
     86void page_mapping_insert(as_t *as, __address page, __address frame, int flags)
    8787{
    8888        ASSERT(page_operations);
    8989        ASSERT(page_operations->mapping_insert);
    9090       
    91         page_operations->mapping_insert(as, page, frame, flags, root);
     91        page_operations->mapping_insert(as, page, frame, flags);
    9292}
    9393
     
    9696 * Find mapping for virtual page.
    9797 *
    98  * @param as Address space to wich page belongs must be locked prior the call.
     98 * The address space must be locked and interrupts must be disabled.
     99 *
     100 * @param as Address space to wich page belongs.
    99101 * @param page Virtual page.
    100  * @param root PTL0 address if non-zero.
    101102 *
    102103 * @return NULL if there is no such mapping; requested mapping otherwise.
    103104 */
    104 pte_t *page_mapping_find(as_t *as, __address page, __address root)
     105pte_t *page_mapping_find(as_t *as, __address page)
    105106{
    106107        ASSERT(page_operations);
    107108        ASSERT(page_operations->mapping_find);
    108109
    109         return page_operations->mapping_find(as, page, root);
     110        return page_operations->mapping_find(as, page);
    110111}
Note: See TracChangeset for help on using the changeset viewer.