summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/support.S13
-rw-r--r--sys/amd64/amd64/trap.c6
2 files changed, 6 insertions, 13 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S
index bc23e90..c8b6253 100644
--- a/sys/amd64/amd64/support.S
+++ b/sys/amd64/amd64/support.S
@@ -65,17 +65,10 @@ END(bzero)
/* Address: %rdi */
ENTRY(pagezero)
PUSH_FRAME_POINTER
- movq $-PAGE_SIZE,%rdx
- subq %rdx,%rdi
+ movq $PAGE_SIZE/8,%rcx
xorl %eax,%eax
-1:
- movnti %rax,(%rdi,%rdx)
- movnti %rax,8(%rdi,%rdx)
- movnti %rax,16(%rdi,%rdx)
- movnti %rax,24(%rdi,%rdx)
- addq $32,%rdx
- jne 1b
- sfence
+ rep
+ stosq
POP_FRAME_POINTER
ret
END(pagezero)
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index f487c44..ab52a7e 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -812,11 +812,11 @@ trap_fatal(frame, eva)
#endif
if (type == T_PAGEFLT) {
printf("fault virtual address = 0x%lx\n", eva);
- printf("fault code = %s %s %s%s, %s\n",
+ printf("fault code = %s %s %s, %s\n",
code & PGEX_U ? "user" : "supervisor",
code & PGEX_W ? "write" : "read",
code & PGEX_I ? "instruction" : "data",
- code & PGEX_RSV ? " rsv" : "",
+ code & PGEX_RSV ? "reserved bits in PTE" :
code & PGEX_P ? "protection violation" : "page not present");
}
printf("instruction pointer = 0x%lx:0x%lx\n",
@@ -971,7 +971,7 @@ amd64_syscall(struct thread *td, int traced)
}
KASSERT(PCB_USER_FPU(td->td_pcb),
- ("System call %s returing with kernel FPU ctx leaked",
+ ("System call %s returning with kernel FPU ctx leaked",
syscallname(td->td_proc, sa.code)));
KASSERT(td->td_pcb->pcb_save == get_pcb_user_save_td(td),
("System call %s returning with mangled pcb_save",
OpenPOWER on IntegriCloud