xref: /original-bsd/sys/hp300/DOC/TODO.hp300 (revision c73f6197)
11. Create and use an interrupt stack.
2   Well actually, use the master SP for kernel stacks instead of
3   the interrupt SP.  Right now we use the interrupt stack for
4   everything.
5
62. Copy/clear primitives could be tuned.
7   What is best is highly CPU and cache dependent.  One thing to look
8   at are the copyin/copyout primitives.  Rather than looping using
9   MOVS instructions, you could map an entire page at a time and use
10   bcopy, MOVE16, or whatever.  This would lose big on the VAC models
11   however.
12
133. Sendsig/sigreturn are pretty bogus.
14   Currently we can call a signal handler even if an excpetion
15   occurs in the middle of an instruction.  This causes the handler
16   to return right back to the middle of the offending instruction
17   which will most likely lead to another exception/signal.
18   Technically, I feel this is the correct behavior but it requires
19   saving a lot of state on the user's stack, state that we don't
20   really want the user messing with.  Other 68k implementations
21   (e.g. Sun) will delay signals or abort execution of the current
22   instruction to reduce saved state.  Even if we stick with the
23   current philosophy, the code could be cleaned up.
24
254. Ditto for AST and software interrupt emulation.
26   Both are possibly over-elaborate and inefficiently implemented.
27   We could possibly handle them by using an appropriately planted
28   PS trace bit.
29
305. Make use of transparent translation registers on 030 MMU.
31   With a little rearranging of the KVA space we could use one to
32   map the entire external IO space [ 600000 - 20000000 ).  Since
33   the translation must be 1-1, this would limit the kernel to 6mb
34   (some would say that is hardly a limit) or divide it into two
35   pieces.
36
376. Create a 32-bit timer.
38   Timers 2 and 3 on the MC6840 clock chip can be concatonated together to
39   get a 32-bit countdown timer.  There are at least three uses for this:
40   1. Monitoring the interval timer ("clock") to detect lost "ticks".
41      (Idea from Scott Marovich)
42   2. Implement the DELAY macro properly instead of approximating with
43      the current "while (--count);" loop.  Because of caches, the current
44      method is potentially way off.
45   3. Export as a user-mappable timer for high-precision (4us) timing.
46   Note that by doing this we can no longer use timer 3 as a separate
47   statistics/profiling timer.  Should be able to compile-time (runtime?)
48   select between the two.
49
507. Conditional MMU code sould be restructured.
51   Right now it reflects the evolutionary path of the code: 320/350 MMU
52   was supported and PMMU support was glued on.  The latter can be ifdef'ed
53   out when not needed, but not all of the former (e.g. ``mmutype'' tests).
54   Also, PMMU is made to look like the HP MMU somewhat ham-stringing it.
55   Since HP MMU models are dead, the excess baggage should be there (though
56   it could be argued that they benefit more from the minor performance
57   impact).  MMU code should probably not be ifdef'ed on model type, but
58   rather on more relevant tags (e.g. MMU_HP, MMU_MOTO).
59
608. Redo cache handling.
61   There are way too many routines which are specific to particular
62   cache types.  We should be able to come up with a more coherent
63   scheme (though HP 68k boxes have just about every caching scheme
64   imaginable: internal/external, physical/virtual, writeback/writethrough)
65   See, for example, Wheeler and Bershad in ASPLOS 92.
66
679. 1-1 mapping of physical memory into kernel VA space.
68   This would make the pmap physical copy/zero primitives and the mem.c
69   code easier if not slightly more efficient (cache-inhibit?).  Could use
70   a TTR on the 030.  However, this could eat up a lot of KVA space.
71