110,18 → 110,25 |
for (cur = 0; cur < last_frame; cur += FRAME_SIZE) { |
page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
} |
|
// Create mapping for exception table at high offcet |
#ifdef HIGH_EXCEPTION_VECTORS |
/* Note: this mapping cann't be done by hw_map because fixed exception |
vector is stored at fixed virtual address |
*/ |
// reserve frame for exception table |
void* virtaddr = frame_alloc( ONE_FRAME ,FRAME_KA); |
page_mapping_insert(AS_KERNEL, EXC_BASE_ADDRESS, KA2PA(virtaddr), flags ); |
#endif |
|
// TODO: move to the kernel space |
page_mapping_insert(AS_KERNEL, 0x00000000, 0x00000000, flags); |
// page_mapping_insert(AS_KERNEL, 0xffff0000, 0x00000000, flags); |
// TODO: remove when aux_printf not needed |
page_mapping_insert(AS_KERNEL, 0x10000000, 0x10000000, flags); |
|
exc_register(EXC_DATA_ABORT, "page_fault data abort", (iroutine) data_abourt); |
exc_register(EXC_PREFETCH_ABORT, "page_fault prefetch abort", (iroutine) prefetch_abourt); |
|
as_switch(NULL, AS_KERNEL); |
|
// TODO: register fault routine |
} |
|
/** |