1 |
$Id: TODO,v 1.133 2005/05/25 06:40:16 debug Exp $ |
2 |
|
3 |
Here's a short list of what I have left to do on GXemul. This file is a mess. |
4 |
Order is random. Don't trust it to be up-to-date. |
5 |
|
6 |
Caches / memory hierarchies: (this is mostly MIPS-specific) |
7 |
o) MIPS coproc.c: bits in config registers should reflect |
8 |
correct cache sizes for _all_ CPU types. (currently only |
9 |
implemented for R4000, R1x000, and a few others) |
10 |
o) src/memory*.c: Implement correct cache emulation for |
11 |
all CPU types. (currently only R2000/R3000 is implemented) |
12 |
(per CPU, multiple levels should be possible, |
13 |
associativity etc!) |
14 |
o) R2000/R3000 isn't _100%_ correct, just almost correct :) |
15 |
o) Move the -S (fill mem with random) functionality into the |
16 |
memory.c subsystem, not machine.c or wherever it is now |
17 |
o) ECC stuff, simulation of memory errors? (Machine dependant) |
18 |
o) More than 4GB of emulated RAM, when run on a 32-bit host? |
19 |
(using manual swap-out of blocks to disk, ugly) |
20 |
o) A global command line option should be used to turn |
21 |
cache emulation on or off. When off, caches should be |
22 |
faked like they are right now. When on, caches and |
23 |
memory latencies should be emulated as correctly as |
24 |
possible. |
25 |
|
26 |
Network layer: |
27 |
o) Multiple networks per emulation, and let different |
28 |
NICs in machines connect to different networks. |
29 |
o) Network across multiple hosts. |
30 |
o) Fixed MAC addresses for NICs, fixed IPv4 addresses if |
31 |
DHCP or RARP is used. |
32 |
o) many other issues: see src/net.c |
33 |
|
34 |
Configure script: |
35 |
o) Only enable Alpha prefetch on pca56 etc, not on ev4, ev5. |
36 |
o) Use getopts? |
37 |
o) X11 libs and headers via command line option? |
38 |
o) Verify that the configure script, building and running |
39 |
the emulator works on some platforms: |
40 |
+) Irix, AIX, QNX |
41 |
+) MacOS X (I've not tried this personally yet) |
42 |
+) Ultrix using gcc? (Inside the emulator) |
43 |
|
44 |
CPU emulation: |
45 |
o) Binary translation: |
46 |
+) use an Intermediate Representation! |
47 |
+) recursive translation? |
48 |
+) basic blocks instead of one-instruction? :) |
49 |
+) on Alpha: don't assume pca56-like byte load/store? |
50 |
+) write backends for UltraSparc and MIPS |
51 |
+) see src/bintrans.c for more info |
52 |
o) All the non-MIPS modes need a bit of work. |
53 |
|
54 |
MIPS CPU emulation: |
55 |
o) Instructions: |
56 |
o) Regression tests (see tests/README for more info): |
57 |
o) Floating point exception handling, and |
58 |
add more instructions. |
59 |
o) Finish the MIPS16 translator, and test it! |
60 |
o) MIPS ISA I, II, III, IV |
61 |
o) MIPS V (SIMD vector stuff?) |
62 |
o) MDMX (MIPS Digital Media Extension) |
63 |
o) MIPS 3D |
64 |
o) MIPS MT (Multi-thread stuff) (What's this?) |
65 |
o) Warn about mis-used bit fields (ie bits that |
66 |
should be all zeroes, warn about if they are not)! |
67 |
Both for coprocessor registers and for instruction |
68 |
opcodes. |
69 |
o) the special2 stuff is a mess right now |
70 |
o) warn and/or cause exceptions for unimplemented |
71 |
instructions (depending on CPU type) |
72 |
o) R2000/R3000: |
73 |
x) R3000 "tri-byte stores". (What's this?) |
74 |
o) R4000 and others: |
75 |
x) watchhi/watchlo exceptions, and other exception |
76 |
handling details |
77 |
o) R10000 and others: (R12000, R14000 ?) |
78 |
x) memory space, exceptions, ... |
79 |
x) use cop0 framemask for tlb lookups |
80 |
(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) |
81 |
o) Implement load delays? Warnings on interlocks. |
82 |
o) Implement all coprocessor 0 bits / functions. |
83 |
x) coproc 0 selectors! (R4000 ?) |
84 |
o) R4300 (nintendo64, no mmu?), R5900 (playstation2, weird |
85 |
TLB/cache? 128-bit GPRs, new instructions), |
86 |
4K (note: NOT R4000), 5K (note: NOT R5000), |
87 |
R6000 (ISA II), R8000 |
88 |
o) Multi-cpu stuff: |
89 |
+) SGI's NUMA architecture. Study |
90 |
x) Linux sources |
91 |
x) SGI's specs on NUMA address space |
92 |
+) Ultrix? NetBSD doesn't do SMP on MIPS yet :-( |
93 |
+) Own experiments with ycx2. |
94 |
|
95 |
Emulation of specific machines and devices: |
96 |
o) Clean up stuff to make it possible to emulate multiple |
97 |
(different) machines simultaneously. |
98 |
o) Use same clock for all emulations and machines. |
99 |
o) Clean up the device stuff (registering of devices etc) |
100 |
o) Various SCSI and IDE controllers |
101 |
o) PS/2-style keyboard controller (for several machines) |
102 |
o) Generic busses; |
103 |
x) PCI: i/o and interrupts |
104 |
x) QBus-22 (DECsystem 5500, 5400?) |
105 |
o) DECstations (pmax): |
106 |
x) ioasic |
107 |
x) framebuffers: |
108 |
+) better cursor support, overlays?, |
109 |
+) 2D/3D acceleration, PX[G] |
110 |
x) status words / control words, make this more |
111 |
portable/cleaner |
112 |
x) scsi controller(s): sii, DMA for asc |
113 |
x) serial controllers: ssc, scc (and more work on dc?) |
114 |
x) nvram on decstation 5000/125: when using X11, |
115 |
set console=g or similar |
116 |
x) DECstation 5840? "xbi-based SMP" |
117 |
o) SGI and ARC machines (sgimips, arc): |
118 |
x) IP32 ("O2"): (Lots of stuff) |
119 |
+) mec (ethernet) |
120 |
+) pci |
121 |
+) ahc (scsi) |
122 |
+) ps2 kbd |
123 |
+) memory controller |
124 |
+) framebuffer/graphics |
125 |
+) caches |
126 |
x) more ARCBIOS stuff |
127 |
x) Memory/interrupt controllers |
128 |
x) IP30 (Linux with graphics support?) |
129 |
x) SMP / NUMA? (SGI and various ARC machines) |
130 |
o) Playstation 2: |
131 |
Hardware: OHCI usb controller, keyboard, ... |
132 |
o) Cobalt: PCI and interrupt system, ethernet, |
133 |
harddisk controller(s) |
134 |
o) Less interesting platforms: |
135 |
o) newsmips: |
136 |
o) NetBSD/newsmips, get it to detect a "real" |
137 |
model, right now everything is 100% bogus |
138 |
o) mipsco? (NetBSD) |
139 |
o) wgrisc? (big endian R3000, in OpenBSD's attic) |
140 |
o) other embedded / evaluation MIPS boards |
141 |
o) Playstation 1? R3000A. Weird hardware? |
142 |
No FPU, but something as coproc 2. |
143 |
o) Nintendo 64, http://www.nintendo.com/systems/n64/n64_specs.jsp |
144 |
(R4300, 4MB RAM, really weird memory map) |
145 |
o) non-MIPS |
146 |
|
147 |
File/disk handling: |
148 |
o) More than one type of disk in a machine (say, IDE + FLOPPY, |
149 |
or SCSI + IDE); how to handle this nicely? |
150 |
o) Read function argument count and types from binaries? (ELF?) |
151 |
o) ELF: separate LE/BE (MIPS instruction format) from LSB/MSB |
152 |
(ELF structure format)? |
153 |
o) Better handling of tape files |
154 |
o) gzip support (also for non-ISO9660 files) |
155 |
|
156 |
Userland ABI emulation: |
157 |
o) see src/useremul.c |
158 |
|
159 |
Terminal based interactive debugger: |
160 |
o) see src/debugger.c |
161 |
|
162 |
Terminal/console stuff: |
163 |
o) allow emulated serial ports to be connected to the outside |
164 |
world in a more generic way, or even to other emulated |
165 |
machines(!) |
166 |
|
167 |
GDB interface? (Maybe not necessary; the built-in debugger feels |
168 |
more useful.) |
169 |
|
170 |
GUI, interactive debugger? GTK+? (The GUI _must be optional_!) |
171 |
o) Breakpoints (complex expressions? combinations of register |
172 |
states, memory accesses and so on) |
173 |
o) Instruction trace |
174 |
o) Disassembly of RAM (_NOT_ the same as instruction trace) |
175 |
o) Function call trace |
176 |
o) Inspection of CPU registers/state, coprocessor |
177 |
registers/state, any device registers/state/contents |
178 |
o) Framebuffers in windows / tabs. |
179 |
o) Contents of RAM |
180 |
o) "Start new emulation" should allow amount of |
181 |
RAM and nr of cpus to easily be specified. |
182 |
Multiple simultaneous machines should be possible. |
183 |
o) Disk images. |
184 |
|
185 |
Regression tests: |
186 |
o) see tests/ |
187 |
|
188 |
Save state of the whole emulated machine, to be able to load it back |
189 |
in later? (Memory, all device's states, all registers and |
190 |
so on. Like taking a snapshot. (SimOS seems to do this, |
191 |
according to its website.)) |
192 |
|
193 |
Better X-windows functionality: |
194 |
o) CLEAN UP the ugly event code |
195 |
o) Mouse clicks can be "missed" in the current system; this is |
196 |
not good. They should be put on a stack of some kind. |
197 |
o) More 2D and 3D framebuffer acceleration. |
198 |
o) Non-resizable windows? Or choose scaledown depending |
199 |
on size (and center the image, with a black border). |
200 |
o) Different scaledown on different windows? |
201 |
o) Switch scaledown during runtime? (Ala CTRL-ALT-plus/minus) |
202 |
o) Keyboard and mouse events: |
203 |
x) Do this for more machines than just DECstation |
204 |
x) more X11 cursor keycodes |
205 |
x) Keys like CTRL, ALT, SHIFT do not get through |
206 |
by themselves (these are necessary for example |
207 |
to change the font of an xterm in X in the |
208 |
emulator) |
209 |
o) Generalize the framebuffer stuff by moving _ALL_ X11 |
210 |
specific code to src/x11.c! |
211 |
|
212 |
Statistics: (this could be interesting) |
213 |
o) Save to file and show graphics. It should be possible to |
214 |
run gxemul after a simulation to just show the graphics, |
215 |
or convert to a .ppm or .tga or similar. |
216 |
o) memory accesses (to measure cache efficiency and |
217 |
page coloring efficiency) |
218 |
o) nr of simultaneous ASIDs in use in the TLB, for MIPS |
219 |
o) percentage of time spent in different "states", such as |
220 |
running userland code, kernel code, or idling (for CPUs |
221 |
that have such an instruction, or whenever the PC is |
222 |
inside a specific idle-function (address range)). |
223 |
Possible additional state (for example on R3000): caches |
224 |
disabled. |
225 |
o) position of read/write on (SCSI) disks |
226 |
|