-/* $OpenBSD: locore.s,v 1.215 2024/04/08 19:59:57 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.216 2024/04/08 20:00:27 miod Exp $ */
/* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */
/*
* will generate a bus error. Debugging the problem will be a bit
* complicated since lots of register windows will be lost, but what
* can we do?
- *
- * XXX The trap code generates SIGKILL for now.
*/
checkalign:
rdpr %tl, %g2
/*
* syscall_setup() builds a trap frame and calls syscall().
- * sun_syscall is same but delivers sun system call number
* XXX should not have to save&reload ALL the registers just for
* ptrace...
*/
/* see `proc_trampoline' for the reason for this label */
return_from_syscall:
- wrpr %g0, PSTATE_KERN, %pstate ! Disable intterrupts
+ wrpr %g0, PSTATE_KERN, %pstate ! Disable interrupts
wrpr %g0, 0, %tl ! Return to tl==0
ba,a,pt %icc, return_from_trap
nop
jmpl %l1, %o7 ! (*ih->ih_ack)(ih)
mov %l2, %o0
0:
- brnz,pn %l7, 2b ! 'Nother?
+ brnz,pn %l7, 2b ! Another?
mov %l7, %l2
intrcmplt:
/*
- * Re-read SOFTINT to see if any new pending interrupts
+ * Re-read SOFTINT to see if there are any new pending interrupts
* at this level.
*/
mov 1, %l3 ! Ack softint
.globl syscall
/*
- * Various return-from-trap routines (see return_from_trap).
+ * Various return-from-trap routines.
*/
/*
* When returning to user mode, the trap level does not matter, as it
* will be set explicitly.
*
- * If we are returning to user code, we must:
- * 1. Check for register windows in the pcb that belong on the stack.
- * If there are any, reload them
+ * If we are returning to user code, we must check for register windows in
+ * the pcb that belong on the stack, and reload them, if there are any.
*/
return_from_trap:
#ifdef DEBUG
retl
nop
-#endif /* DDB */ /* DDB */
-#if defined(DDB)
+
.globl print_dtlb
print_dtlb:
save %sp, -CC64FSZ, %sp
3:
.asciz "%2d:%016lx %016lx\r\n"
.text
-#endif /* defined(DDB) */
+#endif /* DDB */
.align 8
dostart:
* and the bootops vector in %o2.
*
* All we need to do is:
- *
* 1: Save the prom vector
- *
* 2: Create a decent stack for ourselves
- *
* 3: Install the permanent 4MB kernel mapping
- *
* 4: Call the C language initialization code
- *
*/
/*
GET_CPCB(%o3)
wr %g0, ASI_AIUS, %asi
set Lcopyfault, %o4
-! mov %o7, %g7 ! save return address
membar #Sync
stx %o4, [%o3 + PCB_ONFAULT]
cmp %o2, BCOPY_SMALL
* This is a modified version of bcopy that uses ASI_AIUS. When
* bcopy is optimized to use block copy ASIs, this should be also.
*/
- /*
- * This needs to be reimplemented to really do the copy.
- */
ENTRY(copyout)
- /*
- * ******NOTE****** this depends on bcopy() not using %g7
- */
Ldocopy:
GET_CPCB(%o3)
wr %g0, ASI_AIUS, %asi
set Lcopyfault, %o4
-! mov %o7, %g7 ! save return address
membar #Sync
stx %o4, [%o3 + PCB_ONFAULT]
cmp %o2, BCOPY_SMALL
GET_CPCB(%o3)
membar #Sync
stx %g0, [%o3 + PCB_ONFAULT]
-! jmp %g7 + 8 ! Original instr
wr %g0, ASI_PRIMARY_NOFAULT, %asi ! Restore ASI
membar #StoreStore|#StoreLoad
retl ! New instr
END(copyin32)
! Copyin or copyout fault. Clear cpcb->pcb_onfault and return EFAULT.
-! Note that although we were in bcopy, there is no state to clean up;
-! the only special thing is that we have to return to [g7 + 8] rather than
-! [o7 + 8].
Lcopyfault:
GET_CPCB(%o3)
stx %g0, [%o3 + PCB_ONFAULT]
/*
* memcpy(dst, src, len) - always copies forward.
- *
- * Must not use %g7 (see copyin/copyout above).
*/
ENTRY(memcpy) /* dest, src, size */
cmp %o2, BCOPY_SMALL! (check length for doublecopy first)
.xword u0 ! KVA of proc0 uarea
#ifdef DEBUG
- .comm trapdebug, 4
.comm pmapdebug, 4
#endif /* DEBUG */
-/* $OpenBSD: pmap.c,v 1.117 2024/03/30 07:45:21 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.118 2024/04/08 20:00:27 miod Exp $ */
/* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */
/*
*
if (ctxbusy[oldctx] == 0)
printf("ctx_free: freeing free context %d\n", oldctx);
if (ctxbusy[oldctx] != pm->pm_physaddr) {
- printf("ctx_free: freeing someone esle's context\n "
+ printf("ctx_free: freeing someone else's context\n "
"ctxbusy[%d] = %p, pm(%p)->pm_ctx = %p\n",
oldctx, (void *)(u_long)ctxbusy[oldctx], pm,
(void *)(u_long)pm->pm_physaddr);