1 |
$Id: TODO,v 1.410 2006/11/06 05:32:38 debug Exp $ |
$Id: TODO,v 1.464 2007/03/16 14:13:59 debug Exp $ |
2 |
|
|
3 |
This file is my list of things I want to work on in the future. It is in |
------------------------------------------------------------------------------- |
|
random order, and some parts of it are probably out-to-date by now. |
|
4 |
|
|
5 |
|
Landisk SH4: |
6 |
|
HITTA OCH FIXA SH4-STABILITETSPROBLEMEN! |
7 |
|
SH4 RTC, läs värdmaskinens klocka. |
8 |
|
När NetBSD 4.0 och OpenBSD 4.1 kommit ut, uppdatera |
9 |
|
installationsinstruktionerna i dokumentationen, flytta upp till |
10 |
|
supportat OS (guestos & index). |
11 |
|
Lägg till landisk i emulated machines i intro.html. |
12 |
|
Sätt machine_landisk stable = 1, om/när allt funkar. |
13 |
|
|
14 |
|
Add a special function to the testmachine devices, console perhaps? |
15 |
|
which prints a zero-terminated string like "[[ %s ]]\n" when given |
16 |
|
a virtual memory address (or a physical? or perhaps both should be possible). |
17 |
|
o) NOT to the console, but to the emulator's controlling terminal. |
18 |
|
DEBUG output, not console output! |
19 |
|
o) Very useful for debugging. DOCUMENT it! |
20 |
|
|
21 |
|
Fix the PowerPC DECR interrupt speed! (MacPPC and PReP speed, etc.) |
22 |
|
|
23 |
|
Prova att installera GNU Linux/DECstation _UTAN_ |
24 |
|
slow_serial_interrupts_hack_for_linux! Det kanske funkar med |
25 |
|
nya interruptsystemet? |
26 |
|
|
27 |
|
------------------------------------------------------------------------------- |
28 |
|
|
29 |
|
Possible (relatively large) work packages to concentrate on in the future: |
30 |
|
|
31 |
|
x) SMP: |
32 |
|
Get SMP working again. It is pretty much broken since I started |
33 |
|
the conversion from the old bintrans system to the new dyntrans system. |
34 |
|
Add better Test machine demos for SMP in the demos directory. |
35 |
|
Either multiple dev_mp (one per cpu), or the single dev_mp must |
36 |
|
_really_ keep all per-cpu values separate. |
37 |
|
|
38 |
|
x) Alpha and SPARC emulation: |
39 |
|
These are the next two CPU/machine families that I want to emulate. |
40 |
|
|
41 |
|
x) Network: |
42 |
|
Redesign of the networking subsystem, at least the NAT translation |
43 |
|
part. The current way of allowing raw ethernet frames to be |
44 |
|
transfered to/from the emulator via UDP should probably be extended |
45 |
|
to allow the frames to be transmitted other ways as well. |
46 |
|
Also adding support for connecting ttys (either to xterms, or to |
47 |
|
pipes/sockets etc, or even to PPP->NAT or SLIP->NAT :-). |
48 |
|
Documentation updates (!) are very important, making it easier to |
49 |
|
use the (already existing) network emulation features. |
50 |
|
|
51 |
|
x) PCI: |
52 |
|
Pretty much everything related to runtime configuration, device |
53 |
|
slots, interrupts, whatever. The current code is very hardcoded |
54 |
|
and ugly. |
55 |
|
o) Allow cards to be added/removed during runtime more easily. |
56 |
|
o) Allow cards to be enabled/disabled (i/o ports, etc, like |
57 |
|
NetBSD needs for disk controller detection). |
58 |
|
o) Allow devices to be moved in memory during runtime. |
59 |
|
o) Interrupts per PCI slot, etc. (A-D). |
60 |
|
o) PCI interrupt controller logic... very hard to get right, |
61 |
|
because these differ a lot from one machine to the next. |
62 |
|
|
63 |
|
x) Debugging: |
64 |
|
Think more about SMP debugging, etc. Right now, the |
65 |
|
debugger is a mess. Also, a better connection to GDB would be |
66 |
|
very nice to have. |
67 |
|
|
68 |
|
x) Userland emulation: |
69 |
|
Primary goals would be NetBSD and Linux syscall emulation. |
70 |
|
|
71 |
|
x) Variable-length ISA support: |
72 |
|
The support for emulation of variable length ISAs (such as |
73 |
|
M68K, AMD64/i386, or AVR32) is not really there yet. It would |
74 |
|
be very fun to work on this, to get it right. |
75 |
|
|
76 |
|
x) Native code generation backends. |
77 |
|
Not necessary to have the emulator working, but speed is |
78 |
|
always nice to have. |
79 |
|
|
80 |
|
x) Remove all "addr mult" device support! |
81 |
|
Long term goal. Replace the current hacks with address |
82 |
|
multiplication _per device_ with layered devices, so that the |
83 |
|
end device (wdc, ns16550, whatever) only supports one access |
84 |
|
style, and the layers in between convert to 16/32/64-bit |
85 |
|
word alignment. |
86 |
|
|
87 |
|
And of course, there are _LOTS_ of minor TODOs spread out throughout |
88 |
|
the source code, which must be fixed sooner or later. |
89 |
|
|
90 |
|
------------------------------------------------------------------------------- |
91 |
|
|
92 |
|
Some other things, in random order, that I'd like to fix: (Some items in |
93 |
|
this list are probably out-to-date by now.) |
94 |
|
|
95 |
Dyntrans: |
Dyntrans: |
96 |
x) Instruction combination collisions? How to avoid easily... |
x) Instruction combination collisions? How to avoid easily... |
104 |
kludgy very fast.) |
kludgy very fast.) |
105 |
x) Dyntrans with SMP... lots of work to be done here. |
x) Dyntrans with SMP... lots of work to be done here. |
106 |
x) Dyntrans with cache emulation... lots of work here as well. |
x) Dyntrans with cache emulation... lots of work here as well. |
107 |
|
x) Remove the concept of base RAM completely; it would be more |
108 |
|
generic to allow RAM devices to be used "anywhere". |
109 |
o) dev_mp doesn't work well with dyntrans yet |
o) dev_mp doesn't work well with dyntrans yet |
110 |
o) In general, IPIs, CAS, LL/SC etc must be made to work with dyntrans |
o) In general, IPIs, CAS, LL/SC etc must be made to work with dyntrans |
111 |
x) Redesign/rethink the delay slot mechanism used for e.g. MIPS, |
x) Redesign/rethink the delay slot mechanism used for e.g. MIPS, |
126 |
(containing code) |
(containing code) |
127 |
x) 16-bit encodings? (MIPS16, ARM Thumb, 32-bit SH on SH64) |
x) 16-bit encodings? (MIPS16, ARM Thumb, 32-bit SH on SH64) |
128 |
x) Lots of other stuff: see src/cpus/README_DYNTRANS |
x) Lots of other stuff: see src/cpus/README_DYNTRANS |
129 |
x) true recompilation backend? think carefully about this, |
x) true recompilation backend? think carefully about this. |
130 |
experiment in a separate project (not in GXemul) |
o) abstract syntax for emitting opcopdes |
131 |
o) First test would be to just implement a simple |
o) convert into native code only after an entire |
132 |
instruction such as MIPS' addiu or lui, on AMD64 |
block has been translated? probably best. |
133 |
hosts... |
o) x86/amd64 code generator can be very similar... perhaps |
134 |
|
o) branches to already translated code blocks can |
135 |
|
link the blocks together |
136 |
|
o) load/store are the most important. |
137 |
|
|
138 |
Simple Valgrind-like checks? |
Simple Valgrind-like checks? |
139 |
o) Mark every address with bits which tell whether or not the address |
o) Mark every address with bits which tell whether or not the address |
179 |
x) watchhi/watchlo exceptions, and other exception |
x) watchhi/watchlo exceptions, and other exception |
180 |
handling details |
handling details |
181 |
o) R10000 and others: (R12000, R14000 ?) |
o) R10000 and others: (R12000, R14000 ?) |
182 |
|
x) The code before the line |
183 |
|
/* reg[COP0_PAGEMASK] = cpu->cd.mips.coproc[0]->tlbs[0].mask & PAGEMASK_MASK; */ |
184 |
|
in cpu_mips.c is not correct for R10000 according to |
185 |
|
Lemote's Godson patches for GXemul. TODO: Go through all |
186 |
|
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 |
187 |
|
and make sure everything works with R10000. |
188 |
|
Then test with OpenBSD/sgi? |
189 |
|
x) Entry LO mask (as above). |
190 |
x) memory space, exceptions, ... |
x) memory space, exceptions, ... |
191 |
x) use cop0 framemask for tlb lookups |
x) use cop0 framemask for tlb lookups |
192 |
(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) |
(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) |
193 |
|
|
194 |
SuperH: |
SuperH: |
|
x) DMA (0xffa00000) |
|
|
x) Instruction tracing should include symbols for branch targets, |
|
|
and so on... |
|
195 |
x) SH4 interrupt controller: |
x) SH4 interrupt controller: |
196 |
x) Implement correct priorities of interrupts |
x) Implement correct priorities of interrupts |
197 |
|
x) SH4 DMA (0xffa00000) |
198 |
|
x) SH4 UBC (0xff200000) |
199 |
|
x) Store queues can copy 32 bytes at a time, there's no need to |
200 |
|
copy individual 32-bit words. (Performance improvement.) |
201 |
x) SH4 BSC (Bus State Controller) |
x) SH4 BSC (Bus State Controller) |
202 |
|
x) SH4 RTC: Read the host's clock. |
203 |
|
x) Instruction tracing should include symbols for branch targets, |
204 |
|
and so on, to make the output more human readable. |
205 |
x) NetBSD/evbsh3, dreamcast, mmeye, hpcsh! Linux? |
x) NetBSD/evbsh3, dreamcast, mmeye, hpcsh! Linux? |
206 |
x) Replace pc-relative loads with immediate load, if within the |
x) Replace pc-relative loads with immediate load, if within the |
207 |
same page. (Similar to the same optimization for ARM.) |
same page. (Similar to the same optimization for ARM.) |
|
x) Floating point exception correctness. |
|
208 |
x) Floating point speed! |
x) Floating point speed! |
209 |
|
x) Floating point exception correctness. |
210 |
x) Think carefully about how to implement SH5/SH64 (for evbsh5). |
x) Think carefully about how to implement SH5/SH64 (for evbsh5). |
211 |
|
|
212 |
Dreamcast: |
Dreamcast: |
213 |
x) CD image bootup: |
x) G2 DMA |
214 |
0) Find IP.BIN, and load it to 0x8c008000. |
x) LAN adapter (dev_mb8696x.c). NetBSD root-on-nfs. |
|
1) Run code at 0x8c008300 (SEGA license code). |
|
|
2) When the license code runs a "boot menu" syscall, |
|
|
load the 1ST_READ.BIN file (unscrambled?) to 0x8c010000. |
|
|
3) Run code at 0x8c00b800 (Bootstrap 1). This will in turn |
|
|
jump to 0x8c00e000 (Bootstrap 2), and then jump to |
|
|
0x8c010000, to start the program. |
|
|
(Try with e.g. Comstedt's Serial IP Slave, to make sure it |
|
|
works as expected.) |
|
|
x) LAN adapter. |
|
215 |
x) PVR: Lots of stuff. See dev_pvr.c. |
x) PVR: Lots of stuff. See dev_pvr.c. |
216 |
|
x) GDROM |
217 |
|
x) Modem |
218 |
|
x) PCI bridge/bus? |
219 |
x) Maple bus: |
x) Maple bus: |
220 |
x) Correct controller input |
x) Correct controller input |
221 |
x) Mouse input |
x) Mouse input |
222 |
x) PROM/BIOS calls: |
x) Software emulation of BIOS calls: |
223 |
x) GD-ROM emulation |
x) GD-ROM emulation: Use the GDROM device. |
224 |
x) NetBSD/dreamcast: Root on nfs? |
x) Use the VGA font as a fake ROM font. (Better than |
225 |
|
nothing.) |
226 |
x) Linux/dreamcast? (The gentoo kernel currently crashes.) |
x) Linux/dreamcast? (The gentoo kernel currently crashes.) |
227 |
|
x) Make as many as possible of the KOS examples run! |
228 |
x) More homebrew demos/games. |
x) More homebrew demos/games. |
229 |
x) Sound emulation (ARM cpu). |
x) SPU: Sound emulation (ARM cpu). |
230 |
x) VME processor emulation? |
x) VME processor emulation? "(Sanyo LC8670 "Potato")" according to |
231 |
|
Wikipedia, LC86K87 according to Comstedt's page. See |
232 |
|
http://www.maushammer.com/vmu.html for a good description of |
233 |
|
the differences between LC86104C and the one used in the VME. |
234 |
|
|
235 |
Transputer: |
Transputer: |
236 |
x) Implement support for Helios binaries. |
x) Implement support for Helios binaries. |
274 |
|
|
275 |
SPARC: |
SPARC: |
276 |
o) Implement Adress space identifiers; load/stores etc. |
o) Implement Adress space identifiers; load/stores etc. |
277 |
o) Save/restore register windows etc! |
o) Save/restore register windows etc! Both v9 and pre-v9! |
278 |
o) Finish the subcc and addcc flag computation code. |
o) Finish the subcc and addcc flag computation code. |
279 |
o) Add more registers (floating point, control regs etc) |
o) Add more registers (floating point, control regs etc) |
280 |
o) Exception/trap handling. |
o) Exception/trap handling. |
291 |
o) Try to make the debugger more modular and, if possible, reentrant! |
o) Try to make the debugger more modular and, if possible, reentrant! |
292 |
o) Remove the emul command? (But show network info if showing |
o) Remove the emul command? (But show network info if showing |
293 |
machines?) |
machines?) |
294 |
|
o) Evaluate expressions within []? That would allow stuff like |
295 |
|
cpu[x] where x is an expression. |
296 |
o) Settings: |
o) Settings: |
297 |
x) Special handlers for Write! |
x) Special handlers for Write! |
298 |
+) MIPS coproc regs |
+) MIPS coproc regs |
302 |
o) see src/debugger.c for more |
o) see src/debugger.c for more |
303 |
|
|
304 |
POWER/PowerPC: |
POWER/PowerPC: |
305 |
x) find and fix the bug which causes NetBSD/macppc to fail after |
x) Fix DECR timer speed, so it matches the host. |
|
an install! |
|
306 |
x) NetBSD/prep 3.x triggers a possible bug in the emulator: |
x) NetBSD/prep 3.x triggers a possible bug in the emulator: |
307 |
<wdc_exec_command(0xd005e514,0xd60cdd30,0,8,..)> |
<wdc_exec_command(0xd005e514,0xd60cdd30,0,8,..)> |
308 |
<ata_get_xfer(0,0xd60cdd30,0,8,..)> |
<ata_get_xfer(0,0xd60cdd30,0,8,..)> |
326 |
x) Floating point exception correctness. |
x) Floating point exception correctness. |
327 |
x) Alignment exceptions. |
x) Alignment exceptions. |
328 |
|
|
329 |
|
PReP: |
330 |
|
Clock time! ("Bad battery blah blah") |
331 |
|
|
332 |
Algor: |
Algor: |
333 |
o) Other models than the P5064? |
o) Other models than the P5064? |
334 |
o) PCI interrupts... needed for stuff like the tlp NIC? |
o) PCI interrupts... needed for stuff like the tlp NIC? |
335 |
|
|
336 |
|
BeBox: |
337 |
|
o) Interrupts. There seems to be a problem with WDC interrupts |
338 |
|
"after a short while", although a few interrupts get through? |
339 |
|
o) Perhaps find a copy of BeOS and try it? |
340 |
|
|
341 |
HPCmips: |
HPCmips: |
342 |
x) Mouse/pad support! :) |
x) Mouse/pad support! :) |
343 |
x) A NIC? (As a PCMCIA device?) |
x) A NIC? (As a PCMCIA device?) |
345 |
AVR: |
AVR: |
346 |
o) Everything. |
o) Everything. |
347 |
|
|
|
AVR32: |
|
|
o) Everything. It would be good if there was NetBSD/avr32 to |
|
|
experiment with... |
|
|
|
|
348 |
ARM: |
ARM: |
349 |
o) See netwinder_reset() in NetBSD; the current "an internal error |
o) See netwinder_reset() in NetBSD; the current "an internal error |
350 |
occured" message after reboot/halt is too ugly. |
occured" message after reboot/halt is too ugly. |
351 |
o) ARM "wait"-like instruction? |
o) ARM "wait"-like instruction? |
352 |
o) try to get netbsd/evbarm 3.x running (iq80321) |
o) try to get netbsd/evbarm 3.x or 4.x running (iq80321) |
353 |
o) make the xscale counter registers (ccnt) work |
o) make the xscale counter registers (ccnt) work |
354 |
o) make the ata controller usable for FreeBSD! |
o) make the ata controller usable for FreeBSD! |
355 |
o) zaurus for openbsd... |
o) Zaurus emulation: |
356 |
o) debian/cats crashes because of unimplemented coproc stuff. |
x) OpenBSD/zaurus |
357 |
|
x) NetBSD/zaurus? See the following URL: |
358 |
|
http://mail-index.netbsd.org/port-arm/2006/11/19/0000.html |
359 |
|
o) Debian/cats crashes because of unimplemented coproc stuff. |
360 |
fix this? |
fix this? |
361 |
|
|
362 |
Test machines: |
Test machines: |
363 |
+ dev_fb block fill and copy |
o) dev_fb block fill and copy |
364 |
+ dev_fb draw characters (from the built-in font)? |
o) dev_fb draw characters (from the built-in font)? |
365 |
+ dev_fb input device? mouse pointer coordinates and buttons |
o) dev_fb input device? mouse pointer coordinates and buttons |
366 |
(allow changes in these to cause interrupts as well?) |
(allow changes in these to cause interrupts as well?) |
367 |
+ Redefine the halt() function so that it stops "sometimes |
o) Redefine the halt() function so that it stops "sometimes |
368 |
soon", i.e. usage in demo code should be: |
soon", i.e. usage in demo code should be: |
369 |
for (;;) { |
for (;;) { |
370 |
halt(); |
halt(); |
371 |
} |
} |
420 |
securely". |
securely". |
421 |
x) Try NetBSD/arc 4.x! (It seems to work with disk images!) |
x) Try NetBSD/arc 4.x! (It seems to work with disk images!) |
422 |
x) NetBSD/pmax 4 install instructions: xterm instead of vt100! |
x) NetBSD/pmax 4 install instructions: xterm instead of vt100! |
423 |
x) DEVICE_TICK in technical.html |
x) BETTER DEVICE EXAMPLES! |
424 |
|
o) Move away from technical.html to somewhere new. |
425 |
|
o) DEVICE_TICK |
426 |
|
o) Implement example devices using interrupts, dyntrans |
427 |
|
memory access, etc.? |
428 |
|
x) Document the dyntrans core? |
429 |
x) Rewrite the section about experimental devices, after the |
x) Rewrite the section about experimental devices, after the |
430 |
framebuffer acceleration has been implemented, and demos |
framebuffer acceleration has been implemented, and demos |
431 |
written. (Symbolic names instead of numbers; example |
written. (Symbolic names instead of numbers; example |
479 |
x) Cobalt TOD is incorrect! |
x) Cobalt TOD is incorrect! |
480 |
x) Go through all other machines, one by one, and fix them. |
x) Go through all other machines, one by one, and fix them. |
481 |
|
|
|
Busses: |
|
|
o) Redesign the entire "mainbus" concept! |
|
|
x) Busses should be placed in a hierarchical tree (?) |
|
|
x) Specific clock/bus speeds, cpu speeds etc. |
|
|
o) Interrupt routing subsystem: |
|
|
x) IF POSSIBLE, try to make the new system work with the |
|
|
current system, but print annoying warning messages. :) |
|
|
Think carefully about this. |
|
|
x) Registry for all available interrupts. |
|
|
+) Each interrupt controller (including CPU cores |
|
|
that can handle interrupts) should register its |
|
|
interrupts, e.g. |
|
|
cpu[0].irq[3] |
|
|
cpu[0].irq[3].pcmcia_slot[1] |
|
|
cpu[0].irq.pci[3] |
|
|
+) Note: MIPS cpus have multiple irqs in the core, |
|
|
while some other CPUs only have one (irq[0] |
|
|
or just irq). |
|
|
x) Users should use interrupt _names_ instead of integers |
|
|
when attaching to an interrupt controller, but when |
|
|
asserting/deasserting irq lines, small integers must |
|
|
still be used (for obvious performance reasons). |
|
|
Figure out a way to do this nicely! |
|
|
x) Any users need to say whether they need the interrupt line |
|
|
exclusively or allow shared access. |
|
|
x) Must work with everything from native IRQs to |
|
|
TurboChannel/PCI/ISA/ADB/PCMCIA/... |
|
|
x) Must work with SMP emulation! |
|
|
x) Make it with device_add(). How does the end user find |
|
|
out the name of an interrupt controller/line in e.g. |
|
|
a configuration file? |
|
|
o) Synchronization over network? or at least in dyntrans within |
|
|
one emulated machine |
|
|
o) Convert to real busses: TurboChannel, PCMCIA, ADB |
|
|
|
|
482 |
Config file parser: |
Config file parser: |
483 |
o) Rewrite it from scratch! |
o) Rewrite it from scratch! |
484 |
o) Usage of any expression available through the debugger |
o) Usage of any expression available through the debugger |
485 |
|
o) Allow interrupt controllers to be added! and interrupts |
486 |
|
to be used in more ways than before |
487 |
o) Support for running debugger commands (like the -c |
o) Support for running debugger commands (like the -c |
488 |
command line option) |
command line option) |
489 |
|
|
501 |
x) generic sound framework |
x) generic sound framework |
502 |
x) add one or more sound cards as devices; add a testmachine |
x) add one or more sound cards as devices; add a testmachine |
503 |
sound card first? |
sound card first? |
504 |
|
x) Dreamcast sound? Generic PCI sound cards? |
505 |
|
|
506 |
ASC SCSI controller: |
ASC SCSI controller: |
507 |
x) NetBSD/arc 2.0 uses the ASC controller in a way which GXemul |
x) NetBSD/arc 2.0 uses the ASC controller in a way which GXemul |
527 |
possible. |
possible. |
528 |
|
|
529 |
File/disk/symbol handling: |
File/disk/symbol handling: |
530 |
|
o) Make sure that disks can be added/removed during runtime! |
531 |
|
(Perhaps this needs a reasonably large re-write.) |
532 |
o) Remove some of the complexity in file format guessing, for |
o) Remove some of the complexity in file format guessing, for |
533 |
Ultrix kernels that are actually disk images? |
Ultrix kernels that are actually disk images? |
534 |
o) Better handling of tape files |
o) Better handling of tape files |
535 |
o) Read function argument count and types from binaries? (ELF?) |
o) Read function argument count and types from binaries? (ELF?) |
536 |
o) Better demangling of C++ names. Note: GNU's C++ differs from e.g. |
o) Better demangling of C++ names. Note: GNU's C++ differs from e.g. |
537 |
Microsoft's C++, so multiple schemes must be possible. See |
Microsoft's C++, so multiple schemes must be possible. See |
540 |
Userland ABI emulation: |
Userland ABI emulation: |
541 |
o) see src/useremul.c |
o) see src/useremul.c |
542 |
|
|
|
Terminal/console: |
|
|
o) allow emulated serial ports to be connected to the outside |
|
|
world in a more generic way, or even to other emulated |
|
|
machines(?) |
|
|
|
|
|
Save state of the whole emulated machine, to be able to load it back |
|
|
in later? (Memory, all device's states, all registers and |
|
|
so on. Like taking a snapshot. (SimOS seems to do this, |
|
|
according to its website.)) |
|
|
|
|
543 |
Better framebuffer and X-windows functionality: |
Better framebuffer and X-windows functionality: |
544 |
o) Generalize the update_x1y1x2y2 stuff to an extend-region() |
o) Generalize the update_x1y1x2y2 stuff to an extend-region() |
545 |
function... |
function... |