Subject: Re: HyperSPARC woes...
To: Aaron Brown <abrown@eecs.harvard.edu>
From: James Graham <greywolf@siva.captech.com>
List: port-sparc
Date: 10/21/1996 13:33:10
Aaron Brown sez:
# 
# None of this is impossible, it is just annoying, and it would be nice
# to get a general solution that cleans up the huge amounts of special-
# cased code throughout the port. This way it would be much easier to
# add support for currently unsupported hardware as people try it and 
# find hardware bugs/inconsistencies.

How about a front-end generator (precompiler) to handle the .s generation?
It's special-cased, yes, but we seem to have little other choice
in the matter.  I bet someone could write a real simple program which,
given a table of interrupts, etc. with markings for a particular
rev, would output the proper pre-addressing.

Of course, I tend to write goofy little utilities with very little
actual practical value when I get bored, so this might be overkill.
But it could surround it with "#if defined(GENERIC) || MMU_REV == 2/#endif"
pairs, or the like (expound upon this to include types of CPUs and/or
other attributes as necessary...).  At least it would make the hand-coding
a bit less painful, possibly...

Sorry to ramble, just trying to help.  At the moment, no "nice general
solution exists".

# 
# Also, lest it seem otherwise, patching the trap table is not the only
# problem with supporting the hypersparc! I just picked it out as an example
# of the messiness needed to support the multiple CPUs. For example, the
# Hypersparc doesn't have a coherent/physical Icache, so there needs to be
# extra Icache flushing logic, etc., etc...

Then perhaps it's time to look at EVERY system as a potential MP system.
This, too, might be overkill, but it would CERTAINLY produce one version
of icache/dcache/mmu management (no, that's _not_ redundant).

The one thing to which I don't think you'll find a clean solution is
the trap-table and order-of-register-reading problem you described --
since different processors obviously do this differently, with no apparent
pattern to which-goes-where, the best you can do is grit your teeth
and bear it.  Perhaps creating a template file would ease some of the
pain, or the fictional preprocessor above with some tables might help.

I'd volunteer to write it but my grasp of this subject is not great;
I think I understand the concepts of the problem, but the details of the
problem evade me, thus do the details of the solution also evade me.

# 
# --Aaron
# 
# (P.S. sorry if I'm sounding pissed off...I'm fighting with a theory
# problem set and I really *don't* *care* if the Gaussian integers
# are or are not a Euclidean ring today!)
#

[chuckles...]

				--*greywolf->u_flags |= MP_SPARC_CONFUSED;