/* $NetBSD: TODO,v 1.41 2021/04/03 17:02:31 palle Exp $ */

Things to be done:

common:
- make %g6 point to curcpu
- make %g7 point to curlwp
- change run-time checks for cpu type to function pointers

sun4u:
- GENERIC.UP kernel hangs on v445 (missing interrupt?)

sun4v:
 - current status
     T5 ldom with 2 VCPU and 4GB:
       - kernel boots from miniroot.fs via ldom fisk (vdsk)
	   - ldom virtual network interface (vnet) is working
	     (verified by exiting sysinst and issuing a ping command)
	   - the sysinst tool starts, disk setup is working,
	     but the process crashes when selecting network installation method (trap 0x34 ALIGN is received)
	 T2000 ldom with 8 VCPU and 4GB:
	   - crashes in /sbin/init doing an access() call where %o0 is corrupted (zero)
	 S7 ldom with 8 VCPU and 16GB (primary ldom is Solaris 11.4 SRU30):
	   - during autoconfiguration of vnet devices the call to hv_vintr_setenabled()
	     returns error code 7 (EBADTRAP?)
- 64-bit kernel support
- 32-bit kernel support
- libkvm
- ofwboot: tlb_init_sun4v() hardcodes number of slots to 64
- locore.s: sun4v_datatrap missing implementation for trap level 1
- check build without SUN4V defined
- replace relevant references to %ver with GET_MAXCWP
- pmap_mp_init(): sun4v missing handling
- replace constructs like "wrpr %g0, PSTATE_KERN, %pstate" with NORMAL_GLOBALS
- replace constructs line "wrpr %g0, PSTATE_INTR, %pstate" with ALTERNATE_GOBALS
- sun4v tsb no need to lock... per cpu... anyway...
- ci_tsb_desc->td_ctxidx: -1 or 1?
- MP support - currently bypassed in pmap_bootstrap() for sun4v
- vpci.c/vpcivar.h: cleanup FIXMEs
- interrupts not handled properly (com at ebus only...)
- mpt(4) complains: mpt0: Phy 0: Link Status Unknown
- man pages for drivers imported from OpenBSD lke vpci, vbus, cbus, vdsk, ldc etc.
- vdsk and ldc drivers: code maked with OPENBSD_BUSDMA - make the bus_dma stuff work properly
- vbus.c: handle prom_getprop() memory leaks
- locore.s: rft_user (sun4v specific manaul fill) - seems to work, but is it good enough (compared to openbsds rft_user?
- openfirmware interface
    bounce handlng could need rework
      - only #if __arch64__ independent for SUN4V, as OF for all ultrasparcs is
        plain 32bit code too (and this #if only because the point below becomes
        always false otherwise)
      - only bounce if the address is >= 1UL<<32
      - perhaps apply the lock to OF calls in general, not only the bounce'd ones
        (in other words: let's protect the OF context with the lock, not
        only the bounce buffer contents).
	  - Are there any other bounce-worthy OF calls? If so, apply handling 
	    to all of them now
      - consider method used by Solaris/OpenSolaris/Illumos (look for PROM_32BIT_ADDRS in
	    the Illumos codebase)
 - platforms tested so far:
 -- qemu sun4v/niagara - reaches the point where the kernel needs to mount a root fs
 -- T2000 - mmu fault somewhere
 -- T5 - stickcmpr is not properly initialized ???
