120 {
121 bool not_present;
123 bool user;
124 void *fault_addr;
125
126
127
128
129
130
131 fault_addr = (void *) rcr2();
132
133
134
136
137
138
142
143#ifdef VM
144
146 return;
147#endif
148
150
152
153
154 printf (
"Page fault at %p: %s error %s page in %s context.\n",
155 fault_addr,
156 not_present ? "not present" : "rights violation",
157 write ?
"writing" :
"reading",
158 user ? "user" : "kernel");
160}
#define PF_W
Definition: exception.h:6
#define PF_P
Definition: exception.h:5
#define PF_U
Definition: exception.h:7
enum intr_level intr_enable(void)
Definition: interrupt.c:136
void exit(int status) NO_RETURN
현재 프로세스를 종료시키는 시스템 콜
Definition: syscall.c:173
int write(int fd, const void *buffer, unsigned length)
열린 파일에 데이터를 쓰는 시스템 콜
Definition: syscall.c:336
uint64_t error_code
Definition: interrupt.h:52
bool vm_try_handle_fault(struct intr_frame *f, void *addr, bool user, bool write, bool not_present)