Subversion Repositories HelenOS

Rev

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

Rev 2415 Rev 2464
Line 46... Line 46...
46
void tlb_invalidate_all(void)
46
void tlb_invalidate_all(void)
47
{
47
{
48
    asm volatile (
48
    asm volatile (
49
        "eor r1, r1\n"
49
        "eor r1, r1\n"
50
        "mcr p15, 0, r1, c8, c7, 0\n"
50
        "mcr p15, 0, r1, c8, c7, 0\n"
51
        ::: "r1"
51
        : : : "r1"
52
    );
52
    );
53
}
53
}
54
 
54
 
55
 
-
 
56
/** Invalidate all entries in TLB that belong to specified address space.
55
/** Invalidate all entries in TLB that belong to specified address space.
57
 *
56
 *
58
 * @param asid Ignored as the ARM architecture doesn't support ASIDs.
57
 * @param asid Ignored as the ARM architecture doesn't support ASIDs.
59
 */
58
 */
60
void tlb_invalidate_asid(asid_t asid)
59
void tlb_invalidate_asid(asid_t asid)
61
{
60
{
62
    tlb_invalidate_all();
61
    tlb_invalidate_all();
63
}
62
}
64
 
63
 
65
 
-
 
66
/** Invalidate single entry in TLB
64
/** Invalidate single entry in TLB
67
 *
65
 *
68
 * @param page Virtual adress of the page
66
 * @param page Virtual adress of the page
69
 */
67
 */
70
static inline void invalidate_page(uintptr_t page)
68
static inline void invalidate_page(uintptr_t page)
71
{
69
{
72
    asm volatile (
70
    asm volatile (
73
        "mcr p15, 0, %0, c8, c7, 1"
71
        "mcr p15, 0, %0, c8, c7, 1"    
74
       
-
 
75
        :
72
        :
76
        : "r"(page)
73
        : "r" (page)
77
    );
74
    );
78
}
75
}
79
 
76
 
80
 
-
 
81
/** Invalidate TLB entries for specified page range belonging to specified address space.
77
/** Invalidate TLB entries for specified page range belonging to specified
-
 
78
 * address space.
82
 *
79
 *
83
 * @param asid Ignored as the ARM architecture doesn't support it.
80
 * @param asid Ignored as the ARM architecture doesn't support it.
84
 * @param page Address of the first page whose entry is to be invalidated.
81
 * @param page Address of the first page whose entry is to be invalidated.
85
 * @param cnt Number of entries to invalidate.
82
 * @param cnt Number of entries to invalidate.
86
 */
83
 */