Subversion Repositories HelenOS-historic

Compare Revisions

Regard whitespace Rev 703 → Rev 755

/kernel/trunk/generic/src/mm/page.c
33,7 → 33,7
#include <mm/page.h>
#include <arch/mm/page.h>
#include <arch/mm/asid.h>
#include <mm/asid.h>
#include <mm/as.h>
#include <mm/frame.h>
#include <arch/types.h>
#include <typedefs.h>
48,7 → 48,7
void page_init(void)
{
page_arch_init();
page_mapping_insert(0x0, 0, 0x0, PAGE_NOT_PRESENT, 0);
page_mapping_insert(AS_KERNEL, 0x0, 0x0, PAGE_NOT_PRESENT, 0);
}
 
/** Map memory structure
68,7 → 68,7
cnt = length/PAGE_SIZE + (length%PAGE_SIZE>0);
 
for (i = 0; i < cnt; i++)
page_mapping_insert(s + i*PAGE_SIZE, ASID_KERNEL, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0);
page_mapping_insert(AS_KERNEL, s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0);
 
}
 
77,18 → 77,18
* Map virtual address 'page' to physical address 'frame'
* using 'flags'. Allocate and setup any missing page tables.
*
* @param as Address space to wich page belongs. Must be locked prior the call.
* @param page Virtual address of the page to be mapped.
* @param asid Address space to wich page belongs.
* @param frame Physical address of memory frame to which the mapping is done.
* @param flags Flags to be used for mapping.
* @param root Explicit PTL0 address.
*/
void page_mapping_insert(__address page, asid_t asid, __address frame, int flags, __address root)
void page_mapping_insert(as_t *as, __address page, __address frame, int flags, __address root)
{
ASSERT(page_operations);
ASSERT(page_operations->mapping_insert);
page_operations->mapping_insert(page, asid, frame, flags, root);
page_operations->mapping_insert(as, page, frame, flags, root);
}
 
/** Find mapping for virtual page
95,16 → 95,16
*
* Find mapping for virtual page.
*
* @param as Address space to wich page belongs must be locked prior the call.
* @param page Virtual page.
* @param asid Address space to wich page belongs.
* @param root PTL0 address if non-zero.
*
* @return NULL if there is no such mapping; requested mapping otherwise.
*/
pte_t *page_mapping_find(__address page, asid_t asid, __address root)
pte_t *page_mapping_find(as_t *as, __address page, __address root)
{
ASSERT(page_operations);
ASSERT(page_operations->mapping_find);
 
return page_operations->mapping_find(page, asid, root);
return page_operations->mapping_find(as, page, root);
}