Subversion Repositories HelenOS

Rev

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

Rev 2787 Rev 4377
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
/** Invalidate all entries in TLB that belong to specified address space.
55
/** Invalidate all entries in TLB that belong to specified address space.
56
 *
56
 *
Line 66... Line 66...
66
 * @param page Virtual adress of the page
66
 * @param page Virtual adress of the page
67
 */
67
 */
68
static inline void invalidate_page(uintptr_t page)
68
static inline void invalidate_page(uintptr_t page)
69
{
69
{
70
    asm volatile (
70
    asm volatile (
71
        "mcr p15, 0, %0, c8, c7, 1"    
71
        "mcr p15, 0, %[page], c8, c7, 1\n"
72
        :
-
 
73
        : "r" (page)
72
        :: [page] "r" (page)
74
    );
73
    );
75
}
74
}
76
 
75
 
77
/** Invalidate TLB entries for specified page range belonging to specified
76
/** Invalidate TLB entries for specified page range belonging to specified
78
 * address space.
77
 * address space.
79
 *
78
 *
80
 * @param asid Ignored as the ARM architecture doesn't support it.
79
 * @param asid Ignored as the ARM architecture doesn't support it.
81
 * @param page Address of the first page whose entry is to be invalidated.
80
 * @param page Address of the first page whose entry is to be invalidated.
82
 * @param cnt Number of entries to invalidate.
81
 * @param cnt Number of entries to invalidate.
83
 */
82
 */
84
void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt)
83
void tlb_invalidate_pages(asid_t asid __attribute__((unused)), uintptr_t page, count_t cnt)
85
{
84
{
86
    unsigned int i;
85
    unsigned int i;
87
 
86
 
88
    for (i = 0; i < cnt; i++)
87
    for (i = 0; i < cnt; i++)
89
        invalidate_page(page + i * PAGE_SIZE);
88
        invalidate_page(page + i * PAGE_SIZE);
90
}
89
}
91
 
90
 
-
 
91
void tlb_arch_init(void)
-
 
92
{
-
 
93
}
-
 
94
 
-
 
95
void tlb_print(void)
-
 
96
{
-
 
97
}
-
 
98
 
92
/** @}
99
/** @}
93
 */
100
 */