Rev 576 | Rev 769 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 576 | Rev 703 | ||
|---|---|---|---|
| Line 33... | Line 33... | ||
| 33 | #include <arch/i8259.h> |
33 | #include <arch/i8259.h> |
| 34 | #include <func.h> |
34 | #include <func.h> |
| 35 | #include <cpu.h> |
35 | #include <cpu.h> |
| 36 | #include <arch/asm.h> |
36 | #include <arch/asm.h> |
| 37 | #include <mm/tlb.h> |
37 | #include <mm/tlb.h> |
| - | 38 | #include <mm/as.h> |
|
| 38 | #include <arch.h> |
39 | #include <arch.h> |
| 39 | #include <symtab.h> |
40 | #include <symtab.h> |
| 40 | #include <arch/asm.h> |
41 | #include <arch/asm.h> |
| 41 | #include <proc/scheduler.h> |
42 | #include <proc/scheduler.h> |
| 42 | #include <proc/thread.h> |
43 | #include <proc/thread.h> |
| Line 122... | Line 123... | ||
| 122 | #else |
123 | #else |
| 123 | panic("fpu fault"); |
124 | panic("fpu fault"); |
| 124 | #endif |
125 | #endif |
| 125 | } |
126 | } |
| 126 | 127 | ||
| 127 | - | ||
| 128 | - | ||
| 129 | void page_fault(int n, void *stack) |
128 | void page_fault(int n, void *stack) |
| 130 | { |
129 | { |
| - | 130 | __address page; |
|
| - | 131 | ||
| - | 132 | page = read_cr2(); |
|
| - | 133 | if (!as_page_fault(page)) { |
|
| 131 | print_info_errcode(n,stack); |
134 | print_info_errcode(n,stack); |
| 132 | printf("Page fault address: %Q\n", read_cr2()); |
135 | printf("Page fault address: %Q\n", page); |
| 133 | panic("page fault\n"); |
136 | panic("page fault\n"); |
| - | 137 | } |
|
| 134 | } |
138 | } |
| 135 | 139 | ||
| 136 | void syscall(int n, void *stack) |
140 | void syscall(int n, void *stack) |
| 137 | { |
141 | { |
| 138 | printf("cpu%d: syscall\n", CPU->id); |
142 | printf("cpu%d: syscall\n", CPU->id); |