mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-30 00:00:15 +01:00
clear cr2 after handling the page fault
This commit is contained in:
parent
c1d0094162
commit
c94f6830f6
2 changed files with 9 additions and 2 deletions
|
@ -290,6 +290,9 @@ void page_fault_handler(struct state *s)
|
|||
|
||||
spinlock_irqsave_unlock(&page_lock);
|
||||
|
||||
// clear cr2 to signalize that the pagefault is solved by the pagefault handler
|
||||
write_cr2(0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -308,6 +311,9 @@ default_handler:
|
|||
if (task->heap)
|
||||
LOG_ERROR("Heap 0x%llx - 0x%llx\n", task->heap->start, task->heap->end);
|
||||
|
||||
// clear cr2 to signalize that the pagefault is solved by the pagefault handler
|
||||
write_cr2(0);
|
||||
|
||||
apic_eoi(s->int_no);
|
||||
//do_abort();
|
||||
sys_exit(-EFAULT);
|
||||
|
|
|
@ -311,8 +311,9 @@ int smp_main(void)
|
|||
print_status();
|
||||
|
||||
/* wait for the other cpus */
|
||||
while(atomic_int32_read(&cpu_online) < atomic_int32_read(&possible_cpus))
|
||||
while(atomic_int32_read(&cpu_online) < atomic_int32_read(&possible_cpus)) {
|
||||
PAUSE;
|
||||
}
|
||||
|
||||
while(1) {
|
||||
check_workqueues();
|
||||
|
@ -387,7 +388,7 @@ static int initd(void* arg)
|
|||
// initialize network
|
||||
err = init_netifs();
|
||||
|
||||
if(is_uhyve()) {
|
||||
if (is_uhyve()) {
|
||||
int i;
|
||||
uhyve_cmdsize_t uhyve_cmdsize;
|
||||
uhyve_cmdval_t uhyve_cmdval;
|
||||
|
|
Loading…
Add table
Reference in a new issue