Rev 2352 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2352 | Rev 2361 | ||
---|---|---|---|
Line 61... | Line 61... | ||
61 | page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
61 | page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
62 | } |
62 | } |
63 | 63 | ||
64 | // create mapping for exception table at high offset |
64 | // create mapping for exception table at high offset |
65 | #ifdef HIGH_EXCEPTION_VECTORS |
65 | #ifdef HIGH_EXCEPTION_VECTORS |
66 | // Note: this mapping cann't be done by hw_map because fixed exception |
66 | /* Note: this mapping cann't be done by hw_map because fixed |
67 | // vector is stored at fixed virtual address |
67 | exception vector is stored at fixed virtual address |
68 | // reserve frame for exception table |
68 | reserve frame for exception table |
- | 69 | */ |
|
69 | void* virtaddr = frame_alloc(ONE_FRAME, FRAME_KA); |
70 | void* virtaddr = frame_alloc(ONE_FRAME, FRAME_KA); |
70 | page_mapping_insert(AS_KERNEL, EXC_BASE_ADDRESS, KA2PA(virtaddr), flags); |
71 | page_mapping_insert(AS_KERNEL, EXC_BASE_ADDRESS, KA2PA(virtaddr), flags); |
- | 72 | #else |
|
- | 73 | #error "Only high eception vector supported now" |
|
71 | #endif |
74 | #endif |
72 | // TODO: #else |
- | |
73 | 75 | ||
74 | as_switch(NULL, AS_KERNEL); |
76 | as_switch(NULL, AS_KERNEL); |
75 | 77 | ||
76 | boot_page_table_free(); |
78 | boot_page_table_free(); |
77 | } |
79 | } |