Zynq SMP Not Working?

Misra, Avinash Avinash.Misra at jhuapl.edu
Thu Dec 13 00:12:51 UTC 2018


Hi,

I'm having some issues with running an RTEMS application configured with more than 1 CPU. I'm using RTEMS5 checked out from Nov 8 (git hash b3c624d8886db6e791babe5e0d4f8b28992e000a).


What I've done is currently modified the sample Hello World application, based off of smp01, to print out the number of processors RTEMS detects with the rtems_get_processor_count() method. Initially this method reported 1 which made sense since I didn't have  CONFIGURE_MAXIMUM_PROCESSORS defined.

After setting #define CONFIGURE_MAXIMUM_PROCESSORS to 2 what I see is that I no longer get any serial output from the program. I'm not quite sure what's going on.


The entirety of my program is as follows (also attached to this email):

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <rtems.h>
#include <tmacros.h>


const char rtems_test_name[] = "HELLO WORLD";

static rtems_task Init(
  rtems_task_argument ignored
)
{

  rtems_print_printer_fprintf_putc(&rtems_test_printer);
  TEST_BEGIN();
  #ifdef RTEMS_SMP
    printf("SMP SUPPORT ENABLED\n");
   #else
    printf("NO SMP SUPPORT ENABLED\n");
  #endif
  printf( "Hello Windows RTEMS SMP\n" );
  uint32_t cpu_count = rtems_get_processor_count();
  printf("CPU Count is %d\n", cpu_count);
  TEST_END();
  rtems_test_exit( 0 );
}


#define CONFIGURE_INIT

/* NOTICE: the clock driver is explicitly disabled */
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
#define CONFIGURE_MAXIMUM_PROCESSORS 2
#define CONFIGURE_MAXIMUM_TASKS (CONFIGURE_MAXIMUM_PROCESSORS + 1)
#define CONFIGURE_MAXIMUM_SEMAPHORES 1

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE

#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT

#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION


#define CONFIUGRE_SCHEDULER_PRIORITY_AFFINITY_SMP


#include <rtems/confdefs.h>


The output when I have CONFIGURE_MAXIMUM_PROCESSORS to 1 can be seen the screenshot below (also attached to this thread).

[cid:image001.png at 01D4924E.ACA8B930]



Any idea what might be going on here or if there's something that I'm doing incorrectly?

Thanks,
Avi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20181213/32c7004d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 12264 bytes
Desc: image001.png
URL: <http://lists.rtems.org/pipermail/devel/attachments/20181213/32c7004d/attachment-0002.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: init.c
URL: <http://lists.rtems.org/pipermail/devel/attachments/20181213/32c7004d/attachment-0001.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello_out_1processors.PNG
Type: image/png
Size: 11333 bytes
Desc: hello_out_1processors.PNG
URL: <http://lists.rtems.org/pipermail/devel/attachments/20181213/32c7004d/attachment-0003.png>


More information about the devel mailing list