Subversion Repositories HelenOS

Rev

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

Rev 2264 Rev 2270
Line 108... Line 108...
108
 
108
 
109
    /* PA2KA(identity) mapping for all frames until last_frame */
109
    /* PA2KA(identity) mapping for all frames until last_frame */
110
    for (cur = 0; cur < last_frame; cur += FRAME_SIZE) {
110
    for (cur = 0; cur < last_frame; cur += FRAME_SIZE) {
111
        page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
111
        page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
112
    }
112
    }
-
 
113
   
-
 
114
    // Create mapping for exception table at high offcet
-
 
115
    #ifdef HIGH_EXCEPTION_VECTORS
-
 
116
    /* Note: this mapping cann't be done by hw_map because fixed exception
-
 
117
       vector is stored at fixed virtual address
-
 
118
     */
-
 
119
    // reserve frame for exception table
-
 
120
    void* virtaddr = frame_alloc( ONE_FRAME ,FRAME_KA);
-
 
121
    page_mapping_insert(AS_KERNEL, EXC_BASE_ADDRESS, KA2PA(virtaddr), flags );
-
 
122
    #endif
113
 
123
 
114
    // TODO: move to the kernel space
124
    // TODO: move to the kernel space
115
    page_mapping_insert(AS_KERNEL, 0x00000000, 0x00000000, flags);
125
//  page_mapping_insert(AS_KERNEL, 0xffff0000, 0x00000000, flags);
116
    // TODO: remove when aux_printf not needed
126
    // TODO: remove when aux_printf not needed
117
    page_mapping_insert(AS_KERNEL, 0x10000000, 0x10000000, flags);
127
    page_mapping_insert(AS_KERNEL, 0x10000000, 0x10000000, flags);
118
 
128
 
119
    exc_register(EXC_DATA_ABORT,     "page_fault data abort",     (iroutine) data_abourt);
-
 
120
    exc_register(EXC_PREFETCH_ABORT, "page_fault prefetch abort", (iroutine) prefetch_abourt);
-
 
121
 
129
 
122
    as_switch(NULL, AS_KERNEL);
130
    as_switch(NULL, AS_KERNEL);
123
 
131
 
124
    // TODO: register fault routine
-
 
125
}
132
}
126
 
133
 
127
/**
134
/**
128
 * Map device into kernel space.
135
 * Map device into kernel space.
129
 *
136
 *