TODO revision 1.32
11.32Spalle/* $NetBSD: TODO,v 1.32 2021/01/31 19:08:05 palle Exp $ */ 21.1Spalle 31.1SpalleThings to be done: 41.1Spalle 51.5Spallecommon: 61.5Spalle- make %g6 point to curcpu 71.5Spalle- make %g7 point to curlwp 81.8Spalle- change run-time checks for cpu type to function pointers 91.5Spalle 101.1Spallesun4u: 111.10Spalle- GENERIC.UP kernel hangs on v445 (missing interrupt?) 121.1Spalle 131.1Spallesun4v: 141.32Spalle - current status: 151.32Spalle The kernel boots and starts userland. 161.32Spalle During the execution of the sysinst process, a sub-process crashes. 171.32Spalle The crash happens when a call to sysctl from /bin/sh causes a mmu trap. 181.32Spalle Part of the TRAP_SETUP() call in sun4v_datatrap issues a 'save' instruction. 191.32Spalle Since %cansave is 0 (%canrestore is 6 and %otherwin is 0) a SPILL trap is generated. 201.32Spalle The current code ends up in the pcbspill codepath (which is based on code from openbsd). 211.32Spalle This code assumes that it is the register window in the OTHERWIN window that must be spilled 221.32Spalle to the pcb. 231.32Spalle Since %otherwin in this scenario actually is zero, we end up putting incorrect register 241.32Spalle window values to the pcb. 251.32Spalle So - this code should not save data to the pcb when %otherwin is 0 - it should spill the 261.32Spalle values to the stack of the user process. Special care should be taken here, since we 271.32Spalle may end up with a mmu fault again if the stack address is not present in the mmu, so 281.32Spalle perhaps spilling to the physical address of the stack will work. 291.32Spalle Time will show if this is correct... 301.1Spalle- 64-bit kernel support 311.1Spalle- 32-bit kernel support 321.2Spalle- libkvm 331.2Spalle- ofwboot: tlb_init_sun4v() hardcodes number of slots to 64 341.17Spalle- locore.s: sun4v_datatrap missing implementation for trap level 1 351.5Spalle- check build without SUN4V defined 361.13Spalle- replace relevant references to %ver with GET_MAXCWP 371.6Spalle- pmap_mp_init(): sun4v missing handling 381.6Spalle- replace constructs like "wrpr %g0, PSTATE_KERN, %pstate" with NORMAL_GLOBALS 391.6Spalle- replace constructs line "wrpr %g0, PSTATE_INTR, %pstate" with ALTERNATE_GOBALS 401.7Spalle- sun4v tsb no need to lock... per cpu... anyway... 411.7Spalle- ci_tsb_desc->td_ctxidx: -1 or 1? 421.14Spalle- MP support - currently bypassed in pmap_bootstrap() for sun4v 431.12Spalle- vpci.c/vpcivar.h: cleanup FIXMEs 441.30Sskrll- interrupts not handled properly (com at ebus only...) 451.18Spalle- mpt(4) complains: mpt0: Phy 0: Link Status Unknown 461.20Spalle- man pages for drivers imported from OpenBSD lke vpci, vbus, cbus, vdsk, ldc etc. 471.20Spalle- vdsk and ldc drivers: code maked with OPENBSD_BUSDMA - make the bus_dma stuff work properly 481.22Spalle- vbus.c: handle prom_getprop() memory leaks 491.25Spalle- locore.s: rft_user (sun4v specific manaul fill) - seems to work, but is it good enough (compared to openbsds rft_user? 501.27Spalle - platforms tested so far: 511.27Spalle -- qemu sun4v/niagara - crash in init process relaed to fork (stack?) 521.27Spalle -- T2000 - mmu fault somewhere 531.27Spalle -- T5 - stickcmpr is not properly initialized ??? 54