Questions for SMP feature.

Thomas Kim thomas73.kim at gmail.com
Mon Apr 17 11:47:39 UTC 2017


Dear Sir,

I get ZynQ real board(name: ZYBO ZynQ-7000 Development Board).
I was succeful to test SMP feature on my ZynQ real board after minor
part(UART config) is modified.
But, after I enable rtems-libbsd in below, RTEMS is not worked.

My example code is below;

void *POSIX_Init(void *argument)
{
 rtems_status_code         sc;
#if 0 // Thomas. when below bsd initialization code is executed, RTEMS is
not worked.
 /* FreeBSD Initialization */
 sc = rtems_media_initialize();
 ASSERT_SC(sc);
 sc = rtems_media_listener_add(media_listener, NULL);
 ASSERT_SC(sc);
 sc = rtems_media_server_initialize(200, 32 * 1024, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES);
 ASSERT_SC(sc);
 sc = rtems_bsd_initialize();
 ASSERT_SC(sc);
 network_ifconfig_lo0();
#endif
 sc = rtems_task_create( rtems_build_name ('S', 'H', 'E', 'L'),
  10, 4096, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, &Task_Shell_id);
 sc = rtems_task_start( Task_Shell_id, shell_start, 1 );
}

At this time, I just used "#define CONFIGURE_MAXIMUM_PROCESSORS    2"
option only for this.

I have questions.

Can RTEMS SMP feature is using both rtems kernel and rtems-libbsd ?
If I need additional configuration for using rtems-libbsd with SMP feaure,
plesae let me know that.

Best Regards,
Thomas Kim.


2017-03-17 18:06 GMT+09:00 Sebastian Huber <
sebastian.huber at embedded-brains.de>:

>
>
> On 17/03/17 10:01, Thomas Kim wrote:
>
>> Dear Sebastian,
>>
>> I already checked BSP code for Xlinx ZynQ and Altera Cyclone V. It was
>> useful for me.
>> I implemented bspsmp.c according to register description of SRC(System
>> Reset Controller) on i.MX6Q manual.
>>
>> You said to me that IO device driver is called on boot processor only.
>> But, As I check io.c in cpukit/sapi/src, there is any code regarding this.
>>
>> void _IO_Initialize_all_drivers( void )
>> {
>>    rtems_device_major_number major;
>>    _IO_All_drivers_initialized = true;
>>    for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
>>      (void) rtems_io_initialize( major, 0, NULL );
>>  }
>>
>> I think that this function should be changed in below;
>>
>
> No, if multiple processors call _IO_Initialize_all_drivers(), then your
> low-level SMP initialization is broken. See comments of Per_CPU_State and
> _CPU_SMP_*() in cpukit/score/cpu/no_cpu/rtems/score/cpu.h for some
> documentation. You can also follow the SMP startup on Qemu to figure out
> how it is supposed to work.
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20170417/c7eb4bc6/attachment.html>


More information about the users mailing list