TODO revision 1.45
11.45Spalle/* $NetBSD: TODO,v 1.45 2021/09/23 17:51:52 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.34Spalle - current status
151.44Spalle     T5 ldom with 2 VCPU and 4GB  (primary ldom is Solaris 11.4 SRU30)::
161.45Spalle       - kernel boots from miniroot.fs via ldom disk (vdsk)
171.38Spalle	   - ldom virtual network interface (vnet) is working
181.38Spalle	     (verified by exiting sysinst and issuing a ping command)
191.45Spalle	   - the sysinst tool starts, disk setup is working, network configuration is working,
201.45Spalle	     but after the selected (minimal) sets have been downloaded and installed
211.45Spalle		 the 'sh MAKEDEV all' comand hangs.
221.34Spalle	 T2000 ldom with 8 VCPU and 4GB:
231.40Spalle	   - crashes in /sbin/init doing an access() call where %o0 is corrupted (zero)
241.44Spalle	 S7 ldom with 8 VCPU and 16GB (primary ldom is Solaris 11.4 SRU33):
251.44Spalle	   - same status as T5 ldom
261.1Spalle- 64-bit kernel support
271.1Spalle- 32-bit kernel support
281.2Spalle- libkvm
291.2Spalle- ofwboot: tlb_init_sun4v() hardcodes number of slots to 64
301.17Spalle- locore.s: sun4v_datatrap missing implementation for trap level 1
311.5Spalle- check build without SUN4V defined
321.13Spalle- replace relevant references to %ver with GET_MAXCWP
331.6Spalle- pmap_mp_init(): sun4v missing handling
341.6Spalle- replace constructs like "wrpr %g0, PSTATE_KERN, %pstate" with NORMAL_GLOBALS
351.6Spalle- replace constructs line "wrpr %g0, PSTATE_INTR, %pstate" with ALTERNATE_GOBALS
361.7Spalle- sun4v tsb no need to lock... per cpu... anyway...
371.7Spalle- ci_tsb_desc->td_ctxidx: -1 or 1?
381.14Spalle- MP support - currently bypassed in pmap_bootstrap() for sun4v
391.12Spalle- vpci.c/vpcivar.h: cleanup FIXMEs
401.30Sskrll- interrupts not handled properly (com at ebus only...)
411.18Spalle- mpt(4) complains: mpt0: Phy 0: Link Status Unknown
421.20Spalle- man pages for drivers imported from OpenBSD lke vpci, vbus, cbus, vdsk, ldc etc.
431.20Spalle- vdsk and ldc drivers: code maked with OPENBSD_BUSDMA - make the bus_dma stuff work properly
441.22Spalle- vbus.c: handle prom_getprop() memory leaks
451.25Spalle- locore.s: rft_user (sun4v specific manaul fill) - seems to work, but is it good enough (compared to openbsds rft_user?
461.36Spalle- openfirmware interface
471.36Spalle    bounce handlng could need rework
481.36Spalle      - only #if __arch64__ independent for SUN4V, as OF for all ultrasparcs is
491.36Spalle        plain 32bit code too (and this #if only because the point below becomes
501.36Spalle        always false otherwise)
511.36Spalle      - only bounce if the address is >= 1UL<<32
521.36Spalle      - perhaps apply the lock to OF calls in general, not only the bounce'd ones
531.36Spalle        (in other words: let's protect the OF context with the lock, not
541.36Spalle        only the bounce buffer contents).
551.36Spalle	  - Are there any other bounce-worthy OF calls? If so, apply handling 
561.36Spalle	    to all of them now
571.36Spalle      - consider method used by Solaris/OpenSolaris/Illumos (look for PROM_32BIT_ADDRS in
581.36Spalle	    the Illumos codebase)
591.27Spalle - platforms tested so far:
601.33Spalle -- qemu sun4v/niagara - reaches the point where the kernel needs to mount a root fs
611.27Spalle -- T2000 - mmu fault somewhere
621.27Spalle -- T5 - stickcmpr is not properly initialized ???
63