Subversion Repositories HelenOS-historic

Rev

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

Rev 1708 Rev 1780
Line 64... Line 64...
64
{
64
{
65
    region_register rr;
65
    region_register rr;
66
    pta_register pta;  
66
    pta_register pta;  
67
    int i;
67
    int i;
68
#ifdef CONFIG_VHPT  
68
#ifdef CONFIG_VHPT  
69
    __address vhpt_base;
69
    uintptr_t vhpt_base;
70
#endif
70
#endif
71
 
71
 
72
    /*
72
    /*
73
     * First set up kernel region register.
73
     * First set up kernel region register.
74
     * This is redundant (see start.S) but we keep it here just for sure.
74
     * This is redundant (see start.S) but we keep it here just for sure.
Line 126... Line 126...
126
 * @param page Address of virtual page including VRN bits.
126
 * @param page Address of virtual page including VRN bits.
127
 * @param asid Address space identifier.
127
 * @param asid Address space identifier.
128
 *
128
 *
129
 * @return VHPT entry address.
129
 * @return VHPT entry address.
130
 */
130
 */
131
vhpt_entry_t *vhpt_hash(__address page, asid_t asid)
131
vhpt_entry_t *vhpt_hash(uintptr_t page, asid_t asid)
132
{
132
{
133
    region_register rr_save, rr;
133
    region_register rr_save, rr;
134
    index_t vrn;
134
    index_t vrn;
135
    rid_t rid;
135
    rid_t rid;
136
    vhpt_entry_t *v;
136
    vhpt_entry_t *v;
Line 170... Line 170...
170
 * @param page Address of virtual page including VRN bits.
170
 * @param page Address of virtual page including VRN bits.
171
 * @param asid Address space identifier.
171
 * @param asid Address space identifier.
172
 *
172
 *
173
 * @return True if page and asid match the page and asid of t, false otherwise.
173
 * @return True if page and asid match the page and asid of t, false otherwise.
174
 */
174
 */
175
bool vhpt_compare(__address page, asid_t asid, vhpt_entry_t *v)
175
bool vhpt_compare(uintptr_t page, asid_t asid, vhpt_entry_t *v)
176
{
176
{
177
    region_register rr_save, rr;   
177
    region_register rr_save, rr;   
178
    index_t vrn;
178
    index_t vrn;
179
    rid_t rid;
179
    rid_t rid;
180
    bool match;
180
    bool match;
Line 214... Line 214...
214
 * @param page Virtual address of the page mapped by the entry.
214
 * @param page Virtual address of the page mapped by the entry.
215
 * @param asid Address space identifier of the address space to which page belongs.
215
 * @param asid Address space identifier of the address space to which page belongs.
216
 * @param frame Physical address of the frame to wich page is mapped.
216
 * @param frame Physical address of the frame to wich page is mapped.
217
 * @param flags Different flags for the mapping.
217
 * @param flags Different flags for the mapping.
218
 */
218
 */
219
void vhpt_set_record(vhpt_entry_t *v, __address page, asid_t asid, __address frame, int flags)
219
void vhpt_set_record(vhpt_entry_t *v, uintptr_t page, asid_t asid, uintptr_t frame, int flags)
220
{
220
{
221
    region_register rr_save, rr;   
221
    region_register rr_save, rr;   
222
    index_t vrn;
222
    index_t vrn;
223
    rid_t rid;
223
    rid_t rid;
224
    __u64 tag;
224
    uint64_t tag;
225
 
225
 
226
    ASSERT(v);
226
    ASSERT(v);
227
 
227
 
228
    vrn = page >> VRN_SHIFT;
228
    vrn = page >> VRN_SHIFT;
229
    rid = ASID2RID(asid, vrn);
229
    rid = ASID2RID(asid, vrn);