--- trunk/TODO 2007/10/08 16:21:17 34 +++ trunk/TODO 2007/10/08 16:21:53 38 @@ -1,47 +1,7 @@ -$Id: TODO,v 1.453 2007/02/19 01:34:42 debug Exp $ +$Id: TODO,v 1.476 2007/04/14 05:39:47 debug Exp $ -------------------------------------------------------------------------------- - -Fix after the 0.4.4 release: - Fix the PowerPC DECR interrupt speed! - -------------------------------------------------------------------------------- - -Possible (relatively large) work packages to concentrate on in the future: - - x) SMP: - Get SMP working again. It is pretty much broken since I started - the conversion from the old bintrans system to the new dyntrans system. - Add better Test machine demos for SMP in the demos directory. - - x) Network: - Redesign of the networking subsystem, at least the NAT translation - part. The current way of allowing raw ethernet frames to be - transfered to/from the emulator via UDP should probably be extended - to allow the frames to be transmitted other ways as well. - Also adding support for connecting ttys (either to xterms, or to - pipes/sockets etc, or even to PPP->NAT or SLIP->NAT :-). - - x) PCI: - Pretty much everything related to runtime configuration, device - slots, interrupts, whatever. The current code is very hardcoded - and ugly. - - x) Debugging: - Think more about SMP debugging, etc. Right now, the - debugger is a mess. Also, a better connection to GDB would be - very nice to have. - - x) Userland emulation: - Primary goals would be NetBSD and Linux syscall emulation. - -And of course, there are _LOTS_ of minor TODOs spread out throughout -the source code, which must be fixed sooner or later. - -------------------------------------------------------------------------------- - -Some other things, in random order, that I'd like to fix: (Some items in -this list are probably out-to-date by now.) +Some things, in totally random order, that I'd like to fix: +(Some items in this list are probably out-to-date by now.) Dyntrans: x) Instruction combination collisions? How to avoid easily... @@ -55,6 +15,8 @@ kludgy very fast.) x) Dyntrans with SMP... lots of work to be done here. x) Dyntrans with cache emulation... lots of work here as well. + x) Remove the concept of base RAM completely; it would be more + generic to allow RAM devices to be used "anywhere". o) dev_mp doesn't work well with dyntrans yet o) In general, IPIs, CAS, LL/SC etc must be made to work with dyntrans x) Redesign/rethink the delay slot mechanism used for e.g. MIPS, @@ -75,14 +37,25 @@ (containing code) x) 16-bit encodings? (MIPS16, ARM Thumb, 32-bit SH on SH64) x) Lots of other stuff: see src/cpus/README_DYNTRANS - x) true recompilation backend? think carefully about this. - o) abstract syntax for emitting opcopdes + x) Native code generation backends: + o) think carefully about this. + o) simple syntax for emitting opcodes; backend implementation + must be optional, so I don't have to write more code + than necessary. after all, the non-native (C) code should + always work. o) convert into native code only after an entire block has been translated? probably best. + o) the "almost native" opcodes may be rearranged, + "peep-hole optimized", etc. and then as a separate step + this list of almost native opcodes is written out + as native code. + o) think about delay slots at the end of a block! o) x86/amd64 code generator can be very similar... perhaps + o) NOTE that generation is per _ABI_, not per host arch! + the configure script must detect ABI!!! o) branches to already translated code blocks can link the blocks together - o) load/store are the most important. + o) load/store are the most important to optimize Simple Valgrind-like checks? o) Mark every address with bits which tell whether or not the address @@ -135,34 +108,40 @@ register definitions according to http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/hdwr/bks/SGI_Developer/books/R10K_UM/sgi_html/t5.Ver.2.0.book_263.html#HEADING334 and make sure everything works with R10000. Then test with OpenBSD/sgi? + x) Entry LO mask (as above). x) memory space, exceptions, ... x) use cop0 framemask for tlb lookups (http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/hdwr/bks/SGI_Developer/books/R10K_UM/sgi_html/t5.Ver.2.0.book_284.html) SuperH: x) SH4 interrupt controller: - x) Implement correct priorities of interrupts + x) MASKING should be possible! x) SH4 DMA (0xffa00000) x) SH4 UBC (0xff200000) + x) SH4 timers are going too fast! x) Store queues can copy 32 bytes at a time, there's no need to copy individual 32-bit words. (Performance improvement.) x) SH4 BSC (Bus State Controller) - x) SH4 RTC: Read the host's clock. - x) SH4 SCIF: Serial _interrupts_ x) Instruction tracing should include symbols for branch targets, and so on, to make the output more human readable. - x) NetBSD/evbsh3, dreamcast, mmeye, hpcsh! Linux? + x) SH3-specific devices: Pretty much everything! + x) NetBSD/evbsh3, mmeye, hpcsh! Linux? x) Replace pc-relative loads with immediate load, if within the same page. (Similar to the same optimization for ARM.) x) Floating point speed! x) Floating point exception correctness. x) Think carefully about how to implement SH5/SH64 (for evbsh5). +Landisk SH4: + x) When NetBSD/landisk 4.0 and OpenBSD/landisk 4.1 have been + released, test to see if they work. (If so, update documentation, + guestos + index, and set stable=1 in machine_landisk.c.) + Dreamcast: x) G2 DMA x) LAN adapter (dev_mb8696x.c). NetBSD root-on-nfs. x) PVR: Lots of stuff. See dev_pvr.c. - x) GDROM + x) Better GDROM support x) Modem x) PCI bridge/bus? x) Maple bus: @@ -172,7 +151,6 @@ x) GD-ROM emulation: Use the GDROM device. x) Use the VGA font as a fake ROM font. (Better than nothing.) - x) Linux/dreamcast? (The gentoo kernel currently crashes.) x) Make as many as possible of the KOS examples run! x) More homebrew demos/games. x) SPU: Sound emulation (ARM cpu). @@ -181,37 +159,6 @@ http://www.maushammer.com/vmu.html for a good description of the differences between LC86104C and the one used in the VME. -Transputer: - x) Implement support for Helios binaries. - x) Stack and register contents at startup? - x) Figure out how to boot an entire Helios distribution. - x) Implement all instructions. :) - -RCA1802/RCA1805, CHIP8: - x) CHIP8 -> RCA180x conversion - x) Think about how to do dual-mode, variable-instr-length - ISAs, and switch between modes. - x) 1805 "extended" opcode -> trigger CHIP8 emulation? - That is, all calls 0NNN could point to 0x68 opcodes, - which, if running on a 1802 in CHIP8-emulation-mode, - would be manually interpreted. - x) Better solution: - CHIP8 calls to 00xx => handle at high level, - calls to 0xxx in general = call 180X machine code - (0000 = reboot?) - x) 1802 info: http://www.nyx.net/~lturner/public_html/Cosmac.html - and: http://www.elf-emulation.com/1802.html - x) 1805 extended opcodes: Implement at least disassembly support! - x) Keyboard input. - x) Sound (beep only). - x) Slow-down to correct speed? Wikipedia: "it was usually operated - at 3.58 MHz/2 to suit the requirements of the 1861 chip which - gave a speed of a little over 100,000 instructions per second" - (Note that _CHIP8_ emulation would then be even slower.) - x) SCHIP48 (Super) emulation: - Some more opcodes, 128x64 framebuffer, larger - sprites and fonts. - Alpha: x) OSF1 PALcode, Virtual memory support. x) PALcode replacement! PAL1E etc opcodes...? @@ -221,17 +168,17 @@ x) More Alpha machine types, so it could work with OpenBSD, FreeBSD, and Linux too? -SPARC: +SPARC (both the ISA and the machines): o) Implement Adress space identifiers; load/stores etc. + o) Exception/trap/interrupt handling. o) Save/restore register windows etc! Both v9 and pre-v9! o) Finish the subcc and addcc flag computation code. o) Add more registers (floating point, control regs etc) - o) Exception/trap handling. o) Disassemly of some more instructions? o) Are sll etc 32-bit sign-extending or zero-extending? - o) Finish the GDB register stuff. - x) Floating point exception correctness. + o) Floating point exception correctness. o) SPARC v8, v7 etc? + o) More machine modes and devices. Debugger: o) How does SMP debugging work? Does it simply use "threads"? @@ -276,7 +223,7 @@ x) Alignment exceptions. PReP: - Clock time! ("Bad battery blah blah") + x) Clock time! ("Bad battery blah blah") Algor: o) Other models than the P5064? @@ -301,7 +248,10 @@ o) try to get netbsd/evbarm 3.x or 4.x running (iq80321) o) make the xscale counter registers (ccnt) work o) make the ata controller usable for FreeBSD! - o) Zaurus emulation, for e.g. OpenBSD/zaurus + o) Zaurus emulation: + x) OpenBSD/zaurus + x) NetBSD/zaurus? See the following URL: + http://mail-index.netbsd.org/port-arm/2006/11/19/0000.html o) Debian/cats crashes because of unimplemented coproc stuff. fix this? @@ -325,6 +275,15 @@ possibly other live-CD formats.) Networking: + x) Redesign of the networking subsystem, at least the NAT translation + part. The current way of allowing raw ethernet frames to be + transfered to/from the emulator via UDP should probably be + extended to allow the frames to be transmitted other ways as + well. + x) Also adding support for connecting ttys (either to xterms, or to + pipes/sockets etc, or even to PPP->NAT or SLIP->NAT :-). + x) Documentation updates (!) are very important, making it easier to + use the (already existing) network emulation features. x) Fix performance problems caused by only allowing a single TCP packet to be unacked. x) Don't hardcode offsets into packets! @@ -412,6 +371,16 @@ x) refactor various clocks/nvram/cmos into one device? PCI: + x) Pretty much everything related to runtime configuration, device + slots, interrupts, etc must be redesigned/cleaned up. The current + code is very hardcoded and ugly. + o) Allow cards to be added/removed during runtime more easily. + o) Allow cards to be enabled/disabled (i/o ports, etc, like + NetBSD needs for disk controller detection). + o) Allow devices to be moved in memory during runtime. + o) Interrupts per PCI slot, etc. (A-D). + o) PCI interrupt controller logic... very hard to get right, + because these differ a lot from one machine to the next. x) last write was ffffffff ==> fix this, it should be used together with a mask to get the correct bits. also, not ALL bits are size bits! (lowest 4 vs lowest 2?) @@ -419,6 +388,7 @@ x) generalize the interrupt routing stuff (lines etc) Clocks and timers: + x) Fix the PowerPC DECR interrupt speed! (MacPPC and PReP speed, etc.) x) DON'T HARDCODE 100 HZ IN cpu_mips_coproc.c! x) Test the 8253? Right now it doesn't seem to be used? x) NetWinder timeofday is incorrect! @@ -440,8 +410,13 @@ o) non-IEEE modes (i.e. x86)? Userland emulation: - x) Lots of stuff; freebsd and netbsd (and linux?) syscalls. - x) Dynamic linking? Hm. + x) Dynamic linking! + x) Lots of stuff; freebsd, netbsd, linux, ... syscalls. + x) Initial register/stack contents (environment, command line args). + x) Return value (from main). + x) mmap emulation layer + x) errno emulation layer + x) struct conversions for may syscalls Sound: x) generic sound framework