Subversion Repositories HelenOS-historic

Rev

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

Rev 157 Rev 158
Line 74... Line 74...
74
void map_page_to_frame(__address page, __address frame, int flags, __address root)
74
void map_page_to_frame(__address page, __address frame, int flags, __address root)
75
{
75
{
76
    pte_t *ptl0, *ptl1, *ptl2, *ptl3;
76
    pte_t *ptl0, *ptl1, *ptl2, *ptl3;
77
    __address newpt;
77
    __address newpt;
78
 
78
 
79
//  ptl0 = (pte_t *) PA2KA(root ? root : (__address) GET_PTL0_ADDRESS());
79
    ptl0 = (pte_t *) PA2KA(root ? root : (__address) GET_PTL0_ADDRESS());
80
 
80
 
81
    if (GET_PTL1_FLAGS(ptl0, PTL0_INDEX(page)) & PAGE_NOT_PRESENT) {
81
    if (GET_PTL1_FLAGS(ptl0, PTL0_INDEX(page)) & PAGE_NOT_PRESENT) {
82
        newpt = frame_alloc(FRAME_KA);
82
        newpt = frame_alloc(FRAME_KA);
83
        memsetb(newpt, PAGE_SIZE, 0);
83
        memsetb(newpt, PAGE_SIZE, 0);
84
        SET_PTL1_ADDRESS(ptl0, PTL0_INDEX(page), KA2PA(newpt));
84
        SET_PTL1_ADDRESS(ptl0, PTL0_INDEX(page), KA2PA(newpt));