Subversion Repositories HelenOS

Rev

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

Rev 3022 Rev 4055
Line 39... Line 39...
39
 
39
 
40
static vhpt_entry_t* vhpt_base;
40
static vhpt_entry_t* vhpt_base;
41
 
41
 
42
uintptr_t vhpt_set_up(void)
42
uintptr_t vhpt_set_up(void)
43
{
43
{
44
    vhpt_base = frame_alloc(VHPT_WIDTH - FRAME_WIDTH, FRAME_KA | FRAME_ATOMIC);
44
    vhpt_base = frame_alloc(VHPT_WIDTH - FRAME_WIDTH,
-
 
45
        FRAME_KA | FRAME_ATOMIC);
45
    if (!vhpt_base)
46
    if (!vhpt_base)
46
        panic("Kernel configured with VHPT but no memory for table.");
47
        panic("Kernel configured with VHPT but no memory for table.");
47
    vhpt_invalidate_all();
48
    vhpt_invalidate_all();
48
    return (uintptr_t) vhpt_base;
49
    return (uintptr_t) vhpt_base;
49
}
50
}
Line 79... Line 80...
79
    ventry->present.tag.tag_word = tag;
80
    ventry->present.tag.tag_word = tag;
80
}
81
}
81
 
82
 
82
void vhpt_invalidate_all()
83
void vhpt_invalidate_all()
83
{
84
{
84
    memsetb((uintptr_t) vhpt_base, 1 << VHPT_WIDTH, 0);
85
    memsetb(vhpt_base, 1 << VHPT_WIDTH, 0);
85
}
86
}
86
 
87
 
87
void vhpt_invalidate_asid(asid_t asid)
88
void vhpt_invalidate_asid(asid_t asid)
88
{
89
{
89
    vhpt_invalidate_all();
90
    vhpt_invalidate_all();