Subversion Repositories HelenOS-historic

Rev

Rev 1767 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1767 Rev 1780
Line 38... Line 38...
38
#include <print.h>
38
#include <print.h>
39
 
39
 
40
 
40
 
41
static vhpt_entry_t* vhpt_base;
41
static vhpt_entry_t* vhpt_base;
42
 
42
 
43
__address vhpt_set_up(void)
43
uintptr_t vhpt_set_up(void)
44
{
44
{
45
    vhpt_base = frame_alloc(VHPT_WIDTH-FRAME_WIDTH,FRAME_KA | FRAME_ATOMIC);
45
    vhpt_base = frame_alloc(VHPT_WIDTH-FRAME_WIDTH,FRAME_KA | FRAME_ATOMIC);
46
    if(!vhpt_base)
46
    if(!vhpt_base)
47
        panic("Kernel configured with VHPT but no memory for table.");
47
        panic("Kernel configured with VHPT but no memory for table.");
48
    vhpt_invalidate_all();
48
    vhpt_invalidate_all();
49
    return (__address) vhpt_base;
49
    return (uintptr_t) vhpt_base;
50
}
50
}
51
 
51
 
52
 
52
 
53
void vhpt_mapping_insert(__address va, asid_t asid, tlb_entry_t entry)
53
void vhpt_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry)
54
{
54
{
55
    region_register rr_save, rr;
55
    region_register rr_save, rr;
56
    index_t vrn;
56
    index_t vrn;
57
    rid_t rid;
57
    rid_t rid;
58
    __u64 tag;
58
    uint64_t tag;
59
 
59
 
60
    vhpt_entry_t *ventry;
60
    vhpt_entry_t *ventry;
61
 
61
 
62
 
62
 
63
    vrn = va >> VRN_SHIFT;
63
    vrn = va >> VRN_SHIFT;
Line 82... Line 82...
82
 
82
 
83
}
83
}
84
 
84
 
85
void vhpt_invalidate_all()
85
void vhpt_invalidate_all()
86
{
86
{
87
    memsetb((__address)vhpt_base,1<<VHPT_WIDTH,0);
87
    memsetb((uintptr_t)vhpt_base,1<<VHPT_WIDTH,0);
88
}
88
}
89
 
89
 
90
void vhpt_invalidate_asid(asid_t asid)
90
void vhpt_invalidate_asid(asid_t asid)
91
{
91
{
92
    vhpt_invalidate_all();
92
    vhpt_invalidate_all();