Module Name: src Committed By: palle Date: Sun Jan 31 19:08:05 UTC 2021
Modified Files: src/sys/arch/sparc64/doc: TODO Log Message: sun4v: update TODO with analysis of sun4v crashes To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc64/doc/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sparc64/doc/TODO diff -u src/sys/arch/sparc64/doc/TODO:1.31 src/sys/arch/sparc64/doc/TODO:1.32 --- src/sys/arch/sparc64/doc/TODO:1.31 Mon Jan 4 15:13:50 2021 +++ src/sys/arch/sparc64/doc/TODO Sun Jan 31 19:08:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: TODO,v 1.31 2021/01/04 15:13:50 skrll Exp $ */ +/* $NetBSD: TODO,v 1.32 2021/01/31 19:08:05 palle Exp $ */ Things to be done: @@ -11,9 +11,22 @@ sun4u: - GENERIC.UP kernel hangs on v445 (missing interrupt?) sun4v: - - current status: The kernel boots and starts the init process. - The following processes seem to crash on and on so more debugging to be done... - + - current status: + The kernel boots and starts userland. + During the execution of the sysinst process, a sub-process crashes. + The crash happens when a call to sysctl from /bin/sh causes a mmu trap. + Part of the TRAP_SETUP() call in sun4v_datatrap issues a 'save' instruction. + Since %cansave is 0 (%canrestore is 6 and %otherwin is 0) a SPILL trap is generated. + The current code ends up in the pcbspill codepath (which is based on code from openbsd). + This code assumes that it is the register window in the OTHERWIN window that must be spilled + to the pcb. + Since %otherwin in this scenario actually is zero, we end up putting incorrect register + window values to the pcb. + So - this code should not save data to the pcb when %otherwin is 0 - it should spill the + values to the stack of the user process. Special care should be taken here, since we + may end up with a mmu fault again if the stack address is not present in the mmu, so + perhaps spilling to the physical address of the stack will work. + Time will show if this is correct... - 64-bit kernel support - 32-bit kernel support - libkvm