Changeset 677a6d5 in mainline for generic/src/mm/page.c


Ignore:
Timestamp:
2006-01-08T16:24:32Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f275cb3
Parents:
59adc2b
Message:

Memory management work.
Pass address space identifier to functions in page_operations to support single global page hash table.

File:
1 edited

Legend:

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

    r59adc2b r677a6d5  
    2828
    2929#include <mm/page.h>
     30#include <arch/mm/page.h>
     31#include <arch/mm/asid.h>
     32#include <mm/asid.h>
    3033#include <mm/frame.h>
    31 #include <arch/mm/page.h>
    3234#include <arch/types.h>
    3335#include <typedefs.h>
     
    3537#include <memstr.h>
    3638#include <debug.h>
     39#include <arch.h>
    3740
    3841/** Virtual operations for page subsystem. */
     
    4245{
    4346        page_arch_init();
    44         page_mapping_insert(0x0, 0x0, PAGE_NOT_PRESENT, 0);
     47        page_mapping_insert(0x0, 0, 0x0, PAGE_NOT_PRESENT, 0);
    4548}
    4649
     
    6265
    6366        for (i = 0; i < cnt; i++)
    64                 page_mapping_insert(s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0);
     67                page_mapping_insert(s + i*PAGE_SIZE, ASID_KERNEL, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0);
    6568
    6669}
     
    7275 *
    7376 * @param page Virtual address of the page to be mapped.
     77 * @param asid Address space to wich page belongs.
    7478 * @param frame Physical address of memory frame to which the mapping is done.
    7579 * @param flags Flags to be used for mapping.
    7680 * @param root Explicit PTL0 address.
    7781 */
    78 void page_mapping_insert(__address page, __address frame, int flags, __address root)
     82void page_mapping_insert(__address page, asid_t asid, __address frame, int flags, __address root)
    7983{
    8084        ASSERT(page_operations);
    8185        ASSERT(page_operations->mapping_insert);
    8286       
    83         page_operations->mapping_insert(page, frame, flags, root);
     87        page_operations->mapping_insert(page, asid, frame, flags, root);
    8488}
    8589
     
    8993 *
    9094 * @param page Virtual page.
     95 * @param asid Address space to wich page belongs.
    9196 * @param root PTL0 address if non-zero.
    9297 *
    9398 * @return NULL if there is no such mapping; entry from PTL3 describing the mapping otherwise.
    9499 */
    95 pte_t *page_mapping_find(__address page, __address root)
     100pte_t *page_mapping_find(__address page,  asid_t asid, __address root)
    96101{
    97102        ASSERT(page_operations);
    98103        ASSERT(page_operations->mapping_find);
    99104
    100         return page_operations->mapping_find(page, root);
     105        return page_operations->mapping_find(page, asid, root);
    101106}
Note: See TracChangeset for help on using the changeset viewer.