Mercurial > lcfOS
comparison cos/kernel/handlers.c @ 29:7e3bdcb391dc
Added get_page function to mm
author | windel |
---|---|
date | Thu, 29 Dec 2011 19:34:01 +0100 |
parents | dcce92b1efbc |
children | 0148f55bfe24 |
comparison
equal
deleted
inserted
replaced
28:47b7df514243 | 29:7e3bdcb391dc |
---|---|
227 | 227 |
228 void INT14handler() | 228 void INT14handler() |
229 { | 229 { |
230 uint64_t faulting_address; | 230 uint64_t faulting_address; |
231 | 231 |
232 printf("Segfault!\n"); | |
233 | |
232 // Retrieve failed page from CR2: | 234 // Retrieve failed page from CR2: |
233 asm volatile("mov %%cr2, %0" : "=r" (faulting_address)); | 235 asm volatile("mov %%cr2, %0" : "=r" (faulting_address)); |
234 | 236 |
235 printf("INT14 called! Page fault for address 0x%X!\n", faulting_address); | 237 printf("INT14 called! Page fault for address 0x%X!\n", faulting_address); |
236 if ( (faulting_address & 0xF0000000) == 0xD0000000 ) { | 238 if ( (faulting_address & 0xF0000000) == 0xD0000000 ) { |
296 printf("INT34 called!\n"); | 298 printf("INT34 called!\n"); |
297 } | 299 } |
298 | 300 |
299 void INTDEF_handler() | 301 void INTDEF_handler() |
300 { | 302 { |
301 printf("Default int handler called\n"); | 303 panic("Default int handler called\n"); |
302 } | 304 } |
303 | 305 |
304 | 306 |