--- trunk/TODO 2007/10/08 16:21:34 36 +++ trunk/TODO 2007/10/08 16:22:11 40 @@ -1,96 +1,42 @@ -$Id: TODO,v 1.464 2007/03/16 14:13:59 debug Exp $ +$Id: TODO,v 1.489 2007/05/01 04:05:06 debug Exp $ -------------------------------------------------------------------------------- +-------------------------------------------- -Landisk SH4: - HITTA OCH FIXA SH4-STABILITETSPROBLEMEN! - SH4 RTC, läs värdmaskinens klocka. - När NetBSD 4.0 och OpenBSD 4.1 kommit ut, uppdatera - installationsinstruktionerna i dokumentationen, flytta upp till - supportat OS (guestos & index). - Lägg till landisk i emulated machines i intro.html. - Sätt machine_landisk stable = 1, om/när allt funkar. - -Add a special function to the testmachine devices, console perhaps? -which prints a zero-terminated string like "[[ %s ]]\n" when given -a virtual memory address (or a physical? or perhaps both should be possible). - o) NOT to the console, but to the emulator's controlling terminal. - DEBUG output, not console output! - o) Very useful for debugging. DOCUMENT it! - -Fix the PowerPC DECR interrupt speed! (MacPPC and PReP speed, etc.) - -Prova att installera GNU Linux/DECstation _UTAN_ -slow_serial_interrupts_hack_for_linux! Det kanske funkar med -nya interruptsystemet? - -------------------------------------------------------------------------------- - -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. - Either multiple dev_mp (one per cpu), or the single dev_mp must - _really_ keep all per-cpu values separate. - - x) Alpha and SPARC emulation: - These are the next two CPU/machine families that I want to emulate. - - 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 :-). - Documentation updates (!) are very important, making it easier to - use the (already existing) network emulation features. - - x) PCI: - Pretty much everything related to runtime configuration, device - slots, interrupts, whatever. 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) 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. - - x) Variable-length ISA support: - The support for emulation of variable length ISAs (such as - M68K, AMD64/i386, or AVR32) is not really there yet. It would - be very fun to work on this, to get it right. - - x) Native code generation backends. - Not necessary to have the emulator working, but speed is - always nice to have. - - x) Remove all "addr mult" device support! - Long term goal. Replace the current hacks with address - multiplication _per device_ with layered devices, so that the - end device (wdc, ns16550, whatever) only supports one access - style, and the layers in between convert to 16/32/64-bit - word alignment. +Testing for the next release (0.4.5.1): + +TEST DISK OVERLAY IMAGES +TEST LANDISK/SUPERH EMULATION MODES +REGRESSION TESTS FOR ALL OTHER SUPPORTED GUEST OSES + +# NetBSD/pmax 3.1 or 1.6.2 OK +# NetBSD/arc 1.6.2 OK +# NetBSD/hpcmips 3.1 OK +# NetBSD/cobalt 3.1 OK +# NetBSD/evbmips 3.1 OK +# NetBSD/algor 3.1 OK +# NetBSD/sgimips 3.1 OK +# NetBSD/cats 3.1 OK +# NetBSD/evbarm 2.1 OK +# NetBSD/netwinder 3.1 OK +# NetBSD/prep 2.1 OK +# NetBSD/macppc 3.1 OK +# NetBSD/dreamcast 3.1 MD OK +# NetBSD/dreamcast 3.1 LiveCD OK +# Linux/dreamcast Live CD OK +# OpenBSD/pmax 2.8-BETA not tested because of lack of time +# OpenBSD/cats 4.0 OK +# OpenBSD/landisk 4.1 OK +# Ultrix/RISC 4.5 OK +# Sprite for DECstation OK +# Debian GNU/Linux for pmax not tested because of lack of time -And of course, there are _LOTS_ of minor TODOs spread out throughout -the source code, which must be fixed sooner or later. +Optional: +# OpenBSD/sgi FAILED to boot after setup (as expected) -------------------------------------------------------------------------------- +-------------------------------------------- -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 possibly out-of-date by now.) Dyntrans: x) Instruction combination collisions? How to avoid easily... @@ -126,14 +72,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 @@ -192,28 +149,41 @@ (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 performance is VERY low when running user-space instructions, + because I actually simulate the 4-entry ITLB as being separate + from the 64-entry DTLB. This is correct, but VERY slow. I need + to experiment with _not_ simulating it in too much detail. x) SH4 interrupt controller: - x) Implement correct priorities of interrupts + x) MASKING should be possible! x) SH4 DMA (0xffa00000) x) SH4 UBC (0xff200000) 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) 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) NetBSD HEAD (as of April 2007) hangs during bootup, because it + turns on/off interrupts in an unfortunately synchronized way + with dyntrans. This needs to be fixed. + x) Exceptions for unaligned load/stores. OpenBSD/landisk uses + this mechanism for its reboot code (machine_reset). x) Think carefully about how to implement SH5/SH64 (for evbsh5). +Landisk SH4: + x) When NetBSD/landisk 4.0 has been released, make sure it works + in the emulator. (Update documentation, etc.) + 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: @@ -223,7 +193,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). @@ -232,37 +201,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...? @@ -272,17 +210,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"? @@ -327,7 +265,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? @@ -342,6 +280,17 @@ x) Mouse/pad support! :) x) A NIC? (As a PCMCIA device?) +M88K: + o) Everything. :) + o) More instruction disassembly! + o) Implement more instructions. + o) has-delay-slot (for debugging) + o) Find manuals! + o) MMU stuff + o) Exceptions + o) FPU + o) Control registers + AVR: o) Everything. @@ -379,6 +328,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! @@ -466,6 +424,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?) @@ -473,9 +441,11 @@ 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! + x) NetWinder timeofday is incorrect! It seems to be exactly + 1 day ahead of actual time? x) Cobalt TOD is incorrect! x) Go through all other machines, one by one, and fix them. @@ -494,8 +464,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