Kurt J. Lidl | 5 Aug 2009 18:47

coldfire port

A question for the netbsd people --

I've been working on and off, along with some others, in
porting netbsd to the coldfire 54455 processor.

The coldfire family of processors started off life as a
Motorola design, and then that part of the company got
spun off as "Freescale Semiconductor".

The coldfire 54xx and 54xxx parts feature a mostly m68k-ish
instruction set, some have hardware floating point (different
than a 68881), and a completely new MMU.  Trap frames are
also different than the m68k family.

The question that I've been mulling over is where to cram
the coldfire specific pieces of the kernel tree.  We started
off work with the family being "m68k" (a la the way the
mvme68k port works), but some significant part of the work
isn't really m68k-ish.  Should there just be a separate "coldfire"
processor family, or just stuff it into "m68k/coldfire"?

There's some stuff that can be used directly from m68k, but
certainly not all.

There are similar thoughts about the assembly stubs in libc
and related places.  If I leave the port based on the m68k
family, I'm going to have to #ifdef basically all of these
assembly files.

The coldfire is like a m68k in terms of assembly instructions, and
(Continue reading)

Allen Briggs | 5 Aug 2009 18:56
Picon

Re: coldfire port

On Wed, Aug 05, 2009 at 12:47:01PM -0400, Kurt J. Lidl wrote:
> Should there just be a separate "coldfire"
> processor family, or just stuff it into "m68k/coldfire"?

I think it should probably be a separate processor family.  If
there are parts that you can bring in from m68k, then perhaps find
a way to use them from a common location, but if you need to riddle
the code with ifdefs or do some kind of Macro Magic to share
significant amounts of code, then I think it's a net loss in
readability and maintainability.

I don't think we're seeing any new m68k hardware/processors/etc.,
and I suspect that as coldfire evolves it will accrete its own
ifdefs.  Is there sufficient reason to carry the m68k baggage,
too?

Those are my thoughts, anyway.

-allen

--

-- 
Allen Briggs  |  http://www.ninthwonder.com/~briggs/  |  briggs <at> ninthwonder.com

Manuel Bouyer | 5 Aug 2009 18:58

Re: coldfire port

On Wed, Aug 05, 2009 at 12:47:01PM -0400, Kurt J. Lidl wrote:
> [...]
> The coldfire is like a m68k in terms of assembly instructions, and
> general purpose registers, but most of the other really low-level stuff
> (floating point, MMU) is different.  Does the instruction set
> similarity with the m68k just cloud the issue that this is really a
> different family of processors?

Is the instruction set different enough so that 68020 userland binaries
won't run on a coldfire ? If so, I'd say it's a different processor family.

Differences in MMU can be dealt with inside the same family without problems.

--

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer <at> lip6.fr
     NetBSD: 26 ans d'experience feront toujours la difference
--

Kurt Lidl | 6 Aug 2009 03:54

Re: coldfire port

Manuel Bouyer wrote:
> On Wed, Aug 05, 2009 at 12:47:01PM -0400, Kurt J. Lidl wrote:
>> [...]
>> The coldfire is like a m68k in terms of assembly instructions, and
>> general purpose registers, but most of the other really low-level stuff
>> (floating point, MMU) is different.  Does the instruction set
>> similarity with the m68k just cloud the issue that this is really a
>> different family of processors?
> 
> Is the instruction set different enough so that 68020 userland binaries
> won't run on a coldfire ? If so, I'd say it's a different processor family.
> 
> Differences in MMU can be dealt with inside the same family without problems.

Without heroic programming effort, no, they won't run.  If you setup the
coldfire with enough illegal instruction handlers and illegal memory
access handlers, you can make *most* code that doesn't do floating point
sorta work.  In fact, such a beast exists:

http://www.microapl.co.uk/Porting/ColdFire/cf68klib.html

But, it's really implementing a huge amount of the m68k architecture as
exception handler fixups.  Sorta interesting from an academic view in
that it *can* be done, but not terribly interesting to actually
implement.  Well, at least not interesting to me.

I'd guess that points towards a new processor family.

-Kurt

(Continue reading)

Curt Sampson | 6 Aug 2009 06:45

Re: coldfire port

On 2009-08-05 21:54 -0400 (Wed), Kurt Lidl wrote:

> Manuel Bouyer wrote:
>> On Wed, Aug 05, 2009 at 12:47:01PM -0400, Kurt J. Lidl wrote:
>>
>> Is the instruction set different enough so that 68020 userland binaries
>> won't run on a coldfire ? If so, I'd say it's a different processor family.

Yes. See http://www.microapl.co.uk/Porting/ColdFire/cf_68k_diffs.html

> I'd guess that points towards a new processor family.

Seems so.

cjs
--

-- 
Curt Sampson       <cjs <at> starling-software.com>        +81 90 7737 2974
           Functional programming in all senses of the word:
                   http://www.starling-software.com

studio | 14 Aug 2009 21:25

Visit our forum

Hello!

Visit our Chechen Muslim forum and register for free!
http://www.selard.com/kamina/

PS. Russian-speakers only!


Gmane