BSP-specific init code in arm/shared/start.S?

Martin Galvan martin.galvan at tallertechnologies.com
Fri Feb 20 18:43:37 UTC 2015


Hello everybody! As some of you may already know, we're working on the
TMS570 BSP. According to the board's datasheet we need to initialize
the CPU's registers at startup:

"The TMS570LS series of microcontrollers include dual Cortex-R4F CPUs
running in a lock-step operation mode. A Core Compare Module (CCM-R4)
compares the output signals from each R4F CPU. Any difference in the
two CPUs outputs is flagged as a fault of a high severity level. The
CPU internal core registers need to be initialized to a predefined
state in order to prevent an error from being flagged during system
initialization."

Ideally, we would do this in _start right before initializing the
stack pointer registers. However, this would be wrong as start.S is
shared by all the ARM BSPs. Right now we're doing it at the beginning
of bsp_start, but it would be safer to do it at the beginning of
_start.

Additionally, when the CCM detects an error it raises a FIQ which must
be handled in a board-specific way, otherwise it re-raises the FIQ as
soon as _ARMV4_Exception_fiq_default enables FIQs in the CPSR. Again,
we don't want to mix our BSP-specific things with the shared ARM code.
How should we go about this?

Thanks a lot!

-- 

Martín Galván

Software Engineer

Taller Technologies Argentina

San Lorenzo 47, 3rd Floor, Office 5

Córdoba, Argentina

Phone: 54 351 4217888 / +54 351 4218211


More information about the devel mailing list