Subject: Re: 060 Support (request for comments)
To: Daniel Widenfalk <t94dwi@student.tdb.uu.se>
From: Christian E. Hopps <chopps@water.emich.edu>
List: amiga-dev
Date: 03/19/1995 08:47:02
> >> 2) The 060 support package from Motorola can't "coexist" with the fpsp for

After reading through my 060 manual I am left wondering if the 060sp might
support the 040 also.  In this case we could probably replace the fpsp.

> > You seem to think there is a large difference between the 040 and the
> > 060.  I wasn't aware that there was, but I hvaen't paid to much attention
> > either.  Perhaps you could specifically point out the areas of difference
> > then, I think, we could all make more informed comments.

> OK, Here follows from the M68060UM/AD:
> * The 060 is 100% USER MODE compatible with the 040, WHEN utilized with the
>   M68060SP.

This means gcc and gas don't change.

> * The 060 only has one supervisor stack, the 040 has two.

We only use one.

> * The 060 must have it's branch-cache cleared prior to use

This is as simple as a conditional branch on cpu type  and .word in
the context switch in locore.

> * The TCR register has new bits in the 060. (No problem, set them to 0)

simple locore stuff.

> * The 060 must have it's page descriptors in non-cachable memory

already done under moto's "highly recomended" suggestion (see 040 manual).

> * The Access Error exception generates diffrent exception-frames, and the
>   handling of the exception is very diffrent from the 040s.

So just like the 040 we need to conditionalize the handler for this.

> * PTEST is not implemented in the 060

but plpa is and it will do the same thing for our purposes.

> * MOVEC of MMUSR in not implemented in the 060

This information is provided in the exception frame I believe.

> * Cache-mode encoding is diffrent in the TTRs.

We don't use them.

> * Unimplemented instructions:
> * Unimplemented floating-point instructions:

Will be handled by the 060sp.

> * The 040FPSP uses only _mem_{read,write}. The 060SP uses
>   _imem_read_{word,long} and _dmem_{read,write}_{byte,word,long}

So we provide them.

> * Some (stupid) instructions are not recomended. (Using operands below the
>   supervisor stack -(ssp) and such)

I'm not sure I understand this.  Are you talking about how they recomend
not using emulated instructions while processing exceptions?  If so
then yeah we won't.

I guess my assumption was correct, there is no big difference.  I suggest
that *when* you get your 060 card look at the following:

1) amiga_init: simply add 060 to the 040 checks (if's and #ifdef's) no
other changes should be needed. (i.e. 040 || 060)

2) add a test 060 and branch if not, else clear branch-cache near label
Lres[12] in locore.s

3) add apropriate conditional code to _buserr: in locore.s also may need
to adjust the frame structure used currently in C.

4) incorporate 060sp.

This is all that should be needed.

Since this is like 2 days work at most I suggest you wait until you have
the 060.

Chris.

P.S. I looked at the 060 format 0x07 frame and it doesn't have any of
the write-back stuff.  I don't claim to understand why the 040
uses it and why the 060 doesn't. You'll probably need to understand this
although it may not involve any extra code.