[RTEMS Project] #2343: [Patch] Fix Zynq SMP boot
RTEMS trac
trac at rtems.org
Mon May 11 07:36:35 UTC 2015
#2343: [Patch] Fix Zynq SMP boot
----------------------------------------+---------------------
Reporter: jbrandmeyer | Owner:
Type: defect | Status: new
Priority: high | Milestone: 4.11.1
Component: SMP | Version: 4.10
Severity: normal | Resolution:
Keywords: zynq, xilinx_zynq_zedboard |
----------------------------------------+---------------------
Comment (by sebastian.huber):
Replying to [comment:11 chrisj]:
> Replying to [comment:10 jbrandmeyer]:
> > Replying to [comment:8 chrisj]:
> > > I am not sure about this change.
> > >
> > > I do not understand the logic in _CPU_SMP_Start_processor where the
CPU index is checked for 1 (cpu1 ?) and if cpu1 has not started it is
kicked. Why would you do this for cpu1 or is the index numbered from 1 (
so cpu0 ?) ?
> > >
> > > The change on partial handles a full SMP initialization for example
the SMP bit in the CP15 ACTLR register.
> >
> > Yes, the CPU's are numbered from zero. The boot sequence is as
follows:
> > The Zynq ROM bootloader loads and executes a single file, itself a
fragment of a proprietary-formatted boot image, typically the Xilinx First
Stage Bootloader (FSBL).
> > The FSBL performs low-level hardware and FPGA fabric initialization
and also loads an arbitrary ELF file (in this case, an RTEMS application)
and starts CPU0 at the ELF's entry point. However, CPU1 sits waiting.
> > So when RTEMS starts its initialization, it is already running on
CPU0. And the only thing that it can possibly do with regards to SMP
initialization is to start CPU1.
>
> I understand the sequence and all I am saying is the logic seems wrong.
If the cpu is 0, ie ...
>
> {{{
> if ( cpu_index == 0 ) {
> }}}
>
> ... then starting cpu1 makes sense. Having cpu1 start itself does not
make sense to me. Maybe I am missing something.
From the documentation:
{{{
/**
* @brief Starts a processor specified by its index.
*
* This function is invoked on the boot processor during system
* initialization.
*
* This function will be called after _CPU_SMP_Initialize().
*
* @param[in] cpu_index The processor index.
*
* @retval true Successful operation.
* @retval false Unable to start this processor.
*/
bool _CPU_SMP_Start_processor( uint32_t cpu_index );
}}}
--
Ticket URL: <http://devel.rtems.org/ticket/2343#comment:12>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list