Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 703 → Rev 727

/kernel/trunk/arch/sparc64/include/mm/asid.h
36,6 → 36,6
*/
typedef __u16 asid_t;
 
#define asid_get() 0
#define ASID_MAX_ARCH 0x4095 /* 2^12 - 1 */
 
#endif
/kernel/trunk/arch/sparc64/Makefile.inc
51,6 → 51,12
 
CONFIG_PAGE_HT = y
 
## Compile with support for address space identifiers.
#
 
CONFIG_ASID = y
 
 
ARCH_SOURCES = \
arch/$(ARCH)/src/cpu/cpu.c \
arch/$(ARCH)/src/asm.S \
/kernel/trunk/arch/sparc64/src/mm/tlb.c
165,14 → 165,19
dtlb_demap(TLB_DEMAP_CONTEXT, TLB_DEMAP_NUCLEUS, 0);
}
 
/** Invalidate all ITLB and DLTB entries for specified page in specified address space.
/** Invalidate all ITLB and DTLB entries for specified page range in specified address space.
*
* @param asid Address Space ID.
* @param page Page which to sweep out from ITLB and DTLB.
* @param page First page which to sweep out from ITLB and DTLB.
* @param cnt Number of ITLB and DTLB entries to invalidate.
*/
void tlb_invalidate_page(asid_t asid, __address page)
void tlb_invalidate_pages(asid_t asid, __address page, count_t cnt)
{
/* TODO: write asid to some Context register and encode the register in second parameter below. */
itlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, page);
dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, page);
int i;
for (i = 0; i < cnt; i++) {
/* TODO: write asid to some Context register and encode the register in second parameter below. */
itlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, page + i * PAGE_SIZE);
dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, page + i * PAGE_SIZE);
}
}