Which PowerPC BSP/libcpu to base new port on?
Thomas Doerfler
Thomas.Doerfler at imd-systems.de
Sat Nov 23 16:55:21 UTC 2002
Hi,
> On Thu, 2002-11-21 at 10:37, Thomas Doerfler wrote:
> > Hi,
> >
> >
> >
> > > I am thinking of porting RTEMS to an mpc555 based board (you may have seen
> > > some of my other posts...) and I was wondering which existing BSP/libcpu code
> > > would be the easiest/best to start with. So far I have been looking at the
> > > mpc8xx and the mpc8260 libcpu stuff, and I can't find much of a difference
> > > between them. The biggest differences that stick out to me so far are these:
> > >
> > > Clock code: the mpc8xx stuff uses the PIT to do the clock, while the mpc8260
> > > uses the decrementer. Which way is better? Would it be the decrementer
> > > method?
> >
> > The Decrementer is available in ALL PPCs, although it has some
> > design flaws. It has a high resolution, so I would recommend
> > using the Decrementer. Nevertheless in general a PIT would do
> > the same job.
>
>
> What kind of flaws? Would the PIT be better suited in that case?
The decrementer doesn't restart automatically when it has
reached zero, it must be reloaded. It will not automatically
correct the time that has been lost after getting a
decrementer interrupt until the CPU really reloads the
decrementer. So reloading the decrementer by software induces
a small slip of time.
I just had a look into the PPCN_60x BSP. There the decrementer
simply gets reloaded with its start value whenever the CPU
reacts on a decrementer interrupt. The time it takes until the
CPU is in the actual interrupt routine is not taken into
account (and note: this time may differ due to blocked
interrupts etc.).
There are several aproaches to handle that, the best one I
know is to reload the decementer depending on the value in the
timebase registers, but, as a conclusion, unsing a "auto-
reload" timer to generate the system tick is much easier.
>
>
> > The console of the MPC5xx is totally different to the MPC8*,
> > but you might "reuse" the console code for the MC68332, its
> > hardware is very similar. (see efi332 BSP)
>
> I was thinking of doing something similar. I do not think I want to use
> the EFI code though, as IIRC its not termios compliant.
Some time ago I have hacked together a termios-based console
driver for the 68332, it is UGLY, but it worked. If you like I
can send it to you.
wkr,
Thomas.
--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler Herbststrasse 8
D-82178 Puchheim Germany
email: Thomas.Doerfler at imd-systems.de
PGP public key available at: http://www.imd-
systems.de/pgp_key.htm
More information about the users
mailing list