/* $NetBSD: TODO,v 1.29 2019/02/08 19:55:40 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:
- platforms tried so far:
  - qemu sun4v/niagara
  - T2000
  - T5
  - T5120 (craches when autoconfiguring usb ohci and ehci)

- 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...
- 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
- interrups 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?



#error trap (openbsd) type T_RWRET...
	case T_RWRET:
		/*
		 * XXX Flushing the user windows here should not be
		 * necessary, but not doing so here causes corruption
		 * of user windows on sun4v.  Flushing them shouldn't
		 * be much of a performance penalty since we're
		 * probably going to spill any remaining user windows
		 * anyhow.
		 */
		write_user_windows();
		if (rwindow_save(p) == -1) {
			KERNEL_LOCK();
			trapsignal(p, SIGILL, 0, ILL_BADSTK, sv);
			KERNEL_UNLOCK();
		}
		break;

#error  trap: type 0xfffffffe

#error sun4v_datatrap - ci_rwsp...   pck_rwsp???
#error hvordan kommer der data i pcb_rw???   
/* FIXME pcb_rwsp from openbsd?? */
