Subversion Repositories HelenOS

Rev

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

Rev 4339 Rev 4343
Line 91... Line 91...
91
    last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
91
    last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
92
   
92
   
93
    return virtaddr;
93
    return virtaddr;
94
}
94
}
95
 
95
 
-
 
96
void hw_area(uintptr_t *physaddr, pfn_t *frames)
-
 
97
{
-
 
98
    *physaddr = end_frame;
-
 
99
    *frames = ADDR2PFN(0xffffffff - end_frame);
-
 
100
}
-
 
101
 
96
void page_fault(int n __attribute__((unused)), istate_t *istate)
102
void page_fault(int n __attribute__((unused)), istate_t *istate)
97
{
103
{
98
    uintptr_t page;
104
    uintptr_t page;
99
    pf_access_t access;
105
    pf_access_t access;
100
   
106
   
101
    page = read_cr2();
107
    page = read_cr2();
102
       
108
       
103
    if (istate->error_word & PFERR_CODE_RSVD)
109
    if (istate->error_word & PFERR_CODE_RSVD)
104
        panic("Reserved bit set in page directory.");
110
        panic("Reserved bit set in page directory.");
105
 
111
   
106
    if (istate->error_word & PFERR_CODE_RW)
112
    if (istate->error_word & PFERR_CODE_RW)
107
        access = PF_ACCESS_WRITE;
113
        access = PF_ACCESS_WRITE;
108
    else
114
    else
109
        access = PF_ACCESS_READ;
115
        access = PF_ACCESS_READ;
110
   
116