Subversion Repositories HelenOS-historic

Rev

Rev 597 | Rev 730 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 597 Rev 727
Line 29... Line 29...
29
#include <mm/tlb.h>
29
#include <mm/tlb.h>
30
#include <arch/mm/asid.h>
30
#include <arch/mm/asid.h>
31
#include <arch/asm.h>
31
#include <arch/asm.h>
32
#include <arch/types.h>
32
#include <arch/types.h>
33
 
33
 
34
/** Invalidate all TLB entries
-
 
35
 *
-
 
36
 * Invalidate all TLB entries.
-
 
37
 *
-
 
38
 * @param asid This argument is ignored.
-
 
39
 */
-
 
40
void tlb_invalidate(asid_t asid)
-
 
41
{
-
 
42
    write_cr3(read_cr3());
-
 
43
}
-
 
44
 
-
 
45
/** Invalidate all entries in TLB. */
34
/** Invalidate all entries in TLB. */
46
void tlb_invalidate_all(void)
35
void tlb_invalidate_all(void)
47
{
36
{
48
    write_cr3(read_cr3());
37
    write_cr3(read_cr3());
49
}
38
}
Line 55... Line 44...
55
void tlb_invalidate_asid(asid_t asid)
44
void tlb_invalidate_asid(asid_t asid)
56
{
45
{
57
    tlb_invalidate_all();
46
    tlb_invalidate_all();
58
}
47
}
59
 
48
 
60
/** Invalidate TLB entry for specified page belongs to specified address space.
49
/** Invalidate TLB entry for specified page range belonging to specified address space.
61
 *
50
 *
62
 * @param asid This parameter is ignored as the architecture doesn't support it.
51
 * @param asid This parameter is ignored as the architecture doesn't support it.
63
 * @param page Address of the page whose entry is to be invalidated.
52
 * @param page Address of the first page whose entry is to be invalidated.
-
 
53
 * @param cnt Number of entries to invalidate.
64
 */
54
 */
65
void tlb_invalidate_page(asid_t asid, __address page)
55
void tlb_invalidate_pages(asid_t asid, __address page, count_t cnt)
66
{
56
{
-
 
57
    int i;
-
 
58
 
-
 
59
    for (i = 0; i < cnt; i++)
67
    invlpg(page);
60
        invlpg(page + i * PAGE_SIZE);
68
}
61
}