Re: [PATCH rtems v3 0/7] Add imxrt BSP

2020-11-20 Thread Christian Mauderer

Thanks for the reviews. I pushed the patches with changes like discussed.

Best regards

Christian

Am 19.11.20 um 09:51 schrieb Christian Mauderer:

Hello,

again an updated version. There haven't been relevant changes beneath
patch 3 (some follow up ones in 7) so I'm only sending patch 3.

Changes:

- renames like suggested by Sebastian
- the MPU is now disabled, set up and re-enabled
- every MPU region is only set up once due to that
- I moved the constants for STM32H7 into a separate file to enable the
   main advantage of that initialization: Allowing the user to provide
   a different configuration in his application.

Best regards

Christian




--

embedded brains GmbH
Christian MAUDERER
Dornierstr. 4
82178 Puchheim
Germany
email: christian.maude...@embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 3/3] validation: Use CONFIGURE_INIT_TASK_STORAGE_SIZE

2020-11-20 Thread Sebastian Huber
Update #4181.
---
 testsuites/validation/ts-default.h | 109 +++--
 1 file changed, 40 insertions(+), 69 deletions(-)

diff --git a/testsuites/validation/ts-default.h 
b/testsuites/validation/ts-default.h
index 0f7db65a8e..ba994cdd1a 100644
--- a/testsuites/validation/ts-default.h
+++ b/testsuites/validation/ts-default.h
@@ -35,12 +35,23 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
 #include 
 
+#define MAX_TLS_SIZE RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT )
+
+#define MAX_TASKS 32
+
+#define TASK_ATTRIBUTES RTEMS_FLOATING_POINT
+
+#define TASK_STORAGE_SIZE \
+  RTEMS_TASK_STORAGE_SIZE( \
+MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE, \
+TASK_ATTRIBUTES \
+  )
+
 static char buffer[ 512 ];
 
 static const T_action actions[] = {
@@ -70,12 +81,28 @@ static const T_config test_config = {
   .actions = actions
 };
 
-static void runner_task( rtems_task_argument arg )
+static rtems_chain_control free_task_storage =
+  RTEMS_CHAIN_INITIALIZER_EMPTY( free_task_storage );
+
+static union {
+  RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT ) char
+storage[ TASK_STORAGE_SIZE ];
+  rtems_chain_node node;
+} task_storage[ MAX_TASKS ];
+
+static void Init( rtems_task_argument arg )
 {
   int exit_code;
 
   (void) arg;
 
+  rtems_chain_initialize(
+&free_task_storage,
+task_storage,
+RTEMS_ARRAY_SIZE( task_storage ),
+sizeof( task_storage[ 0 ] )
+  );
+
   rtems_test_begin( rtems_test_name, TEST_STATE );
   T_register();
   exit_code = T_main( &test_config );
@@ -87,40 +114,6 @@ static void runner_task( rtems_task_argument arg )
   rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, (uint32_t) exit_code );
 }
 
-#define MAX_TLS_SIZE RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT )
-
-#define ATTRIBUTES RTEMS_FLOATING_POINT
-
-#define TASK_STORAGE_SIZE \
-  RTEMS_TASK_STORAGE_SIZE( \
-MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE, \
-ATTRIBUTES \
-  )
-
-#define MAX_TASKS 32
-
-RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT )
-static char runner_task_storage[ TASK_STORAGE_SIZE ];
-
-static const rtems_task_config runner_task_config = {
-  .name = rtems_build_name( 'R', 'U', 'N', ' ' ),
-  .initial_priority = 1,
-  .storage_area = runner_task_storage,
-  .storage_size = sizeof( runner_task_storage ),
-  .maximum_thread_local_storage_size = MAX_TLS_SIZE,
-  .initial_modes = RTEMS_DEFAULT_MODES,
-  .attributes = ATTRIBUTES
-};
-
-static rtems_chain_control free_task_storage =
-  RTEMS_CHAIN_INITIALIZER_EMPTY( free_task_storage );
-
-static union {
-  RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT ) char
-storage[ TASK_STORAGE_SIZE ];
-  rtems_chain_node node;
-} task_storage[ MAX_TASKS ];
-
 static void *task_stack_allocate( size_t size )
 {
   if ( size > sizeof( task_storage[ 0 ] ) ) {
@@ -138,35 +131,6 @@ static void task_stack_deallocate( void *stack )
   );
 }
 
-static void init_runner_task( void )
-{
-  rtems_id id;
-  rtems_status_code sc;
-
-  rtems_chain_initialize(
-&free_task_storage,
-task_storage,
-RTEMS_ARRAY_SIZE( task_storage ),
-sizeof( task_storage[ 0 ] )
-  );
-
-  sc = rtems_task_construct( &runner_task_config, &id );
-  if ( sc != RTEMS_SUCCESSFUL ) {
-rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, 1 );
-  }
-
-  sc = rtems_task_start( id, runner_task, 0 );
-  if ( sc != RTEMS_SUCCESSFUL ) {
-rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, 1 );
-  }
-}
-
-RTEMS_SYSINIT_ITEM(
-  init_runner_task,
-  RTEMS_SYSINIT_CLASSIC_USER_TASKS,
-  RTEMS_SYSINIT_ORDER_MIDDLE
-);
-
 #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
 
 #define CONFIGURE_MAXIMUM_PROCESSORS 4
@@ -183,7 +147,8 @@ RTEMS_SYSINIT_ITEM(
 
 #define CONFIGURE_MAXIMUM_TASKS ( 1 + MAX_TASKS )
 
-#define CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE 1
+#define CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE \
+  CONFIGURE_MAXIMUM_TASKS
 
 #define CONFIGURE_MAXIMUM_TIMERS 3
 
@@ -197,9 +162,7 @@ RTEMS_SYSINIT_ITEM(
 
 #define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
 
-#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
-
-#define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body
+#define CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE MAX_TLS_SIZE
 
 #define CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
 
@@ -207,6 +170,14 @@ RTEMS_SYSINIT_ITEM(
 
 #define CONFIGURE_TASK_STACK_DEALLOCATOR task_stack_deallocate
 
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT_TASK_ATTRIBUTES TASK_ATTRIBUTES
+
+#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
+
+#define CONFIGURE_INIT_TASK_STORAGE_SIZE TASK_STORAGE_SIZE
+
 #if defined(RTEMS_SMP)
 
 #define CONFIGURE_SCHEDULER_EDF_SMP
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 1/3] Avoid INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL

2020-11-20 Thread Sebastian Huber
Replace a runtime check with a compile time assertion.  This makes the
INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL obsolete.

Update #4181.
---
 cpukit/include/rtems/confdefs/inittask.h| 13 ++
 cpukit/include/rtems/score/interr.h |  2 +-
 cpukit/rtems/src/taskinitusers.c|  8 +-
 spec/build/testsuites/sptests/grp.yml   |  2 --
 spec/build/testsuites/sptests/spfatal02.yml | 19 --
 testsuites/sptests/Makefile.am  |  9 ---
 testsuites/sptests/configure.ac |  1 -
 testsuites/sptests/spfatal02/init.c | 28 -
 testsuites/sptests/spfatal02/spfatal02.doc  | 20 ---
 testsuites/sptests/spfatal02/spfatal02.scn  |  3 ---
 10 files changed, 15 insertions(+), 90 deletions(-)
 delete mode 100644 spec/build/testsuites/sptests/spfatal02.yml
 delete mode 100644 testsuites/sptests/spfatal02/init.c
 delete mode 100644 testsuites/sptests/spfatal02/spfatal02.doc
 delete mode 100644 testsuites/sptests/spfatal02/spfatal02.scn

diff --git a/cpukit/include/rtems/confdefs/inittask.h 
b/cpukit/include/rtems/confdefs/inittask.h
index a91b9a5917..25453f031d 100644
--- a/cpukit/include/rtems/confdefs/inittask.h
+++ b/cpukit/include/rtems/confdefs/inittask.h
@@ -100,6 +100,19 @@ extern "C" {
   #define CONFIGURE_INIT_TASK_ARGUMENTS 0
 #endif
 
+/* Ignore potential warnings from the static assertion below */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Waddress"
+#pragma GCC diagnostic ignored "-Wpragmas"
+#pragma GCC diagnostic ignored "-Wtautological-pointer-compare"
+
+RTEMS_STATIC_ASSERT(
+  CONFIGURE_INIT_TASK_ENTRY_POINT != NULL,
+  CONFIGURE_INIT_TASK_ENTRY_POINT_MUST_NOT_BE_NULL
+);
+
+#pragma GCC diagnostic pop
+
 const rtems_initialization_tasks_table _RTEMS_tasks_User_task_table = {
   CONFIGURE_INIT_TASK_NAME,
   CONFIGURE_INIT_TASK_STACK_SIZE,
diff --git a/cpukit/include/rtems/score/interr.h 
b/cpukit/include/rtems/score/interr.h
index 4b06199ae9..b1f1061c82 100644
--- a/cpukit/include/rtems/score/interr.h
+++ b/cpukit/include/rtems/score/interr.h
@@ -189,7 +189,7 @@ typedef enum {
   INTERNAL_ERROR_NO_MEMORY_FOR_HEAP = 23,
   INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR = 24,
   INTERNAL_ERROR_RESOURCE_IN_USE = 25,
-  INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL = 26,
+  /* INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL = 26, */
   /* INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL = 27, */
   INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK = 28,
   INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE = 29,
diff --git a/cpukit/rtems/src/taskinitusers.c b/cpukit/rtems/src/taskinitusers.c
index 0b23d8bc86..f21c061670 100644
--- a/cpukit/rtems/src/taskinitusers.c
+++ b/cpukit/rtems/src/taskinitusers.c
@@ -29,7 +29,6 @@ void _RTEMS_tasks_Initialize_user_task( void )
   rtems_idid;
   rtems_status_code   return_value;
   const rtems_initialization_tasks_table *user_task;
-  rtems_task_entryentry_point;
 
   user_task = &_RTEMS_tasks_User_task_table;
   return_value = rtems_task_create(
@@ -44,14 +43,9 @@ void _RTEMS_tasks_Initialize_user_task( void )
 _Internal_error( INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED );
   }
 
-  entry_point = user_task->entry_point;
-  if ( entry_point == NULL ) {
-_Internal_error( INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL );
-  }
-
   return_value = rtems_task_start(
 id,
-entry_point,
+user_task->entry_point,
 user_task->argument
   );
   _Assert( rtems_is_status_successful( return_value ) );
diff --git a/spec/build/testsuites/sptests/grp.yml 
b/spec/build/testsuites/sptests/grp.yml
index 1c865777a7..b1bf85942d 100644
--- a/spec/build/testsuites/sptests/grp.yml
+++ b/spec/build/testsuites/sptests/grp.yml
@@ -218,8 +218,6 @@ links:
   uid: spextensions01
 - role: build-dependency
   uid: spfatal01
-- role: build-dependency
-  uid: spfatal02
 - role: build-dependency
   uid: spfatal03
 - role: build-dependency
diff --git a/spec/build/testsuites/sptests/spfatal02.yml 
b/spec/build/testsuites/sptests/spfatal02.yml
deleted file mode 100644
index 19e329a027..00
--- a/spec/build/testsuites/sptests/spfatal02.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
-build-type: test-program
-cflags: []
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-cppflags: []
-cxxflags: []
-enabled-by: true
-features: c cprogram
-includes: []
-ldflags: []
-links: []
-source:
-- testsuites/sptests/spfatal02/init.c
-stlib: []
-target: testsuites/sptests/spfatal02.exe
-type: build
-use-after: []
-use-before: []
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 14788f7fb1..8813d43513 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -904,15 +904,6 @@ spfatal01_CPPFLAGS = $(AM_CPPFLAGS) 
$(TEST_FLAGS_spfatal01) \
$(support_includes)
 endif
 
-if TEST_s

[PATCH 2/3] score: Add CONFIGURE_INIT_TASK_STORAGE_SIZE

2020-11-20 Thread Sebastian Huber
In order to better support applications which use the new
rtems_task_construct() directive add the
CONFIGURE_INIT_TASK_STORAGE_SIZE configuration option.  If this option
is specified, then the Classic API initialization task is constructed
with rtems_task_construct().

Update #4181.
---
 cpukit/Makefile.am  |  1 +
 cpukit/doxygen/appl-config.h| 48 +++
 cpukit/include/rtems/confdefs/inittask.h| 53 ++---
 cpukit/include/rtems/rtems/tasksdata.h  | 45 +-
 cpukit/include/rtems/score/interr.h |  3 +-
 cpukit/rtems/src/taskconstructuser.c| 65 +
 cpukit/sapi/src/interrtext.c|  3 +-
 spec/build/cpukit/librtemscpu.yml   |  1 +
 spec/build/testsuites/sptests/grp.yml   |  2 +
 spec/build/testsuites/sptests/spfatal34.yml | 19 ++
 testsuites/sptests/spfatal34/init.c | 50 
 testsuites/sptests/spfatal34/spfatal34.doc  | 11 
 testsuites/sptests/spfatal34/spfatal34.scn  |  8 +++
 testsuites/sptests/spinternalerror02/init.c |  2 +-
 14 files changed, 296 insertions(+), 15 deletions(-)
 create mode 100644 cpukit/rtems/src/taskconstructuser.c
 create mode 100644 spec/build/testsuites/sptests/spfatal34.yml
 create mode 100644 testsuites/sptests/spfatal34/init.c
 create mode 100644 testsuites/sptests/spfatal34/spfatal34.doc
 create mode 100644 testsuites/sptests/spfatal34/spfatal34.scn

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index 8c7f9c1ed4..b7435d7eb6 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -790,6 +790,7 @@ librtemscpu_a_SOURCES += rtems/src/statustoerrno.c
 librtemscpu_a_SOURCES += rtems/src/systemeventreceive.c
 librtemscpu_a_SOURCES += rtems/src/systemeventsend.c
 librtemscpu_a_SOURCES += rtems/src/taskconstruct.c
+librtemscpu_a_SOURCES += rtems/src/taskconstructuser.c
 librtemscpu_a_SOURCES += rtems/src/taskcreate.c
 librtemscpu_a_SOURCES += rtems/src/taskdelete.c
 librtemscpu_a_SOURCES += rtems/src/taskexit.c
diff --git a/cpukit/doxygen/appl-config.h b/cpukit/doxygen/appl-config.h
index 00230ac2d6..f469f8b41c 100644
--- a/cpukit/doxygen/appl-config.h
+++ b/cpukit/doxygen/appl-config.h
@@ -1145,9 +1145,57 @@
  *   out by  does not overflow an integer of type https://en.cppreference.com/w/c/types/integer";>uintptr_t.
  * @endparblock
+ *
+ * @par Notes
+ * @parblock
+ * The
+ *
+ * * ``CONFIGURE_INIT_TASK_STACK_SIZE`` and
+ *
+ * * #CONFIGURE_INIT_TASK_STORAGE_SIZE
+ *
+ * configuration options are mutually exclusive.
+ * @endparblock
  */
 #define CONFIGURE_INIT_TASK_STACK_SIZE
 
+/* Generated from spec:/acfg/if/init-task-storage-size */
+
+/**
+ * @brief This configuration option is an integer define.
+ *
+ * The value of this configuration option defines the task storage size of the
+ * Classic API initialization task.  If this configuration option is specified,
+ * then the Classic API initialization task is constructed by
+ * rtems_task_construct() instead of using rtems_task_create().
+ *
+ * @par Default Value
+ * The default value is 0.
+ *
+ * @par Value Constraints
+ * @parblock
+ * The value of this configuration option shall satisfy all of the following
+ * constraints:
+ *
+ * * It shall be greater than or equal to #CONFIGURE_MINIMUM_TASK_STACK_SIZE.
+ *
+ * * It shall be defined using RTEMS_TASK_STORAGE_SIZE().
+ * @endparblock
+ *
+ * @par Notes
+ * @parblock
+ * A task storage area of the specified size is defined by the configuration
+ * for the Classic API initialization task.  The
+ *
+ * * #CONFIGURE_INIT_TASK_STACK_SIZE and
+ *
+ * * ``CONFIGURE_INIT_TASK_STORAGE_SIZE``
+ *
+ * configuration options are mutually exclusive.
+ * @endparblock
+ */
+#define CONFIGURE_INIT_TASK_STORAGE_SIZE
+
 /* Generated from spec:/acfg/if/rtems-init-tasks-table */
 
 /**
diff --git a/cpukit/include/rtems/confdefs/inittask.h 
b/cpukit/include/rtems/confdefs/inittask.h
index 25453f031d..f1d937e561 100644
--- a/cpukit/include/rtems/confdefs/inittask.h
+++ b/cpukit/include/rtems/confdefs/inittask.h
@@ -48,6 +48,7 @@
 #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -72,15 +73,6 @@
   #define CONFIGURE_INIT_TASK_PRIORITY 1
 #endif
 
-#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
-  #define CONFIGURE_INIT_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE
-#endif
-
-#if CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE
-  #define _CONFIGURE_INIT_TASK_STACK_EXTRA \
-( CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE )
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -113,6 +105,47 @@ RTEMS_STATIC_ASSERT(
 
 #pragma GCC diagnostic pop
 
+#ifdef CONFIGURE_INIT_TASK_STORAGE_SIZE
+
+#ifdef CONFIGURE_INIT_TASK_STACK_SIZE
+  #error "CONFIGURE_INIT_TASK_STACK_SIZE and CONFIGURE_INIT_TASK_STORAGE_SIZE 
are mutually exclusive"
+#endif
+
+RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT )
+static char _RTEMS_tasks_User_task_storage[ CONFIGURE_

[PATCH 0/3] Add CONFIGURE_INIT_TASK_STORAGE_SIZE

2020-11-20 Thread Sebastian Huber
Currently, the Classic API initialization task is created with
rtems_task_create(). In order to better support applications which use
the new rtems_task_construct() directive add the
CONFIGURE_INIT_TASK_STORAGE_SIZE configuration option which constructs
the Classic API initialization task with rtems_task_construct().

Sebastian Huber (3):
  Avoid INTERNAL_ERROR_RTEMS_INIT_TASK_ENTRY_IS_NULL
  score: Add CONFIGURE_INIT_TASK_STORAGE_SIZE
  validation: Use CONFIGURE_INIT_TASK_STORAGE_SIZE

 cpukit/Makefile.am|   1 +
 cpukit/doxygen/appl-config.h  |  48 
 cpukit/include/rtems/confdefs/inittask.h  |  66 +--
 cpukit/include/rtems/rtems/tasksdata.h|  45 +++-
 cpukit/include/rtems/score/interr.h   |   5 +-
 cpukit/rtems/src/taskconstructuser.c  |  65 +++
 cpukit/rtems/src/taskinitusers.c  |   8 +-
 cpukit/sapi/src/interrtext.c  |   3 +-
 spec/build/cpukit/librtemscpu.yml |   1 +
 spec/build/testsuites/sptests/grp.yml |   4 +-
 .../sptests/{spfatal02.yml => spfatal34.yml}  |   4 +-
 testsuites/sptests/Makefile.am|   9 --
 testsuites/sptests/configure.ac   |   1 -
 testsuites/sptests/spfatal02/init.c   |  28 -
 testsuites/sptests/spfatal02/spfatal02.doc|  20 
 testsuites/sptests/spfatal02/spfatal02.scn|   3 -
 testsuites/sptests/spfatal34/init.c   |  50 
 testsuites/sptests/spfatal34/spfatal34.doc|  11 ++
 testsuites/sptests/spfatal34/spfatal34.scn|   8 ++
 testsuites/sptests/spinternalerror02/init.c   |   2 +-
 testsuites/validation/ts-default.h| 109 +++---
 21 files changed, 334 insertions(+), 157 deletions(-)
 create mode 100644 cpukit/rtems/src/taskconstructuser.c
 rename spec/build/testsuites/sptests/{spfatal02.yml => spfatal34.yml} (80%)
 delete mode 100644 testsuites/sptests/spfatal02/init.c
 delete mode 100644 testsuites/sptests/spfatal02/spfatal02.doc
 delete mode 100644 testsuites/sptests/spfatal02/spfatal02.scn
 create mode 100644 testsuites/sptests/spfatal34/init.c
 create mode 100644 testsuites/sptests/spfatal34/spfatal34.doc
 create mode 100644 testsuites/sptests/spfatal34/spfatal34.scn

-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v2 2/2] libtests/ofw01: Added a test for RTEMS OFW

2020-11-20 Thread Christian Mauderer
On a last test before I wanted to push it, I found a problem (sorry). On 
BSPs that rely on a FDT the test doesn't work:


You wrap bsp_fdt_get and return another FDT. So as soon as one driver of 
the BSP needs the original FDT, that driver won't work any more.


I think I remember that problem from the Beagle too. Didn't you have a 
version where you have enabled the wrapper later? If not: I added a 
suggestion below.


Am 03.11.20 um 19:18 schrieb G S Niteesh Babu:

Added a basic test for the implemented RTEMS OFW
API.
---
  spec/build/testsuites/libtests/grp.yml   |   2 +
  spec/build/testsuites/libtests/ofw01.yml |  21 +++
  testsuites/libtests/ofw01/init.c | 187 +++
  testsuites/libtests/ofw01/ofw01.doc  |  29 
  testsuites/libtests/ofw01/ofw01.scn  |   2 +
  testsuites/libtests/ofw01/some.c |  72 +
  testsuites/libtests/ofw01/some.dts   |  76 +
  testsuites/libtests/ofw01/some.h |  15 ++
  8 files changed, 404 insertions(+)
  create mode 100644 spec/build/testsuites/libtests/ofw01.yml
  create mode 100644 testsuites/libtests/ofw01/init.c
  create mode 100644 testsuites/libtests/ofw01/ofw01.doc
  create mode 100644 testsuites/libtests/ofw01/ofw01.scn
  create mode 100644 testsuites/libtests/ofw01/some.c
  create mode 100644 testsuites/libtests/ofw01/some.dts
  create mode 100644 testsuites/libtests/ofw01/some.h

diff --git a/spec/build/testsuites/libtests/grp.yml 
b/spec/build/testsuites/libtests/grp.yml
index b9ca014b0d..1aa136854a 100644
--- a/spec/build/testsuites/libtests/grp.yml
+++ b/spec/build/testsuites/libtests/grp.yml
@@ -316,6 +316,8 @@ links:
uid: write
  - role: build-dependency
uid: writev
+- role: build-dependency
+  uid: ofw01
  type: build
  use-after:
  - rtemstest
diff --git a/spec/build/testsuites/libtests/ofw01.yml 
b/spec/build/testsuites/libtests/ofw01.yml
new file mode 100644
index 00..8517c58bad
--- /dev/null
+++ b/spec/build/testsuites/libtests/ofw01.yml
@@ -0,0 +1,21 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+build-type: test-program
+cflags: []
+copyrights:
+- Copyright (C) 2020 Niteesh G S
+cppflags: []
+cxxflags: []
+enabled-by: true
+features: c cprogram
+includes: []
+ldflags:
+- -Wl,--wrap=bsp_fdt_get
+links: []
+source:
+- testsuites/libtests/ofw01/init.c
+- testsuites/libtests/ofw01/some.c
+stlib: []
+target: testsuites/libtests/ofw01.exe
+type: build
+use-after: []
+use-before: []
diff --git a/testsuites/libtests/ofw01/init.c b/testsuites/libtests/ofw01/init.c
new file mode 100644
index 00..82ee5eb11f
--- /dev/null
+++ b/testsuites/libtests/ofw01/init.c
@@ -0,0 +1,187 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/*
+ * Copyright (C) <2020> Niteesh G S 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "some.h"
+
+#define BUF_SIZE 100
+
+const char rtems_test_name[] = "OFW 01";
+
+const void *__wrap_bsp_fdt_get(void);
+const void *__real_bsp_fdt_get(void);
+
+const void *__wrap_bsp_fdt_get(void)
+{
+  if (some_bin != NULL) {


Instead of some_bin: Add another pointer like "test_fdt". That should be 
initialized with NULL and should be set to "some_bin" in Init ...



+return &some_bin[0];
+  }
+
+  return __real_bsp_fdt_get();
+}
+
+static void Init(rtems_task_argument arg)
+{
+  int rv;
+  phandle_t d;
+  phandle_t l;
+  phandle_t t;
+  phandle_t c;
+  phandle_t a;
+  phandle_t b;
+  phandle_t q;
+  phandle_t root;
+  phandle_t temp;
+  uint32_t *arr;
+  char buf[BUF_SIZE];
+  char *bufp;
+  ssize_t buf_len;
+  rtems_ofw_memory_area reg;
+  rtems

[PATCH] c-user: Add CONFIGURE_INIT_TASK_STORAGE_SIZE

2020-11-20 Thread Sebastian Huber
Close #4181.
---
 c-user/config/classic-init-task.rst | 52 -
 1 file changed, 51 insertions(+), 1 deletion(-)

diff --git a/c-user/config/classic-init-task.rst 
b/c-user/config/classic-init-task.rst
index 4d3bf81..dc07068 100644
--- a/c-user/config/classic-init-task.rst
+++ b/c-user/config/classic-init-task.rst
@@ -229,7 +229,57 @@ DESCRIPTION:
 Classic API initialization task.
 
 NOTES:
-None.
+The
+
+* ``CONFIGURE_INIT_TASK_STACK_SIZE`` and
+
+* :ref:`CONFIGURE_INIT_TASK_STORAGE_SIZE`
+
+configuration options are mutually exclusive.
+
+.. Generated from spec:/acfg/if/init-task-storage-size
+
+.. index:: CONFIGURE_INIT_TASK_STORAGE_SIZE
+
+.. _CONFIGURE_INIT_TASK_STORAGE_SIZE:
+
+CONFIGURE_INIT_TASK_STORAGE_SIZE
+
+
+CONSTANT:
+``CONFIGURE_INIT_TASK_STORAGE_SIZE``
+
+OPTION TYPE:
+This configuration option is an integer define.
+
+DEFAULT VALUE:
+The default value is 0.
+
+VALUE CONSTRAINTS:
+The value of this configuration option shall satisfy all of the following
+constraints:
+
+* It shall be greater than or equal to 
:ref:`CONFIGURE_MINIMUM_TASK_STACK_SIZE`.
+
+* It shall be defined using
+  :c:func:`RTEMS_TASK_STORAGE_SIZE`.
+
+DESCRIPTION:
+The value of this configuration option defines the task storage size of the
+Classic API initialization task.  If this configuration option is 
specified,
+then the Classic API initialization task is constructed by
+:c:func:`rtems_task_construct` instead of using
+:c:func:`rtems_task_create`.
+
+NOTES:
+A task storage area of the specified size is defined by the configuration 
for
+the Classic API initialization task.  The
+
+* :ref:`CONFIGURE_INIT_TASK_STACK_SIZE` and
+
+* ``CONFIGURE_INIT_TASK_STORAGE_SIZE``
+
+configuration options are mutually exclusive.
 
 .. Generated from spec:/acfg/if/rtems-init-tasks-table
 
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Doubt in rtems_task_wake_after

2020-11-20 Thread Richi Dubey
Yes, it does. I should have thought about that. Thank you.

On Thu, Nov 19, 2020 at 11:42 PM Gedare Bloom  wrote:

> On Wed, Nov 18, 2020 at 11:13 PM Richi Dubey  wrote:
> >
> > Hi,
> >
> > In the program tm24, the Init task creates only 1 HIGH task that
> executes (after Init task finishes) the High_task function and then the
> Init task creates 100 REST or LOOP task which execute (After High_task
> finishes) the Tasks function.
> >
> > Then, how can the High_task call rtems_task_wake_after 100 times?
> Shouldn't it exit right after a single call to rtems_task_wake_after, since
> the function yields the processor that is held by the executing thread?
> >
> Yield is only to give up the processor to same priority tasks. Does that
> help?
>
> > Please let me know how this works.
> >
> > Thanks,
> > Richi.
> > ___
> > devel mailing list
> > devel@rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 04/20] rtems: Canonicalize partition file documentation

2020-11-20 Thread Sebastian Huber
---
 cpukit/include/rtems/rtems/partdata.h |  3 ++-
 cpukit/include/rtems/rtems/partimpl.h |  3 ++-
 cpukit/rtems/src/part.c   |  5 +++--
 cpukit/rtems/src/partcreate.c |  5 +++--
 cpukit/rtems/src/partdelete.c |  8 +---
 cpukit/rtems/src/partgetbuffer.c  |  8 +---
 cpukit/rtems/src/partident.c  |  5 +++--
 cpukit/rtems/src/partmp.c |  5 +++--
 cpukit/rtems/src/partreturnbuffer.c   | 10 --
 9 files changed, 34 insertions(+), 18 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partdata.h 
b/cpukit/include/rtems/rtems/partdata.h
index 3be94b6cd1..d012367b2b 100644
--- a/cpukit/include/rtems/rtems/partdata.h
+++ b/cpukit/include/rtems/rtems/partdata.h
@@ -3,7 +3,8 @@
  *
  * @ingroup ClassicPartImpl
  *
- * @brief Classic Partition Manager Data Structures
+ * @brief This header file provides the API used by the Application
+ *   Configuration to define the Partition Manager information.
  */
 
 /* COPYRIGHT (c) 1989-2008.
diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index b2bbd90f76..5006f5cdc1 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -3,7 +3,8 @@
  *
  * @ingroup ClassicPartImpl
  *
- * @brief Classic Partition Manager Implementation
+ * @brief This header file provides interfaces used by the Partition Manager
+ *   implementation.
  */
 
 /*  COPYRIGHT (c) 1989-2008.
diff --git a/cpukit/rtems/src/part.c b/cpukit/rtems/src/part.c
index 34713682f3..0d7e352b60 100644
--- a/cpukit/rtems/src/part.c
+++ b/cpukit/rtems/src/part.c
@@ -1,9 +1,10 @@
 /**
  * @file
  *
- * @ingroup ClassicPart
+ * @ingroup ClassicPartImpl
  *
- * @brief Classic Partition Information with Zero Objects
+ * @brief This source file contains a definition of ::_Partition_Information
+ *   with zero objects.
  */
 
 /*
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
index 3ccf868a64..9d4c7df283 100644
--- a/cpukit/rtems/src/partcreate.c
+++ b/cpukit/rtems/src/partcreate.c
@@ -1,9 +1,10 @@
 /**
  * @file
  *
- * @ingroup ClassicPart Partitions
+ * @ingroup ClassicPartImpl
  *
- * @brief RTEMS Partition Create
+ * @brief This source file contains the implementation of
+ *   rtems_partition_create().
  */
 
 /*
diff --git a/cpukit/rtems/src/partdelete.c b/cpukit/rtems/src/partdelete.c
index cec94880f0..12f6bd6025 100644
--- a/cpukit/rtems/src/partdelete.c
+++ b/cpukit/rtems/src/partdelete.c
@@ -1,8 +1,10 @@
 /**
- *  @file
+ * @file
  *
- *  @brief RTEMS Delete Partition
- *  @ingroup ClassicPart
+ * @ingroup ClassicPartImpl
+ *
+ * @brief This source file contains the implementation of
+ *   rtems_partition_delete().
  */
 
 /*
diff --git a/cpukit/rtems/src/partgetbuffer.c b/cpukit/rtems/src/partgetbuffer.c
index 8e5350acb1..c92664ef61 100644
--- a/cpukit/rtems/src/partgetbuffer.c
+++ b/cpukit/rtems/src/partgetbuffer.c
@@ -1,8 +1,10 @@
 /**
- *  @file
+ * @file
  *
- *  @brief RTEMS Get Partition Buffer
- *  @ingroup ClassicPart
+ * @ingroup ClassicPartImpl
+ *
+ * @brief This source file contains the implementation of
+ *   rtems_partition_get_buffer().
  */
 
 /*
diff --git a/cpukit/rtems/src/partident.c b/cpukit/rtems/src/partident.c
index 5e7140f8d9..fb509fddfd 100644
--- a/cpukit/rtems/src/partident.c
+++ b/cpukit/rtems/src/partident.c
@@ -3,9 +3,10 @@
 /**
  * @file
  *
- * @ingroup ClassicPartitionImpl
+ * @ingroup ClassicPartImpl
  *
- * @brief rtems_partition_ident() Implementation
+ * @brief This source file contains the implementation of
+ *   rtems_partition_ident().
  */
 
 /*
diff --git a/cpukit/rtems/src/partmp.c b/cpukit/rtems/src/partmp.c
index 99af7adf71..f97c3373c8 100644
--- a/cpukit/rtems/src/partmp.c
+++ b/cpukit/rtems/src/partmp.c
@@ -1,9 +1,10 @@
 /**
  * @file
  *
- * @ingroup ClassicPartMP Partition MP Support
+ * @ingroup ClassicPartMP
  *
- * @brief Partition_MP_Send_process_packet
+ * @brief This source file contains the implementation of the Partition Manager
+ *   MPCI support.
  */
 
 /*
diff --git a/cpukit/rtems/src/partreturnbuffer.c 
b/cpukit/rtems/src/partreturnbuffer.c
index 6d762c4197..73d5438225 100644
--- a/cpukit/rtems/src/partreturnbuffer.c
+++ b/cpukit/rtems/src/partreturnbuffer.c
@@ -1,7 +1,13 @@
-/*
- *  Partition Manager
+/**
+ * @file
  *
+ * @ingroup ClassicPartImpl
  *
+ * @brief This source file contains the implementation of
+ *   rtems_partition_return_buffer().
+ */
+
+/*
  *  COPYRIGHT (c) 1989-2014.
  *  On-Line Applications Research Corporation (OAR).
  *
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 00/20] Apply new Doxygen guidelines

2020-11-20 Thread Sebastian Huber
Adjust some high level Doxygen groups and rework the Partition Manager
and Events according to the new Doxygen guidelines.

Sebastian Huber (20):
  doxygen: Rename Internal to Implementation
  doxygen: Use common syntax for groups
  libio: Move to RTEMS implementation group
  rtems: Canonicalize partition file documentation
  rtems: Update partition documentation
  rtems: Move _Partition_Allocate_buffer()
  rtems: Move _Partition_Free_buffer()
  rtems: Remove _Partition_Free()
  rtems: Remove _Partition_Destroy()
  rtems: Move _Partition_Is_buffer_valid()
  rtems: Move _Partition_Is_buffer_on_boundary()
  rtems: Move _Partition_Is_buffer_size_aligned()
  rtems: Move _Partition_Is_buffer_area_aligned()
  rtems: Move _Partition_Initialize()
  rtems: Move _Partition_Allocate()
  rtems: Canonicalize task event file documentation
  rtems: Remove unused EVENT_CURRENT
  rtems: Remove EVENT_SETS_NONE_PENDING
  rtems: Remove unused _Event_Timeout()
  rtems: Update event documentation

 bsps/shared/doxygen.h|   8 +-
 cpukit/doxygen.h |   4 +-
 cpukit/doxygen/top-level-groups.h|  11 +-
 cpukit/include/rtems/confdefs.h  |   2 +-
 cpukit/include/rtems/extensionimpl.h |   2 +-
 cpukit/include/rtems/libcsupport.h   |   2 +-
 cpukit/include/rtems/libio.h |   2 +
 cpukit/include/rtems/posix/posixapi.h|   2 +-
 cpukit/include/rtems/rtems/asrimpl.h |   2 +-
 cpukit/include/rtems/rtems/attrimpl.h|   2 +-
 cpukit/include/rtems/rtems/barrierimpl.h |   2 +-
 cpukit/include/rtems/rtems/dpmemimpl.h   |   2 +-
 cpukit/include/rtems/rtems/eventdata.h   |   9 +-
 cpukit/include/rtems/rtems/eventimpl.h   | 104 +-
 cpukit/include/rtems/rtems/messageimpl.h |   2 +-
 cpukit/include/rtems/rtems/modesimpl.h   |   2 +-
 cpukit/include/rtems/rtems/objectimpl.h  |   2 +-
 cpukit/include/rtems/rtems/optionsimpl.h |   2 +-
 cpukit/include/rtems/rtems/partdata.h|  94 -
 cpukit/include/rtems/rtems/partimpl.h| 165 +++
 cpukit/include/rtems/rtems/ratemonimpl.h |   2 +-
 cpukit/include/rtems/rtems/regionimpl.h  |   2 +-
 cpukit/include/rtems/rtems/semimpl.h |   2 +-
 cpukit/include/rtems/rtems/signalimpl.h  |   2 +-
 cpukit/include/rtems/rtems/statusimpl.h  |   2 +-
 cpukit/include/rtems/rtems/tasksimpl.h   |   2 +-
 cpukit/include/rtems/rtems/timerimpl.h   |   2 +-
 cpukit/include/rtems/score/object.h  |   2 +-
 cpukit/rtems/src/eventmp.c   |   8 +-
 cpukit/rtems/src/eventreceive.c  |   5 +-
 cpukit/rtems/src/eventseize.c|   5 +-
 cpukit/rtems/src/eventsend.c |   8 +-
 cpukit/rtems/src/eventsurrender.c|   8 +-
 cpukit/rtems/src/part.c  |   5 +-
 cpukit/rtems/src/partcreate.c|  45 ++-
 cpukit/rtems/src/partdelete.c|  12 +-
 cpukit/rtems/src/partgetbuffer.c |  14 +-
 cpukit/rtems/src/partident.c |   5 +-
 cpukit/rtems/src/partmp.c|   5 +-
 cpukit/rtems/src/partreturnbuffer.c  |  52 ++-
 cpukit/rtems/src/systemeventreceive.c|   5 +-
 cpukit/rtems/src/systemeventsend.c   |   5 +-
 42 files changed, 345 insertions(+), 274 deletions(-)

-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 01/20] doxygen: Rename Internal to Implementation

2020-11-20 Thread Sebastian Huber
Use a top-level implementation group to gather implementation related
files.  The use of "Impl" is shorter and matches with the *impl.h file
names.
---
 cpukit/doxygen.h | 4 ++--
 cpukit/doxygen/top-level-groups.h| 4 ++--
 cpukit/include/rtems/confdefs.h  | 2 +-
 cpukit/include/rtems/extensionimpl.h | 2 +-
 cpukit/include/rtems/libcsupport.h   | 2 +-
 cpukit/include/rtems/posix/posixapi.h| 2 +-
 cpukit/include/rtems/rtems/asrimpl.h | 2 +-
 cpukit/include/rtems/rtems/attrimpl.h| 2 +-
 cpukit/include/rtems/rtems/barrierimpl.h | 2 +-
 cpukit/include/rtems/rtems/dpmemimpl.h   | 2 +-
 cpukit/include/rtems/rtems/eventimpl.h   | 2 +-
 cpukit/include/rtems/rtems/messageimpl.h | 2 +-
 cpukit/include/rtems/rtems/modesimpl.h   | 2 +-
 cpukit/include/rtems/rtems/objectimpl.h  | 2 +-
 cpukit/include/rtems/rtems/optionsimpl.h | 2 +-
 cpukit/include/rtems/rtems/partimpl.h| 2 +-
 cpukit/include/rtems/rtems/ratemonimpl.h | 2 +-
 cpukit/include/rtems/rtems/regionimpl.h  | 2 +-
 cpukit/include/rtems/rtems/semimpl.h | 2 +-
 cpukit/include/rtems/rtems/signalimpl.h  | 2 +-
 cpukit/include/rtems/rtems/statusimpl.h  | 2 +-
 cpukit/include/rtems/rtems/tasksimpl.h   | 2 +-
 cpukit/include/rtems/rtems/timerimpl.h   | 2 +-
 cpukit/include/rtems/score/object.h  | 2 +-
 24 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/cpukit/doxygen.h b/cpukit/doxygen.h
index c159b2082d..0428424476 100644
--- a/cpukit/doxygen.h
+++ b/cpukit/doxygen.h
@@ -1,7 +1,7 @@
 /**
- * @defgroup RTEMSInternalClassic Classic
+ * @defgroup RTEMSImplClassic Classic
  * 
- * @ingroup RTEMSInternal
+ * @ingroup RTEMSImpl
  *
  * @brief Classic
  */
diff --git a/cpukit/doxygen/top-level-groups.h 
b/cpukit/doxygen/top-level-groups.h
index c1a91a3482..2916ec0b90 100644
--- a/cpukit/doxygen/top-level-groups.h
+++ b/cpukit/doxygen/top-level-groups.h
@@ -38,9 +38,9 @@
  */
 
 /**
- * @defgroup RTEMSInternal Internal
+ * @defgroup RTEMSImpl Implementation
  *
- * @brief RTEMS Implementation.
+ * @brief This group contains the RTEMS implementation components.
  */
 
 /**
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index b53ed0b83b..fb4a7b9800 100644
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -45,7 +45,7 @@
 /**
  * @defgroup RTEMSApplicationConfiguration Application Configuration
  *
- * @ingroup RTEMSInternal
+ * @ingroup RTEMSImpl
  *
  * @brief Evaluation of Application Configuration Options
  *
diff --git a/cpukit/include/rtems/extensionimpl.h 
b/cpukit/include/rtems/extensionimpl.h
index 12d0bb656f..ed9da1fa28 100644
--- a/cpukit/include/rtems/extensionimpl.h
+++ b/cpukit/include/rtems/extensionimpl.h
@@ -28,7 +28,7 @@ extern "C" {
 /**
  * @defgroup ClassicUserExtensionsImpl User Extensions Implementation
  *
- * @ingroup RTEMSInternalClassic
+ * @ingroup RTEMSImplClassic
  *
  * @{
  */
diff --git a/cpukit/include/rtems/libcsupport.h 
b/cpukit/include/rtems/libcsupport.h
index 1300b5f61f..f4be4cfc9a 100644
--- a/cpukit/include/rtems/libcsupport.h
+++ b/cpukit/include/rtems/libcsupport.h
@@ -32,7 +32,7 @@ extern "C" {
 /**
  * @defgroup libcsupport Standard C Library Support
  *
- * @ingroup RTEMSInternal
+ * @ingroup RTEMSImpl
  *
  * @brief RTEMS Specific Support for the Standard C Library
  *
diff --git a/cpukit/include/rtems/posix/posixapi.h 
b/cpukit/include/rtems/posix/posixapi.h
index 561a56389f..fc669afb45 100644
--- a/cpukit/include/rtems/posix/posixapi.h
+++ b/cpukit/include/rtems/posix/posixapi.h
@@ -30,7 +30,7 @@
 /**
  * @defgroup POSIXAPI RTEMS POSIX API
  *
- * @ingroup RTEMSInternal
+ * @ingroup RTEMSImpl
  *
  * RTEMS POSIX API definitions and modules.
  *
diff --git a/cpukit/include/rtems/rtems/asrimpl.h 
b/cpukit/include/rtems/rtems/asrimpl.h
index 90910cabc4..e940cbbf5f 100644
--- a/cpukit/include/rtems/rtems/asrimpl.h
+++ b/cpukit/include/rtems/rtems/asrimpl.h
@@ -28,7 +28,7 @@ extern "C" {
 /**
  * @defgroup ClassicASRImpl Classic ASR Implementation
  *
- * @ingroup RTEMSInternalClassic
+ * @ingroup RTEMSImplClassic
  *
  * @{
  */
diff --git a/cpukit/include/rtems/rtems/attrimpl.h 
b/cpukit/include/rtems/rtems/attrimpl.h
index 071fbccc0f..feb4f1821a 100644
--- a/cpukit/include/rtems/rtems/attrimpl.h
+++ b/cpukit/include/rtems/rtems/attrimpl.h
@@ -28,7 +28,7 @@ extern "C" {
 /**
  * @defgroup ClassicAttributesImpl Classic Attributes Implementation
  *
- * @ingroup RTEMSInternalClassic
+ * @ingroup RTEMSImplClassic
  *
  * @{
  */
diff --git a/cpukit/include/rtems/rtems/barrierimpl.h 
b/cpukit/include/rtems/rtems/barrierimpl.h
index fce66b8ff8..fbb4dea507 100644
--- a/cpukit/include/rtems/rtems/barrierimpl.h
+++ b/cpukit/include/rtems/rtems/barrierimpl.h
@@ -29,7 +29,7 @@ extern "C" {
 /**
  *  @defgroup ClassicBarrierImpl Classic Barrier Implementation
  *
- *  @ingroup RTEMSInternalClassic
+ *  @ingroup RTEMSImplClassic
  *
  *  @{
  */
diff --git a/cpukit/include/rtems/rtems/dpmemimpl.h 
b

[PATCH 02/20] doxygen: Use common syntax for groups

2020-11-20 Thread Sebastian Huber
---
 bsps/shared/doxygen.h | 8 
 cpukit/doxygen/top-level-groups.h | 7 ---
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/bsps/shared/doxygen.h b/bsps/shared/doxygen.h
index 28bd4990f7..d3679c2f3d 100644
--- a/bsps/shared/doxygen.h
+++ b/bsps/shared/doxygen.h
@@ -1,8 +1,7 @@
 /**
  * @defgroup RTEMSBSPs Board Support Packages
  *
- * @brief Board Support Packages and Support Modules
- * (BSPs).
+ * @brief This group contains the Board Support Packages (BSPs).
  */
 
 /**
@@ -10,7 +9,8 @@
  *
  * @ingroup RTEMSBSPs
  *
- * @brief Shared Support for Board Support Packages
+ * @brief This group contains the architecture-independent support modules
+ *   shared across all BSPs.
  */
 
 /**
@@ -18,5 +18,5 @@
  *
  * @ingroup RTEMSBSPsShared
  *
- * @brief Console Driver Support for Board Support Packages.
+ * @brief This group contains the console driver support modules.
  */
diff --git a/cpukit/doxygen/top-level-groups.h 
b/cpukit/doxygen/top-level-groups.h
index 2916ec0b90..8d38195f3e 100644
--- a/cpukit/doxygen/top-level-groups.h
+++ b/cpukit/doxygen/top-level-groups.h
@@ -28,13 +28,14 @@
 /**
  * @defgroup RTEMSAPI API
  *
- * @brief API
+ * @brief This group contains the Application Programming Interfaces (APIs) of
+ *   RTEMS.
  */
 
 /**
  * @defgroup RTEMSDeviceDrivers Device Drivers
  *
- * @brief Device Drivers
+ * @brief This group contains the device drivers.
  */
 
 /**
@@ -46,5 +47,5 @@
 /**
  * @defgroup RTEMSTestSuites Test Suites
  *
- * @brief Collection of Test Suites
+ * @brief This group contains the test suites.
  */
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 03/20] libio: Move to RTEMS implementation group

2020-11-20 Thread Sebastian Huber
---
 cpukit/include/rtems/libio.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cpukit/include/rtems/libio.h b/cpukit/include/rtems/libio.h
index f1c9eea51b..18141c3d3c 100644
--- a/cpukit/include/rtems/libio.h
+++ b/cpukit/include/rtems/libio.h
@@ -1260,6 +1260,8 @@ int rtems_filesystem_default_mmap(
 /**
  * @defgroup LibIO IO Library
  *
+ * @ingroup RTEMSImpl
+ *
  * @brief Provides system call and file system interface definitions.
  *
  * General purpose communication channel for RTEMS to allow UNIX/POSIX
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 10/20] rtems: Move _Partition_Is_buffer_valid()

2020-11-20 Thread Sebastian Huber
It is used only in one place.  Make the PTCB the first parameter.
---
 cpukit/include/rtems/rtems/partimpl.h | 23 ---
 cpukit/rtems/src/partreturnbuffer.c   | 18 +-
 2 files changed, 17 insertions(+), 24 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index fc17311803..23d5422bec 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -56,29 +56,6 @@ RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_on_boundary (
   return ((offset % the_partition->buffer_size) == 0);
 }
 
-/**
- *  @brief Checks whether the_buffer is a valid buffer from the_partition.
- *
- *  This function returns TRUE if the_buffer is a valid buffer from
- *  the_partition, otherwise FALSE is returned.
- */
-RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_valid (
-   Chain_Node*the_buffer,
-   Partition_Control *the_partition
-)
-{
-  void *starting;
-  void *ending;
-
-  starting = the_partition->starting_address;
-  ending   = _Addresses_Add_offset( starting, the_partition->length );
-
-  return (
-_Addresses_Is_in_range( the_buffer, starting, ending ) &&
-_Partition_Is_buffer_on_boundary( the_buffer, the_partition )
-  );
-}
-
 RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned(
   uint32_t buffer_size
 )
diff --git a/cpukit/rtems/src/partreturnbuffer.c 
b/cpukit/rtems/src/partreturnbuffer.c
index 9afda8f85e..61900fa735 100644
--- a/cpukit/rtems/src/partreturnbuffer.c
+++ b/cpukit/rtems/src/partreturnbuffer.c
@@ -21,8 +21,24 @@
 #endif
 
 #include 
+#include 
 #include 
 
+static bool _Partition_Is_buffer_valid(
+   const Partition_Control *the_partition,
+   const void  *the_buffer
+)
+{
+  void *starting;
+  void *ending;
+
+  starting = the_partition->starting_address;
+  ending   = _Addresses_Add_offset( starting, the_partition->length );
+
+  return _Addresses_Is_in_range( the_buffer, starting, ending )
+&& _Partition_Is_buffer_on_boundary( the_buffer, the_partition );
+}
+
 static void _Partition_Free_buffer(
   Partition_Control *the_partition,
   void  *the_buffer
@@ -51,7 +67,7 @@ rtems_status_code rtems_partition_return_buffer(
 
   _Partition_Acquire_critical( the_partition, &lock_context );
 
-  if ( !_Partition_Is_buffer_valid( buffer, the_partition ) ) {
+  if ( !_Partition_Is_buffer_valid( the_partition, buffer ) ) {
 _Partition_Release( the_partition, &lock_context );
 return RTEMS_INVALID_ADDRESS;
   }
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 06/20] rtems: Move _Partition_Allocate_buffer()

2020-11-20 Thread Sebastian Huber
It is only used by rtems_partition_get_buffer().
---
 cpukit/include/rtems/rtems/partimpl.h | 14 --
 cpukit/rtems/src/partgetbuffer.c  |  6 ++
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index 9327188eea..fe9974d993 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -35,20 +35,6 @@ extern "C" {
  * @{
  */
 
-/**
- *  @brief Allocate a buffer from the_partition.
- *
- *  This function attempts to allocate a buffer from the_partition.
- *  If successful, it returns the address of the allocated buffer.
- *  Otherwise, it returns NULL.
- */
-RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
-   Partition_Control *the_partition
-)
-{
-  return _Chain_Get_unprotected( &the_partition->Memory );
-}
-
 /**
  *  @brief Frees the_buffer to the_partition.
  *
diff --git a/cpukit/rtems/src/partgetbuffer.c b/cpukit/rtems/src/partgetbuffer.c
index c92664ef61..2061ff151e 100644
--- a/cpukit/rtems/src/partgetbuffer.c
+++ b/cpukit/rtems/src/partgetbuffer.c
@@ -21,6 +21,12 @@
 #endif
 
 #include 
+#include 
+
+static void *_Partition_Allocate_buffer( Partition_Control *the_partition )
+{
+  return _Chain_Get_unprotected( &the_partition->Memory );
+}
 
 rtems_status_code rtems_partition_get_buffer(
   rtems_id   id,
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 14/20] rtems: Move _Partition_Initialize()

2020-11-20 Thread Sebastian Huber
It is only used by rtems_partition_create().  Fix integer types.
---
 cpukit/include/rtems/rtems/partimpl.h | 25 -
 cpukit/rtems/src/partcreate.c | 25 +
 2 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index dcffe757c7..ab0bdc76f7 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -19,7 +19,6 @@
 #define _RTEMS_RTEMS_PARTIMPL_H
 
 #include 
-#include 
 #include 
 
 #ifdef __cplusplus
@@ -46,30 +45,6 @@ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate 
( void )
   return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
 }
 
-RTEMS_INLINE_ROUTINE void _Partition_Initialize(
-  Partition_Control *the_partition,
-  void  *starting_address,
-  uint32_t   length,
-  uint32_t   buffer_size,
-  rtems_attributeattribute_set
-)
-{
-  the_partition->starting_address  = starting_address;
-  the_partition->length= length;
-  the_partition->buffer_size   = buffer_size;
-  the_partition->attribute_set = attribute_set;
-  the_partition->number_of_used_blocks = 0;
-
-  _Chain_Initialize(
-&the_partition->Memory,
-starting_address,
-length / buffer_size,
-buffer_size
-  );
-
-  _ISR_lock_Initialize( &the_partition->Lock, "Partition" );
-}
-
 /**
  * @brief Calls _Objects_Get() using the ::_Partition_Information.
  *
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
index da791e2360..a6824d5224 100644
--- a/cpukit/rtems/src/partcreate.c
+++ b/cpukit/rtems/src/partcreate.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -36,6 +37,30 @@ static bool _Partition_Is_buffer_area_aligned( const void 
*starting_address )
   return ( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;
 }
 
+static void _Partition_Initialize(
+  Partition_Control *the_partition,
+  void  *starting_address,
+  uintptr_t  length,
+  size_t buffer_size,
+  rtems_attributeattribute_set
+)
+{
+  the_partition->starting_address  = starting_address;
+  the_partition->length= length;
+  the_partition->buffer_size   = buffer_size;
+  the_partition->attribute_set = attribute_set;
+  the_partition->number_of_used_blocks = 0;
+
+  _Chain_Initialize(
+&the_partition->Memory,
+starting_address,
+length / buffer_size,
+buffer_size
+  );
+
+  _ISR_lock_Initialize( &the_partition->Lock, "Partition" );
+}
+
 rtems_status_code rtems_partition_create(
   rtems_name   name,
   void*starting_address,
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 20/20] rtems: Update event documentation

2020-11-20 Thread Sebastian Huber
---
 cpukit/include/rtems/rtems/eventdata.h |  6 ++
 cpukit/include/rtems/rtems/eventimpl.h | 86 ++
 2 files changed, 79 insertions(+), 13 deletions(-)

diff --git a/cpukit/include/rtems/rtems/eventdata.h 
b/cpukit/include/rtems/rtems/eventdata.h
index fa69a2a932..23f0a1bf9e 100644
--- a/cpukit/include/rtems/rtems/eventdata.h
+++ b/cpukit/include/rtems/rtems/eventdata.h
@@ -30,7 +30,13 @@ extern "C" {
  * @{
  */
 
+/**
+ * @brief This structure is used to manage a set of events.
+ */
 typedef struct {
+  /**
+   * @brief The member contains the pending events.
+   */
   rtems_event_set pending_events;
 } Event_Control;
 
diff --git a/cpukit/include/rtems/rtems/eventimpl.h 
b/cpukit/include/rtems/rtems/eventimpl.h
index dc56ad2127..4635d76437 100644
--- a/cpukit/include/rtems/rtems/eventimpl.h
+++ b/cpukit/include/rtems/rtems/eventimpl.h
@@ -25,13 +25,42 @@ extern "C" {
 #endif
 
 /**
- * @defgroup ClassicEventImpl Classic Event Implementation
+ * @defgroup ClassicEventImpl Event Implementation
  *
  * @ingroup RTEMSImplClassic
  *
  * @{
  */
 
+/**
+ * @brief Seizes a set of events.
+ *
+ * @param event_in is the input event set.
+ *
+ * @param option_set is the option set.
+ *
+ * @param ticks is the optional timeout in clock ticks.
+ *
+ * @param event_out[out] is the output event set.
+ *
+ * @param executing[in, out] is the executing thread.
+ *
+ * @param event[in, out] is the source event set.
+ *
+ * @param wait_class is the thread wait class of the source event set.
+ *
+ * @param block_state is the thread blocking state of the source event set.
+ *
+ * @param lock_context[in, out] is the lock context set up by _Thread_Get().
+ *
+ * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
+ *
+ * @retval ::RTEMS_UNSATISFIED The events of interest were not immediately
+ *   available.
+ *
+ * @retval ::RTEMS_TIMEOUT The events of interest were not available within the
+ *   specified timeout interval.
+ */
 rtems_status_code _Event_Seize(
   rtems_event_setevent_in,
   rtems_option   option_set,
@@ -44,6 +73,21 @@ rtems_status_code _Event_Seize(
   ISR_lock_Context  *lock_context
 );
 
+/**
+ * @brief Surrenders a set of events.
+ *
+ * @param the_thread[in, out] is the thread of the event set.
+ *
+ * @param event_in is the set of events to post.
+ *
+ * @param event[in, out] is the target event set.
+ *
+ * @param wait_class is the thread wait class of the target event set.
+ *
+ * @param lock_context[in, out] is the lock context set up by _Thread_Get().
+ *
+ * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
+ */
 rtems_status_code _Event_Surrender(
   Thread_Control*the_thread,
   rtems_event_setevent_in,
@@ -52,16 +96,23 @@ rtems_status_code _Event_Surrender(
   ISR_lock_Context  *lock_context
 );
 
+/**
+ * @brief Initializes an event control block to have no pending events.
+ *
+ * @param event is the event control block to initialize.
+ */
 RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
 {
   event->pending_events = 0;
 }
 
 /**
- *  @brief Checks if on events are posted in the event_set.
+ * @brief Checks if the event set is empty.
+ *
+ * @param the_event_set is the event set to check.
  *
- *  This function returns TRUE if on events are posted in the event_set,
- *  and FALSE otherwise.
+ * @return Returns true, if there are no posted events in the event set,
+ *   otherwise false.
  */
 RTEMS_INLINE_ROUTINE bool _Event_sets_Is_empty(
   rtems_event_set the_event_set
@@ -71,10 +122,11 @@ RTEMS_INLINE_ROUTINE bool _Event_sets_Is_empty(
 }
 
 /**
- *  @brief Posts the given new_events into the event_set passed in.
+ * @brief Posts the events in the specified event set.
  *
- *  This routine posts the given new_events into the event_set
- *  passed in.  The result is returned to the user in event_set.
+ * @param the_new_events is the set of events to post.
+ *
+ * @param the_event_set[in, out] is the event set.
  */
 RTEMS_INLINE_ROUTINE void _Event_sets_Post(
   rtems_event_set  the_new_events,
@@ -85,10 +137,14 @@ RTEMS_INLINE_ROUTINE void _Event_sets_Post(
 }
 
 /**
- *  @brief Returns the events in event_condition that are set in event_set.
+ * @brief Gets the events of the specified event condition.
+ *
+ * @param the_event_set is the event set.
  *
- *  This function returns the events in event_condition which are
- *  set in event_set.
+ * @param the_event_condition is the event condition defining the events of 
interest.
+ *
+ * @return Return the events of the event condition which are posted in the
+ *   event set.
  */
 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
   rtems_event_set the_event_set,
@@ -99,10 +155,14 @@ RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
 }
 
 /**
- *  @brief Removes the events in mask from the event_set passed in.
+ * @brief Clears a set of events from an event set.
+ *
+ * @param the_event_set is the event set.
+ *
+ * @param the_mask is the set

[PATCH 05/20] rtems: Update partition documentation

2020-11-20 Thread Sebastian Huber
---
 cpukit/include/rtems/rtems/partdata.h | 91 ++-
 cpukit/include/rtems/rtems/partimpl.h | 24 ++-
 2 files changed, 84 insertions(+), 31 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partdata.h 
b/cpukit/include/rtems/rtems/partdata.h
index d012367b2b..32289cd378 100644
--- a/cpukit/include/rtems/rtems/partdata.h
+++ b/cpukit/include/rtems/rtems/partdata.h
@@ -33,39 +33,71 @@ extern "C" {
  */
 
 /**
- *  The following defines the control block used to manage each partition.
+ * @brief The Partition Control Block (PTCB) represents a partition.
  */
 typedef struct {
-  /** This field is the object management portion of a Partition instance. */
-  Objects_Control Object;
-  /** This field is the lock of the Partition. */
-  ISR_LOCK_MEMBER(Lock )
-  /** This field is the physical starting address of the Partition. */
-  void   *starting_address;
-  /** This field is the size of the Partition in bytes. */
-  uintptr_t   length;
-  /** This field is the size of each buffer in bytes */
-  size_t  buffer_size;
-  /** This field is the attribute set provided at create time. */
-  rtems_attribute attribute_set;
-  /** This field is the of allocated buffers. */
-  uintptr_t   number_of_used_blocks;
-  /** This field is the chain used to manage unallocated buffers. */
-  Chain_Control   Memory;
-}   Partition_Control;
+  /**
+   * @brief This member turns the PTCB into an object.
+   */
+  Objects_Control Object;
+
+  /**
+   * @brief This lock protects the chain of unallocated buffers and the number
+   *   of allocated buffers.
+   */
+  ISR_LOCK_MEMBER( Lock )
+
+  /**
+   * @brief This member contains the physical starting address of the buffer
+   *   area.
+   */
+  void *starting_address;
+
+  /**
+   * @brief This member contains the size of the buffer area in bytes.
+   */
+  uintptr_t length;
+
+  /**
+   * @brief This member contains the size of each buffer in bytes.
+  */
+  size_t buffer_size;
+
+  /**
+   * @brief This member contains the attribute set provided at creation time.
+   */
+  rtems_attribute attribute_set;
+
+  /**
+   * @brief This member contains the count of allocated buffers.
+   */
+  uintptr_t number_of_used_blocks;
+
+  /**
+   * @brief This chain is used to manage unallocated buffers.
+   */
+  Chain_Control Memory;
+} Partition_Control;
 
 /**
- * @brief The Classic Partition objects information.
+ * @brief The Partition Manager objects information is used to manage the
+ *   objects of this class.
+ *
+ * If #CONFIGURE_MAXIMUM_PARTITIONS is greater than zero, then the object
+ * information is defined by PARTITION_INFORMATION_DEFINE(), otherwise it is
+ * defined by OBJECTS_INFORMATION_DEFINE_ZERO().
  */
 extern Objects_Information _Partition_Information;
 
 #if defined(RTEMS_MULTIPROCESSING)
 /**
- *  @brief Partition_MP_Send_extract_proxy
+ * @brief Sends the extract proxy request.
+ *
+ * This routine is invoked when a task is deleted and it has a proxy which must
+ * be removed from a thread queue and the remote node must be informed of this.
  *
- *  This routine is invoked when a task is deleted and it
- *  has a proxy which must be removed from a thread queue and
- *  the remote node must be informed of this.
+ * @param[in, out] the_thread is the thread proxy.
+ * @param id is the partition identifier.
  */
 void _Partition_MP_Send_extract_proxy (
   Thread_Control *the_thread,
@@ -74,21 +106,20 @@ void _Partition_MP_Send_extract_proxy (
 #endif
 
 /**
- * @brief Macro to define the objects information for the Classic Partition
- * objects.
+ * @brief Defines the Partition Manager objects information.
  *
- * This macro should only be used by .
+ * This macro should only be used by .
  *
- * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
- * may be set).
+ * @param _max is the configured object maximum (the #OBJECTS_UNLIMITED_OBJECTS
+ *   flag may be set).
  */
-#define PARTITION_INFORMATION_DEFINE( max ) \
+#define PARTITION_INFORMATION_DEFINE( _max ) \
   OBJECTS_INFORMATION_DEFINE( \
 _Partition, \
 OBJECTS_CLASSIC_API, \
 OBJECTS_RTEMS_PARTITIONS, \
 Partition_Control, \
-max, \
+_max, \
 OBJECTS_NO_STRING_NAME, \
 _Partition_MP_Send_extract_proxy \
   )
diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index 5006f5cdc1..9327188eea 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -28,7 +28,7 @@ extern "C" {
 #endif
 
 /**
- * @defgroup ClassicPartImpl Classic Partition Manager Implementation
+ * @defgroup ClassicPartImpl Partition Manager Implementation
  *
  * @ingroup RTEMSImplClassic
  *
@@ -177,6 +177,14 @@ RTEMS_INLINE_ROUTINE void _Partition_Free (
   _Objects_Free( &_Partition_Information, &the_partition->Object );
 }
 
+/**
+ * @brief Calls _Objects_Get() using the ::_Partition_Information.
+ *
+ * @param id is the 

[PATCH 08/20] rtems: Remove _Partition_Free()

2020-11-20 Thread Sebastian Huber
It was a trivial function call wrapper used only in one place.
---
 cpukit/include/rtems/rtems/partimpl.h | 14 --
 cpukit/rtems/src/partdelete.c |  2 +-
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index 599db29c13..55de7b113d 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -136,20 +136,6 @@ RTEMS_INLINE_ROUTINE void _Partition_Destroy(
   _ISR_lock_Destroy( &the_partition->Lock );
 }
 
-/**
- *  @brief Frees a partition control block to the
- *  inactive chain of free partition control blocks.
- *
- *  This routine frees a partition control block to the
- *  inactive chain of free partition control blocks.
- */
-RTEMS_INLINE_ROUTINE void _Partition_Free (
-   Partition_Control *the_partition
-)
-{
-  _Objects_Free( &_Partition_Information, &the_partition->Object );
-}
-
 /**
  * @brief Calls _Objects_Get() using the ::_Partition_Information.
  *
diff --git a/cpukit/rtems/src/partdelete.c b/cpukit/rtems/src/partdelete.c
index 12f6bd6025..4fc71aff2d 100644
--- a/cpukit/rtems/src/partdelete.c
+++ b/cpukit/rtems/src/partdelete.c
@@ -73,7 +73,7 @@ rtems_status_code rtems_partition_delete(
 #endif
 
   _Partition_Destroy( the_partition );
-  _Partition_Free( the_partition );
+  _Objects_Free( &_Partition_Information, &the_partition->Object );
   _Objects_Allocator_unlock();
   return RTEMS_SUCCESSFUL;
 }
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 07/20] rtems: Move _Partition_Free_buffer()

2020-11-20 Thread Sebastian Huber
It is only used by rtems_partition_return_buffer().
---
 cpukit/include/rtems/rtems/partimpl.h | 13 -
 cpukit/rtems/src/partreturnbuffer.c   |  9 +
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index fe9974d993..599db29c13 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -35,19 +35,6 @@ extern "C" {
  * @{
  */
 
-/**
- *  @brief Frees the_buffer to the_partition.
- *
- *  This routine frees the_buffer to the_partition.
- */
-RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
-  Partition_Control *the_partition,
-  Chain_Node*the_buffer
-)
-{
-  _Chain_Append_unprotected( &the_partition->Memory, the_buffer );
-}
-
 /**
  *  @brief Checks whether is on a valid buffer boundary for the_partition.
  *
diff --git a/cpukit/rtems/src/partreturnbuffer.c 
b/cpukit/rtems/src/partreturnbuffer.c
index 73d5438225..9afda8f85e 100644
--- a/cpukit/rtems/src/partreturnbuffer.c
+++ b/cpukit/rtems/src/partreturnbuffer.c
@@ -21,6 +21,15 @@
 #endif
 
 #include 
+#include 
+
+static void _Partition_Free_buffer(
+  Partition_Control *the_partition,
+  void  *the_buffer
+)
+{
+  _Chain_Append_unprotected( &the_partition->Memory, the_buffer );
+}
 
 rtems_status_code rtems_partition_return_buffer(
   rtems_id  id,
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 11/20] rtems: Move _Partition_Is_buffer_on_boundary()

2020-11-20 Thread Sebastian Huber
It is used only by rtems_partition_return_buffer().Make the PTCB the
first parameter.
---
 cpukit/include/rtems/rtems/partimpl.h | 22 --
 cpukit/rtems/src/partreturnbuffer.c   | 17 -
 2 files changed, 16 insertions(+), 23 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index 23d5422bec..0d15d1e991 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -19,7 +19,6 @@
 #define _RTEMS_RTEMS_PARTIMPL_H
 
 #include 
-#include 
 #include 
 #include 
 
@@ -35,27 +34,6 @@ extern "C" {
  * @{
  */
 
-/**
- *  @brief Checks whether is on a valid buffer boundary for the_partition.
- *
- *  This function returns TRUE if the_buffer is on a valid buffer
- *  boundary for the_partition, and FALSE otherwise.
- */
-RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_on_boundary (
-  void  *the_buffer,
-  Partition_Control *the_partition
-)
-{
-  intptr_t offset;
-
-  offset = _Addresses_Subtract(
-the_buffer,
-the_partition->starting_address
-  );
-
-  return ((offset % the_partition->buffer_size) == 0);
-}
-
 RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned(
   uint32_t buffer_size
 )
diff --git a/cpukit/rtems/src/partreturnbuffer.c 
b/cpukit/rtems/src/partreturnbuffer.c
index 61900fa735..bc0d273719 100644
--- a/cpukit/rtems/src/partreturnbuffer.c
+++ b/cpukit/rtems/src/partreturnbuffer.c
@@ -24,6 +24,21 @@
 #include 
 #include 
 
+static bool _Partition_Is_buffer_on_boundary (
+  const Partition_Control *the_partition,
+  const void  *the_buffer
+)
+{
+  intptr_t offset;
+
+  offset = _Addresses_Subtract(
+the_buffer,
+the_partition->starting_address
+  );
+
+  return ( ( offset % the_partition->buffer_size ) == 0);
+}
+
 static bool _Partition_Is_buffer_valid(
const Partition_Control *the_partition,
const void  *the_buffer
@@ -36,7 +51,7 @@ static bool _Partition_Is_buffer_valid(
   ending   = _Addresses_Add_offset( starting, the_partition->length );
 
   return _Addresses_Is_in_range( the_buffer, starting, ending )
-&& _Partition_Is_buffer_on_boundary( the_buffer, the_partition );
+&& _Partition_Is_buffer_on_boundary( the_partition, the_buffer );
 }
 
 static void _Partition_Free_buffer(
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 09/20] rtems: Remove _Partition_Destroy()

2020-11-20 Thread Sebastian Huber
It was a trivial function call wrapper used only in one place.
---
 cpukit/include/rtems/rtems/partimpl.h | 7 ---
 cpukit/rtems/src/partdelete.c | 2 +-
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index 55de7b113d..fc17311803 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -129,13 +129,6 @@ RTEMS_INLINE_ROUTINE void _Partition_Initialize(
   _ISR_lock_Initialize( &the_partition->Lock, "Partition" );
 }
 
-RTEMS_INLINE_ROUTINE void _Partition_Destroy(
-  Partition_Control *the_partition
-)
-{
-  _ISR_lock_Destroy( &the_partition->Lock );
-}
-
 /**
  * @brief Calls _Objects_Get() using the ::_Partition_Information.
  *
diff --git a/cpukit/rtems/src/partdelete.c b/cpukit/rtems/src/partdelete.c
index 4fc71aff2d..f0d04f94a0 100644
--- a/cpukit/rtems/src/partdelete.c
+++ b/cpukit/rtems/src/partdelete.c
@@ -72,7 +72,7 @@ rtems_status_code rtems_partition_delete(
   }
 #endif
 
-  _Partition_Destroy( the_partition );
+  _ISR_lock_Destroy( &the_partition->Lock );
   _Objects_Free( &_Partition_Information, &the_partition->Object );
   _Objects_Allocator_unlock();
   return RTEMS_SUCCESSFUL;
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 19/20] rtems: Remove unused _Event_Timeout()

2020-11-20 Thread Sebastian Huber
---
 cpukit/include/rtems/rtems/eventimpl.h | 8 
 1 file changed, 8 deletions(-)

diff --git a/cpukit/include/rtems/rtems/eventimpl.h 
b/cpukit/include/rtems/rtems/eventimpl.h
index c65c202de4..dc56ad2127 100644
--- a/cpukit/include/rtems/rtems/eventimpl.h
+++ b/cpukit/include/rtems/rtems/eventimpl.h
@@ -52,14 +52,6 @@ rtems_status_code _Event_Surrender(
   ISR_lock_Context  *lock_context
 );
 
-/**
- *  @brief Timeout Event
- */
-void _Event_Timeout(
-  Objects_Id  id,
-  void   *arg
-);
-
 RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
 {
   event->pending_events = 0;
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 15/20] rtems: Move _Partition_Allocate()

2020-11-20 Thread Sebastian Huber
It is only used by rtems_partition_create().
---
 cpukit/include/rtems/rtems/partimpl.h | 12 
 cpukit/rtems/src/partcreate.c |  5 +
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index ab0bdc76f7..e2325bf8b5 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -33,18 +33,6 @@ extern "C" {
  * @{
  */
 
-/**
- *  @brief Allocates a partition control block from the
- *  inactive chain of free partition control blocks.
- *
- *  This function allocates a partition control block from
- *  the inactive chain of free partition control blocks.
- */
-RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
-{
-  return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
-}
-
 /**
  * @brief Calls _Objects_Get() using the ::_Partition_Information.
  *
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
index a6824d5224..7caac4f796 100644
--- a/cpukit/rtems/src/partcreate.c
+++ b/cpukit/rtems/src/partcreate.c
@@ -37,6 +37,11 @@ static bool _Partition_Is_buffer_area_aligned( const void 
*starting_address )
   return ( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;
 }
 
+static Partition_Control *_Partition_Allocate( void )
+{
+  return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
+}
+
 static void _Partition_Initialize(
   Partition_Control *the_partition,
   void  *starting_address,
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 17/20] rtems: Remove unused EVENT_CURRENT

2020-11-20 Thread Sebastian Huber
---
 cpukit/include/rtems/rtems/eventimpl.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/cpukit/include/rtems/rtems/eventimpl.h 
b/cpukit/include/rtems/rtems/eventimpl.h
index 141ea46082..9ccee0adbd 100644
--- a/cpukit/include/rtems/rtems/eventimpl.h
+++ b/cpukit/include/rtems/rtems/eventimpl.h
@@ -32,12 +32,6 @@ extern "C" {
  * @{
  */
 
-/**
- *  This constant is passed as the event_in to the
- *  rtems_event_receive directive to determine which events are pending.
- */
-#define EVENT_CURRENT  0
-
 /**
  *  The following constant is the value of an event set which
  *  has no events pending.
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 13/20] rtems: Move _Partition_Is_buffer_area_aligned()

2020-11-20 Thread Sebastian Huber
It is only used by rtems_partition_create().
---
 cpukit/include/rtems/rtems/partimpl.h | 7 ---
 cpukit/rtems/src/partcreate.c | 5 +
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index b9d57ae3c3..dcffe757c7 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -34,13 +34,6 @@ extern "C" {
  * @{
  */
 
-RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_area_aligned(
-  const void *starting_address
-)
-{
-  return (((uintptr_t) starting_address) % CPU_SIZEOF_POINTER) == 0;
-}
-
 /**
  *  @brief Allocates a partition control block from the
  *  inactive chain of free partition control blocks.
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
index 6673ce2c59..da791e2360 100644
--- a/cpukit/rtems/src/partcreate.c
+++ b/cpukit/rtems/src/partcreate.c
@@ -31,6 +31,11 @@ static bool _Partition_Is_buffer_size_aligned( size_t 
buffer_size )
   return ( buffer_size % CPU_SIZEOF_POINTER ) == 0;
 }
 
+static bool _Partition_Is_buffer_area_aligned( const void *starting_address )
+{
+  return ( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;
+}
+
 rtems_status_code rtems_partition_create(
   rtems_name   name,
   void*starting_address,
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 12/20] rtems: Move _Partition_Is_buffer_size_aligned()

2020-11-20 Thread Sebastian Huber
It is only used by rtems_partition_create().  Fix integer type.
---
 cpukit/include/rtems/rtems/partimpl.h | 7 ---
 cpukit/rtems/src/partcreate.c | 5 +
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/cpukit/include/rtems/rtems/partimpl.h 
b/cpukit/include/rtems/rtems/partimpl.h
index 0d15d1e991..b9d57ae3c3 100644
--- a/cpukit/include/rtems/rtems/partimpl.h
+++ b/cpukit/include/rtems/rtems/partimpl.h
@@ -34,13 +34,6 @@ extern "C" {
  * @{
  */
 
-RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned(
-  uint32_t buffer_size
-)
-{
-  return (buffer_size % CPU_SIZEOF_POINTER) == 0;
-}
-
 RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_area_aligned(
   const void *starting_address
 )
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
index 9d4c7df283..6673ce2c59 100644
--- a/cpukit/rtems/src/partcreate.c
+++ b/cpukit/rtems/src/partcreate.c
@@ -26,6 +26,11 @@
 #include 
 #include 
 
+static bool _Partition_Is_buffer_size_aligned( size_t buffer_size )
+{
+  return ( buffer_size % CPU_SIZEOF_POINTER ) == 0;
+}
+
 rtems_status_code rtems_partition_create(
   rtems_name   name,
   void*starting_address,
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 16/20] rtems: Canonicalize task event file documentation

2020-11-20 Thread Sebastian Huber
---
 cpukit/include/rtems/rtems/eventdata.h | 3 ++-
 cpukit/include/rtems/rtems/eventimpl.h | 2 +-
 cpukit/rtems/src/eventmp.c | 8 +---
 cpukit/rtems/src/eventreceive.c| 5 +++--
 cpukit/rtems/src/eventseize.c  | 5 +++--
 cpukit/rtems/src/eventsend.c   | 8 +---
 cpukit/rtems/src/eventsurrender.c  | 8 +---
 cpukit/rtems/src/systemeventreceive.c  | 5 +++--
 cpukit/rtems/src/systemeventsend.c | 5 +++--
 9 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/cpukit/include/rtems/rtems/eventdata.h 
b/cpukit/include/rtems/rtems/eventdata.h
index 16ff7a3981..fa69a2a932 100644
--- a/cpukit/include/rtems/rtems/eventdata.h
+++ b/cpukit/include/rtems/rtems/eventdata.h
@@ -3,7 +3,8 @@
  *
  * @ingroup ClassicEventImpl
  *
- * @brief Classic Event Manager Data Structures
+ * @brief This header file provides the API used by the Application
+ *   Configuration to define the configured Thread Control Block (TCB).
  */
 
 /* COPYRIGHT (c) 1989-2008.
diff --git a/cpukit/include/rtems/rtems/eventimpl.h 
b/cpukit/include/rtems/rtems/eventimpl.h
index 21a4884493..141ea46082 100644
--- a/cpukit/include/rtems/rtems/eventimpl.h
+++ b/cpukit/include/rtems/rtems/eventimpl.h
@@ -3,7 +3,7 @@
  *
  * @ingroup ClassicEventImpl
  *
- * @brief Classic Event Manager Implementation
+ * @brief This header file provides interfaces used by the event 
implementation.
  */
 
 /*  COPYRIGHT (c) 1989-2008.
diff --git a/cpukit/rtems/src/eventmp.c b/cpukit/rtems/src/eventmp.c
index ee971a720a..a31476af74 100644
--- a/cpukit/rtems/src/eventmp.c
+++ b/cpukit/rtems/src/eventmp.c
@@ -1,8 +1,10 @@
 /**
- *  @file
+ * @file
  *
- *  @brief Event MP Support
- *  @ingroup ClassicEventMP
+ * @ingroup ClassicEventMP
+ *
+ * @brief This source file contains the implementation of the task event MPCI
+ *   support.
  */
 
 /*
diff --git a/cpukit/rtems/src/eventreceive.c b/cpukit/rtems/src/eventreceive.c
index c638ec543c..fc5886b524 100644
--- a/cpukit/rtems/src/eventreceive.c
+++ b/cpukit/rtems/src/eventreceive.c
@@ -1,9 +1,10 @@
 /**
  * @file
  *
- * @ingroup ClassicEventSet Event Set
+ * @ingroup ClassicEventImpl
  *
- * @brief  Constant used to receive the set of currently pending events in
+ * @brief This source file contains the implementation of
+ *   rtems_event_receive().
  */
 
 /*
diff --git a/cpukit/rtems/src/eventseize.c b/cpukit/rtems/src/eventseize.c
index 8230959ec0..874c142c1a 100644
--- a/cpukit/rtems/src/eventseize.c
+++ b/cpukit/rtems/src/eventseize.c
@@ -1,9 +1,10 @@
 /**
  * @file
  *
- * @ingroup ClassicEvent Events
+ * @ingroup ClassicEventImpl
  *
- * @brief Event Manager Initialization
+ * @brief This source file contains the implementation of
+ *   _Event_Seize() and the task event MPCI support system initialization.
  */
 
 /*
diff --git a/cpukit/rtems/src/eventsend.c b/cpukit/rtems/src/eventsend.c
index cfd091c96d..470b7f4601 100644
--- a/cpukit/rtems/src/eventsend.c
+++ b/cpukit/rtems/src/eventsend.c
@@ -1,8 +1,10 @@
 /**
- *  @file
+ * @file
  *
- *  @brief Sends an Event Set to the Target Task
- *  @ingroup ClassicEvent
+ * @ingroup ClassicEventImpl
+ *
+ * @brief This source file contains the implementation of
+ *   rtems_event_send().
  */
 
 /*
diff --git a/cpukit/rtems/src/eventsurrender.c 
b/cpukit/rtems/src/eventsurrender.c
index 49f77d2663..6cdaafaa97 100644
--- a/cpukit/rtems/src/eventsurrender.c
+++ b/cpukit/rtems/src/eventsurrender.c
@@ -1,8 +1,10 @@
 /**
- *  @file
+ * @file
  *
- *  @brief Surrender Event
- *  @ingroup ClassicEvent
+ * @ingroup ClassicEventImpl
+ *
+ * @brief This source file contains the implementation of
+ *   _Event_Surrender().
  */
 
 /*
diff --git a/cpukit/rtems/src/systemeventreceive.c 
b/cpukit/rtems/src/systemeventreceive.c
index ee2526072d..30e5adcd2c 100644
--- a/cpukit/rtems/src/systemeventreceive.c
+++ b/cpukit/rtems/src/systemeventreceive.c
@@ -1,9 +1,10 @@
 /**
  * @file
  *
- * @ingroup ClassicEventSystem
+ * @ingroup ClassicEventImpl
  *
- * @brief rtems_event_system_receive() implementation.
+ * @brief This source file contains the implementation of
+ *   rtems_event_system_receive().
  */
 
 /*
diff --git a/cpukit/rtems/src/systemeventsend.c 
b/cpukit/rtems/src/systemeventsend.c
index e939d7700a..6a83ec4726 100644
--- a/cpukit/rtems/src/systemeventsend.c
+++ b/cpukit/rtems/src/systemeventsend.c
@@ -1,9 +1,10 @@
 /**
  * @file
  *
- * @ingroup ClassicEventSystem
+ * @ingroup ClassicEventImpl
  *
- * @brief rtems_event_system_send() implementation.
+ * @brief This source file contains the implementation of
+ *   rtems_event_system_send().
  */
 
 /*
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 18/20] rtems: Remove EVENT_SETS_NONE_PENDING

2020-11-20 Thread Sebastian Huber
This define was only used in one place.
---
 cpukit/include/rtems/rtems/eventimpl.h | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/cpukit/include/rtems/rtems/eventimpl.h 
b/cpukit/include/rtems/rtems/eventimpl.h
index 9ccee0adbd..c65c202de4 100644
--- a/cpukit/include/rtems/rtems/eventimpl.h
+++ b/cpukit/include/rtems/rtems/eventimpl.h
@@ -32,12 +32,6 @@ extern "C" {
  * @{
  */
 
-/**
- *  The following constant is the value of an event set which
- *  has no events pending.
- */
-#define EVENT_SETS_NONE_PENDING 0
-
 rtems_status_code _Event_Seize(
   rtems_event_setevent_in,
   rtems_option   option_set,
@@ -68,7 +62,7 @@ void _Event_Timeout(
 
 RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
 {
-  event->pending_events = EVENT_SETS_NONE_PENDING;
+  event->pending_events = 0;
 }
 
 /**
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] eng: Rework and clarify Doxygen Guidelines

2020-11-20 Thread Sebastian Huber

On 19/11/2020 17:28, Joel Sherrill wrote:



Is there guidance on embedding figures? dot, plantuml, mscgen? I don't
recall if there are actual graphic images embedded. But if there are, we
should have source in some acceptable open format.
Good question, I only see some uses of @dot in the sources. Using mscgen 
and plantuml could be helpful in some cases. We already use plantuml in 
the documentation.


--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 18/20] rtems: Remove EVENT_SETS_NONE_PENDING

2020-11-20 Thread Joel Sherrill
On Fri, Nov 20, 2020, 5:16 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> This define was only used in one place.
> ---
>  cpukit/include/rtems/rtems/eventimpl.h | 8 +---
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/cpukit/include/rtems/rtems/eventimpl.h
> b/cpukit/include/rtems/rtems/eventimpl.h
> index 9ccee0adbd..c65c202de4 100644
> --- a/cpukit/include/rtems/rtems/eventimpl.h
> +++ b/cpukit/include/rtems/rtems/eventimpl.h
> @@ -32,12 +32,6 @@ extern "C" {
>   * @{
>   */
>
> -/**
> - *  The following constant is the value of an event set which
> - *  has no events pending.
> - */
> -#define EVENT_SETS_NONE_PENDING 0
> -
>  rtems_status_code _Event_Seize(
>rtems_event_setevent_in,
>rtems_option   option_set,
> @@ -68,7 +62,7 @@ void _Event_Timeout(
>
>  RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
>  {
> -  event->pending_events = EVENT_SETS_NONE_PENDING;
> +  event->pending_events = 0;
>

This loses clarity to me. If you want to ditch the constant, you have to
add a comment.

>  }
>
>  /**
> --
> 2.26.2
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 19/20] rtems: Remove unused _Event_Timeout()

2020-11-20 Thread Joel Sherrill
Ok

On Fri, Nov 20, 2020, 5:16 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> ---
>  cpukit/include/rtems/rtems/eventimpl.h | 8 
>  1 file changed, 8 deletions(-)
>
> diff --git a/cpukit/include/rtems/rtems/eventimpl.h
> b/cpukit/include/rtems/rtems/eventimpl.h
> index c65c202de4..dc56ad2127 100644
> --- a/cpukit/include/rtems/rtems/eventimpl.h
> +++ b/cpukit/include/rtems/rtems/eventimpl.h
> @@ -52,14 +52,6 @@ rtems_status_code _Event_Surrender(
>ISR_lock_Context  *lock_context
>  );
>
> -/**
> - *  @brief Timeout Event
> - */
> -void _Event_Timeout(
> -  Objects_Id  id,
> -  void   *arg
> -);
> -
>  RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
>  {
>event->pending_events = 0;
> --
> 2.26.2
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 13/20] rtems: Move _Partition_Is_buffer_area_aligned()

2020-11-20 Thread Joel Sherrill
Wasn't there Doxygen above it?

Needs comments

On Fri, Nov 20, 2020, 5:16 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> It is only used by rtems_partition_create().
> ---
>  cpukit/include/rtems/rtems/partimpl.h | 7 ---
>  cpukit/rtems/src/partcreate.c | 5 +
>  2 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/cpukit/include/rtems/rtems/partimpl.h
> b/cpukit/include/rtems/rtems/partimpl.h
> index b9d57ae3c3..dcffe757c7 100644
> --- a/cpukit/include/rtems/rtems/partimpl.h
> +++ b/cpukit/include/rtems/rtems/partimpl.h
> @@ -34,13 +34,6 @@ extern "C" {
>   * @{
>   */
>
> -RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_area_aligned(
> -  const void *starting_address
> -)
> -{
> -  return (((uintptr_t) starting_address) % CPU_SIZEOF_POINTER) == 0;
> -}
> -
>  /**
>   *  @brief Allocates a partition control block from the
>   *  inactive chain of free partition control blocks.
> diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
> index 6673ce2c59..da791e2360 100644
> --- a/cpukit/rtems/src/partcreate.c
> +++ b/cpukit/rtems/src/partcreate.c
> @@ -31,6 +31,11 @@ static bool _Partition_Is_buffer_size_aligned( size_t
> buffer_size )
>return ( buffer_size % CPU_SIZEOF_POINTER ) == 0;
>  }
>
> +static bool _Partition_Is_buffer_area_aligned( const void
> *starting_address )
> +{
> +  return ( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;
> +}
> +
>  rtems_status_code rtems_partition_create(
>rtems_name   name,
>void*starting_address,
> --
> 2.26.2
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 18/20] rtems: Remove EVENT_SETS_NONE_PENDING

2020-11-20 Thread Sebastian Huber

On 20/11/2020 14:30, Joel Sherrill wrote:




On Fri, Nov 20, 2020, 5:16 AM Sebastian Huber 
> wrote:


This define was only used in one place.
---
 cpukit/include/rtems/rtems/eventimpl.h | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/cpukit/include/rtems/rtems/eventimpl.h
b/cpukit/include/rtems/rtems/eventimpl.h
index 9ccee0adbd..c65c202de4 100644
--- a/cpukit/include/rtems/rtems/eventimpl.h
+++ b/cpukit/include/rtems/rtems/eventimpl.h
@@ -32,12 +32,6 @@ extern "C" {
  * @{
  */

-/**
- *  The following constant is the value of an event set which
- *  has no events pending.
- */
-#define EVENT_SETS_NONE_PENDING 0
-
 rtems_status_code _Event_Seize(
   rtems_event_set    event_in,
   rtems_option       option_set,
@@ -68,7 +62,7 @@ void _Event_Timeout(

 RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
 {
-  event->pending_events = EVENT_SETS_NONE_PENDING;
+  event->pending_events = 0;


This loses clarity to me. If you want to ditch the constant, you have 
to add a comment.


In patch 20 I added documentation for this function:

+/**
+ * @brief Initializes an event control block to have no pending events.
+ *
+ * @param event is the event control block to initialize.
+ */
 RTEMS_INLINE_ROUTINE void _Event_Initialize( Event_Control *event )
 {
   event->pending_events = 0;
 }

--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 13/20] rtems: Move _Partition_Is_buffer_area_aligned()

2020-11-20 Thread Sebastian Huber

On 20/11/2020 14:31, Joel Sherrill wrote:


Wasn't there Doxygen above it?

No.


Needs comments


I think a one liner function with a very descriptive name needs no 
comments if it is placed in a source file:


static bool _Partition_Is_buffer_area_aligned( const void 
*starting_address )

{
  return ( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;
}

--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 15/20] rtems: Move _Partition_Allocate()

2020-11-20 Thread Joel Sherrill
Why are the comments being deleted?

I assume this is happening in all of the patches of this type. Please don't
do that.

On Fri, Nov 20, 2020 at 5:16 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> It is only used by rtems_partition_create().
> ---
>  cpukit/include/rtems/rtems/partimpl.h | 12 
>  cpukit/rtems/src/partcreate.c |  5 +
>  2 files changed, 5 insertions(+), 12 deletions(-)
>
> diff --git a/cpukit/include/rtems/rtems/partimpl.h
> b/cpukit/include/rtems/rtems/partimpl.h
> index ab0bdc76f7..e2325bf8b5 100644
> --- a/cpukit/include/rtems/rtems/partimpl.h
> +++ b/cpukit/include/rtems/rtems/partimpl.h
> @@ -33,18 +33,6 @@ extern "C" {
>   * @{
>   */
>
> -/**
> - *  @brief Allocates a partition control block from the
> - *  inactive chain of free partition control blocks.
> - *
> - *  This function allocates a partition control block from
> - *  the inactive chain of free partition control blocks.
> - */
> -RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
> -{
> -  return (Partition_Control *) _Objects_Allocate( &_Partition_Information
> );
> -}
> -
>  /**
>   * @brief Calls _Objects_Get() using the ::_Partition_Information.
>   *
> diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
> index a6824d5224..7caac4f796 100644
> --- a/cpukit/rtems/src/partcreate.c
> +++ b/cpukit/rtems/src/partcreate.c
> @@ -37,6 +37,11 @@ static bool _Partition_Is_buffer_area_aligned( const
> void *starting_address )
>return ( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;
>  }
>
> +static Partition_Control *_Partition_Allocate( void )
> +{
> +  return (Partition_Control *) _Objects_Allocate( &_Partition_Information
> );
> +}
> +
>  static void _Partition_Initialize(
>Partition_Control *the_partition,
>void  *starting_address,
> --
> 2.26.2
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 15/20] rtems: Move _Partition_Allocate()

2020-11-20 Thread Sebastian Huber

On 20/11/2020 15:04, Joel Sherrill wrote:


Why are the comments being deleted?

I assume this is happening in all of the patches of this type. Please 
don't do that.


The comment is deleted since the function moves from a header file to a 
source file and it is a trivial one liner function with a descriptive 
name. I think is it absolutely obvious what


static Partition_Control *_Partition_Allocate( void )
{
  return (Partition_Control *) _Objects_Allocate( 
&_Partition_Information );

}

does.

--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Code coverage via GCOV

2020-11-20 Thread Sebastian Huber

On 10/11/2020 13:58, Sebastian Huber wrote:


Hello,

I reviewed a bit how the code coverage information is produced by GCC 
and what libgcov does. I think if we want to use GCOV in RTEMS to get 
code coverage in all system states, then we need some tweaks in GCC:


https://gcc.gnu.org/pipermail/gcc/2020-November/234164.html


The linker set based gcov information registration is already included 
in GCC:


https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-info-section

There is a discussion about how the gcov information can be transferred 
from the embedded system to the host:


https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-info-section

--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Code coverage via GCOV

2020-11-20 Thread Sebastian Huber


On 20/11/2020 15:46, Sebastian Huber wrote:

On 10/11/2020 13:58, Sebastian Huber wrote:


Hello,

I reviewed a bit how the code coverage information is produced by GCC 
and what libgcov does. I think if we want to use GCOV in RTEMS to get 
code coverage in all system states, then we need some tweaks in GCC:


https://gcc.gnu.org/pipermail/gcc/2020-November/234164.html


The linker set based gcov information registration is already included 
in GCC:


https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-info-section 



There is a discussion about how the gcov information can be 
transferred from the embedded system to the host:


https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-info-section 



Sorry, this is the URL:

https://gcc.gnu.org/pipermail/gcc-patches/2020-November/559342.html

--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 09/20] rtems: Remove _Partition_Destroy()

2020-11-20 Thread Gedare Bloom
On Fri, Nov 20, 2020 at 4:15 AM Sebastian Huber
 wrote:
>
> It was a trivial function call wrapper used only in one place.
> ---
>  cpukit/include/rtems/rtems/partimpl.h | 7 ---
>  cpukit/rtems/src/partdelete.c | 2 +-
>  2 files changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/cpukit/include/rtems/rtems/partimpl.h 
> b/cpukit/include/rtems/rtems/partimpl.h
> index 55de7b113d..fc17311803 100644
> --- a/cpukit/include/rtems/rtems/partimpl.h
> +++ b/cpukit/include/rtems/rtems/partimpl.h
> @@ -129,13 +129,6 @@ RTEMS_INLINE_ROUTINE void _Partition_Initialize(
>_ISR_lock_Initialize( &the_partition->Lock, "Partition" );
>  }
>
> -RTEMS_INLINE_ROUTINE void _Partition_Destroy(
> -  Partition_Control *the_partition
> -)
> -{
> -  _ISR_lock_Destroy( &the_partition->Lock );
> -}
> -

OK. This "Destroy" is shallow anyway, so probably not well-named in
the first place.

>  /**
>   * @brief Calls _Objects_Get() using the ::_Partition_Information.
>   *
> diff --git a/cpukit/rtems/src/partdelete.c b/cpukit/rtems/src/partdelete.c
> index 4fc71aff2d..f0d04f94a0 100644
> --- a/cpukit/rtems/src/partdelete.c
> +++ b/cpukit/rtems/src/partdelete.c
> @@ -72,7 +72,7 @@ rtems_status_code rtems_partition_delete(
>}1
>  #endif
>
> -  _Partition_Destroy( the_partition );
> +  _ISR_lock_Destroy( &the_partition->Lock );
>_Objects_Free( &_Partition_Information, &the_partition->Object );
>_Objects_Allocator_unlock();
>return RTEMS_SUCCESSFUL;
> --
> 2.26.2
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 11/20] rtems: Move _Partition_Is_buffer_on_boundary()

2020-11-20 Thread Gedare Bloom
On Fri, Nov 20, 2020 at 4:16 AM Sebastian Huber
 wrote:
>
> It is used only by rtems_partition_return_buffer().Make the PTCB the
> first parameter.
> ---
>  cpukit/include/rtems/rtems/partimpl.h | 22 --
>  cpukit/rtems/src/partreturnbuffer.c   | 17 -
>  2 files changed, 16 insertions(+), 23 deletions(-)
>
> diff --git a/cpukit/include/rtems/rtems/partimpl.h 
> b/cpukit/include/rtems/rtems/partimpl.h
> index 23d5422bec..0d15d1e991 100644
> --- a/cpukit/include/rtems/rtems/partimpl.h
> +++ b/cpukit/include/rtems/rtems/partimpl.h
> @@ -19,7 +19,6 @@
>  #define _RTEMS_RTEMS_PARTIMPL_H
>
>  #include 
> -#include 
>  #include 
>  #include 
>
> @@ -35,27 +34,6 @@ extern "C" {
>   * @{
>   */
>
> -/**
> - *  @brief Checks whether is on a valid buffer boundary for the_partition.
> - *
> - *  This function returns TRUE if the_buffer is on a valid buffer
> - *  boundary for the_partition, and FALSE otherwise.

I think keep these two lines. This function is not so clear without
thinking through what it means to do pointer arithmetic (subtraction
and mod).

> - */
> -RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_on_boundary (
> -  void  *the_buffer,
> -  Partition_Control *the_partition
> -)
> -{
> -  intptr_t offset;
> -
> -  offset = _Addresses_Subtract(
> -the_buffer,
> -the_partition->starting_address
> -  );
> -
> -  return ((offset % the_partition->buffer_size) == 0);
> -}
> -
>  RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned(
>uint32_t buffer_size
>  )
> diff --git a/cpukit/rtems/src/partreturnbuffer.c 
> b/cpukit/rtems/src/partreturnbuffer.c
> index 61900fa735..bc0d273719 100644
> --- a/cpukit/rtems/src/partreturnbuffer.c
> +++ b/cpukit/rtems/src/partreturnbuffer.c
> @@ -24,6 +24,21 @@
>  #include 
>  #include 
>
> +static bool _Partition_Is_buffer_on_boundary (
> +  const Partition_Control *the_partition,
> +  const void  *the_buffer
> +)
> +{
> +  intptr_t offset;
> +
> +  offset = _Addresses_Subtract(
> +the_buffer,
> +the_partition->starting_address
> +  );
> +
> +  return ( ( offset % the_partition->buffer_size ) == 0);
> +}
> +
>  static bool _Partition_Is_buffer_valid(
> const Partition_Control *the_partition,
> const void  *the_buffer
> @@ -36,7 +51,7 @@ static bool _Partition_Is_buffer_valid(
>ending   = _Addresses_Add_offset( starting, the_partition->length );
>
>return _Addresses_Is_in_range( the_buffer, starting, ending )
> -&& _Partition_Is_buffer_on_boundary( the_buffer, the_partition );
> +&& _Partition_Is_buffer_on_boundary( the_partition, the_buffer );
>  }
>
>  static void _Partition_Free_buffer(
> --
> 2.26.2
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 12/20] rtems: Move _Partition_Is_buffer_size_aligned()

2020-11-20 Thread Gedare Bloom
On Fri, Nov 20, 2020 at 4:16 AM Sebastian Huber
 wrote:
>
> It is only used by rtems_partition_create().  Fix integer type.
> ---
>  cpukit/include/rtems/rtems/partimpl.h | 7 ---
>  cpukit/rtems/src/partcreate.c | 5 +
>  2 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/cpukit/include/rtems/rtems/partimpl.h 
> b/cpukit/include/rtems/rtems/partimpl.h
> index 0d15d1e991..b9d57ae3c3 100644
> --- a/cpukit/include/rtems/rtems/partimpl.h
> +++ b/cpukit/include/rtems/rtems/partimpl.h
> @@ -34,13 +34,6 @@ extern "C" {
>   * @{
>   */
>
> -RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned(
> -  uint32_t buffer_size
> -)
> -{
> -  return (buffer_size % CPU_SIZEOF_POINTER) == 0;
> -}
> -
>  RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_area_aligned(
>const void *starting_address
>  )
> diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
> index 9d4c7df283..6673ce2c59 100644
> --- a/cpukit/rtems/src/partcreate.c
> +++ b/cpukit/rtems/src/partcreate.c
> @@ -26,6 +26,11 @@
>  #include 
>  #include 
>
> +static bool _Partition_Is_buffer_size_aligned( size_t buffer_size )

Nit: I never saw this before, but this isn't what "aligned" means.
Aligned means you start something at a specific multiple. This is
checking if the buffer_size is a multiple of the pointer size. Anyway,
it is just used here so it's fine, but maybe just a one-line comment
that buffer sizes are required to be a multiple of the pointer size.

> +{
> +  return ( buffer_size % CPU_SIZEOF_POINTER ) == 0;
> +}
> +
>  rtems_status_code rtems_partition_create(
>rtems_name   name,
>void*starting_address,
> --
> 2.26.2
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 15/20] rtems: Move _Partition_Allocate()

2020-11-20 Thread Gedare Bloom
I agree, this one doesn't need a comment, it is quite clear.

On Fri, Nov 20, 2020 at 7:08 AM Sebastian Huber
 wrote:
>
> On 20/11/2020 15:04, Joel Sherrill wrote:
>
> > Why are the comments being deleted?
> >
> > I assume this is happening in all of the patches of this type. Please
> > don't do that.
>
> The comment is deleted since the function moves from a header file to a
> source file and it is a trivial one liner function with a descriptive
> name. I think is it absolutely obvious what
>
> static Partition_Control *_Partition_Allocate( void )
> {
>return (Partition_Control *) _Objects_Allocate(
> &_Partition_Information );
> }
>
> does.
>
> --
> embedded brains GmbH
> Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.hu...@embedded-brains.de
> Phone: +49-89-18 94 741 - 16
> Fax:   +49-89-18 94 741 - 08
> PGP: Public key available on request.
>
> embedded brains GmbH
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier: 
> https://embedded-brains.de/datenschutzerklaerung/
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 13/20] rtems: Move _Partition_Is_buffer_area_aligned()

2020-11-20 Thread Gedare Bloom
On Fri, Nov 20, 2020 at 6:34 AM Sebastian Huber
 wrote:
>
> On 20/11/2020 14:31, Joel Sherrill wrote:
>
> > Wasn't there Doxygen above it?
> No.
> >
> > Needs comments
>
> I think a one liner function with a very descriptive name needs no
> comments if it is placed in a source file:
>
> static bool _Partition_Is_buffer_area_aligned( const void
> *starting_address )
> {
>return ( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;
> }

I disagree, this is worth one line to remind that buffers need to be
aligned to a multiple of the pointer size (and are a multiple of the
pointer size).

Just because we can put the code in one line doesn't mean that its
context is clear.

>
> --
> embedded brains GmbH
> Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.hu...@embedded-brains.de
> Phone: +49-89-18 94 741 - 16
> Fax:   +49-89-18 94 741 - 08
> PGP: Public key available on request.
>
> embedded brains GmbH
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier: 
> https://embedded-brains.de/datenschutzerklaerung/
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Code coverage via GCOV

2020-11-20 Thread Gedare Bloom
On Fri, Nov 20, 2020 at 7:47 AM Sebastian Huber
 wrote:
>
>
> On 20/11/2020 15:46, Sebastian Huber wrote:
> > On 10/11/2020 13:58, Sebastian Huber wrote:
> >
> >> Hello,
> >>
> >> I reviewed a bit how the code coverage information is produced by GCC
> >> and what libgcov does. I think if we want to use GCOV in RTEMS to get
> >> code coverage in all system states, then we need some tweaks in GCC:
> >>
> >> https://gcc.gnu.org/pipermail/gcc/2020-November/234164.html
> >
> > The linker set based gcov information registration is already included
> > in GCC:
> >
> > https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-info-section
> >
> >
> > There is a discussion about how the gcov information can be
> > transferred from the embedded system to the host:
> >
> > https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-info-section
> >
>
> Sorry, this is the URL:
>
> https://gcc.gnu.org/pipermail/gcc-patches/2020-November/559342.html
>

It's an interesting read. Thanks for pushing on them to consider
embedded needs (or at least, our needs). It will be nice if we can get
onboard coverage runs and not just simulated ones.

> --
> embedded brains GmbH
> Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.hu...@embedded-brains.de
> Phone: +49-89-18 94 741 - 16
> Fax:   +49-89-18 94 741 - 08
> PGP: Public key available on request.
>
> embedded brains GmbH
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier: 
> https://embedded-brains.de/datenschutzerklaerung/
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 13/20] rtems: Move _Partition_Is_buffer_area_aligned()

2020-11-20 Thread Sebastian Huber

On 20/11/2020 17:18, Gedare Bloom wrote:


On Fri, Nov 20, 2020 at 6:34 AM Sebastian Huber
  wrote:

On 20/11/2020 14:31, Joel Sherrill wrote:


Wasn't there Doxygen above it?

No.

Needs comments

I think a one liner function with a very descriptive name needs no
comments if it is placed in a source file:

static bool _Partition_Is_buffer_area_aligned( const void
*starting_address )
{
return ( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;
}

I disagree, this is worth one line to remind that buffers need to be
aligned to a multiple of the pointer size (and are a multiple of the
pointer size).

Just because we can put the code in one line doesn't mean that its
context is clear.


This function is no longer in a header file. It is in a source file 
right next to the code which calls this function. The function name 
_Partition_Is_buffer_area_aligned() tells you that the function checks 
if the buffer area is aligned. The code


( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;

tells you exactly that the address is aligned if and only if it is an integral 
multiple of the pointer size. Which information is missing which justifies a 
comment?

--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] c-user: Add CONFIGURE_INIT_TASK_STORAGE_SIZE

2020-11-20 Thread Gedare Bloom
ok

On Fri, Nov 20, 2020 at 2:36 AM Sebastian Huber
 wrote:
>
> Close #4181.
> ---
>  c-user/config/classic-init-task.rst | 52 -
>  1 file changed, 51 insertions(+), 1 deletion(-)
>
> diff --git a/c-user/config/classic-init-task.rst 
> b/c-user/config/classic-init-task.rst
> index 4d3bf81..dc07068 100644
> --- a/c-user/config/classic-init-task.rst
> +++ b/c-user/config/classic-init-task.rst
> @@ -229,7 +229,57 @@ DESCRIPTION:
>  Classic API initialization task.
>
>  NOTES:
> -None.
> +The
> +
> +* ``CONFIGURE_INIT_TASK_STACK_SIZE`` and
> +
> +* :ref:`CONFIGURE_INIT_TASK_STORAGE_SIZE`
> +
> +configuration options are mutually exclusive.
> +
> +.. Generated from spec:/acfg/if/init-task-storage-size
> +
> +.. index:: CONFIGURE_INIT_TASK_STORAGE_SIZE
> +
> +.. _CONFIGURE_INIT_TASK_STORAGE_SIZE:
> +
> +CONFIGURE_INIT_TASK_STORAGE_SIZE
> +
> +
> +CONSTANT:
> +``CONFIGURE_INIT_TASK_STORAGE_SIZE``
> +
> +OPTION TYPE:
> +This configuration option is an integer define.
> +
> +DEFAULT VALUE:
> +The default value is 0.
> +
> +VALUE CONSTRAINTS:
> +The value of this configuration option shall satisfy all of the following
> +constraints:
> +
> +* It shall be greater than or equal to 
> :ref:`CONFIGURE_MINIMUM_TASK_STACK_SIZE`.
> +
> +* It shall be defined using
> +  :c:func:`RTEMS_TASK_STORAGE_SIZE`.
> +
> +DESCRIPTION:
> +The value of this configuration option defines the task storage size of 
> the
> +Classic API initialization task.  If this configuration option is 
> specified,
> +then the Classic API initialization task is constructed by
> +:c:func:`rtems_task_construct` instead of using
> +:c:func:`rtems_task_create`.
> +
> +NOTES:
> +A task storage area of the specified size is defined by the 
> configuration for
> +the Classic API initialization task.  The
> +
> +* :ref:`CONFIGURE_INIT_TASK_STACK_SIZE` and
> +
> +* ``CONFIGURE_INIT_TASK_STORAGE_SIZE``
> +
> +configuration options are mutually exclusive.
>
>  .. Generated from spec:/acfg/if/rtems-init-tasks-table
>
> --
> 2.26.2
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 12/20] rtems: Move _Partition_Is_buffer_size_aligned()

2020-11-20 Thread Sebastian Huber

On 20/11/2020 17:15, Gedare Bloom wrote:


+static bool _Partition_Is_buffer_size_aligned( size_t buffer_size )

Nit: I never saw this before, but this isn't what "aligned" means.
Aligned means you start something at a specific multiple. This is
checking if the buffer_size is a multiple of the pointer size. Anyway,
it is just used here so it's fine, but maybe just a one-line comment
that buffer sizes are required to be a multiple of the pointer size.

I think in this case we should review the documentation. If the function 
name is irritating, then we should remove it. It is only called in one 
place. So change


  if ( !_Partition_Is_buffer_size_aligned( buffer_size ) )
    return RTEMS_INVALID_SIZE;

to


  if ( ( buffer_size % CPU_SIZEOF_POINTER ) != 0 )
    return RTEMS_INVALID_SIZE;

--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 13/20] rtems: Move _Partition_Is_buffer_area_aligned()

2020-11-20 Thread Sebastian Huber

On 20/11/2020 17:24, Sebastian Huber wrote:


On 20/11/2020 17:18, Gedare Bloom wrote:


On Fri, Nov 20, 2020 at 6:34 AM Sebastian Huber
 wrote:

On 20/11/2020 14:31, Joel Sherrill wrote:


Wasn't there Doxygen above it?

No.

Needs comments

I think a one liner function with a very descriptive name needs no
comments if it is placed in a source file:

static bool _Partition_Is_buffer_area_aligned( const void
*starting_address )
{
    return ( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) 
== 0;

}

I disagree, this is worth one line to remind that buffers need to be
aligned to a multiple of the pointer size (and are a multiple of the
pointer size).

Just because we can put the code in one line doesn't mean that its
context is clear.


This function is no longer in a header file. It is in a source file 
right next to the code which calls this function. The function name 
_Partition_Is_buffer_area_aligned() tells you that the function checks 
if the buffer area is aligned. The code


( ( (uintptr_t) starting_address ) % CPU_SIZEOF_POINTER ) == 0;

tells you exactly that the address is aligned if and only if it is an 
integral multiple of the pointer size. Which information is missing 
which justifies a comment? 
This function is only used in one place. So, instead of adding a comment 
to this function, it makes more sense to remove the function and add a 
comment to the calling site.


--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 2/3] score: Add CONFIGURE_INIT_TASK_STORAGE_SIZE

2020-11-20 Thread Gedare Bloom
On Fri, Nov 20, 2020 at 1:31 AM Sebastian Huber
 wrote:
>
> In order to better support applications which use the new
> rtems_task_construct() directive add the
> CONFIGURE_INIT_TASK_STORAGE_SIZE configuration option.  If this option
> is specified, then the Classic API initialization task is constructed
> with rtems_task_construct().
>
> Update #4181.
> ---
>  cpukit/Makefile.am  |  1 +
>  cpukit/doxygen/appl-config.h| 48 +++
>  cpukit/include/rtems/confdefs/inittask.h| 53 ++---
>  cpukit/include/rtems/rtems/tasksdata.h  | 45 +-
>  cpukit/include/rtems/score/interr.h |  3 +-
>  cpukit/rtems/src/taskconstructuser.c| 65 +
>  cpukit/sapi/src/interrtext.c|  3 +-
>  spec/build/cpukit/librtemscpu.yml   |  1 +
>  spec/build/testsuites/sptests/grp.yml   |  2 +
>  spec/build/testsuites/sptests/spfatal34.yml | 19 ++
>  testsuites/sptests/spfatal34/init.c | 50 
>  testsuites/sptests/spfatal34/spfatal34.doc  | 11 
>  testsuites/sptests/spfatal34/spfatal34.scn  |  8 +++
>  testsuites/sptests/spinternalerror02/init.c |  2 +-
>  14 files changed, 296 insertions(+), 15 deletions(-)
>  create mode 100644 cpukit/rtems/src/taskconstructuser.c
>  create mode 100644 spec/build/testsuites/sptests/spfatal34.yml
>  create mode 100644 testsuites/sptests/spfatal34/init.c
>  create mode 100644 testsuites/sptests/spfatal34/spfatal34.doc
>  create mode 100644 testsuites/sptests/spfatal34/spfatal34.scn
>
> diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
> index 8c7f9c1ed4..b7435d7eb6 100644
> --- a/cpukit/Makefile.am
> +++ b/cpukit/Makefile.am
> @@ -790,6 +790,7 @@ librtemscpu_a_SOURCES += rtems/src/statustoerrno.c
>  librtemscpu_a_SOURCES += rtems/src/systemeventreceive.c
>  librtemscpu_a_SOURCES += rtems/src/systemeventsend.c
>  librtemscpu_a_SOURCES += rtems/src/taskconstruct.c
> +librtemscpu_a_SOURCES += rtems/src/taskconstructuser.c
>  librtemscpu_a_SOURCES += rtems/src/taskcreate.c
>  librtemscpu_a_SOURCES += rtems/src/taskdelete.c
>  librtemscpu_a_SOURCES += rtems/src/taskexit.c
> diff --git a/cpukit/doxygen/appl-config.h b/cpukit/doxygen/appl-config.h
> index 00230ac2d6..f469f8b41c 100644
> --- a/cpukit/doxygen/appl-config.h
> +++ b/cpukit/doxygen/appl-config.h
> @@ -1145,9 +1145,57 @@
>   *   out by  does not overflow an integer of type*   href="https://en.cppreference.com/w/c/types/integer";>uintptr_t.
>   * @endparblock
> + *
> + * @par Notes
> + * @parblock
> + * The
> + *
> + * * ``CONFIGURE_INIT_TASK_STACK_SIZE`` and
> + *
> + * * #CONFIGURE_INIT_TASK_STORAGE_SIZE
> + *
> + * configuration options are mutually exclusive.
> + * @endparblock
>   */
>  #define CONFIGURE_INIT_TASK_STACK_SIZE
>
> +/* Generated from spec:/acfg/if/init-task-storage-size */
> +
> +/**
> + * @brief This configuration option is an integer define.
> + *
> + * The value of this configuration option defines the task storage size of 
> the
> + * Classic API initialization task.  If this configuration option is 
> specified,
> + * then the Classic API initialization task is constructed by
> + * rtems_task_construct() instead of using rtems_task_create().
> + *
> + * @par Default Value
> + * The default value is 0.
> + *
> + * @par Value Constraints
> + * @parblock
> + * The value of this configuration option shall satisfy all of the following
> + * constraints:
> + *
> + * * It shall be greater than or equal to #CONFIGURE_MINIMUM_TASK_STACK_SIZE.
> + *
> + * * It shall be defined using RTEMS_TASK_STORAGE_SIZE().
> + * @endparblock
> + *
> + * @par Notes
> + * @parblock
> + * A task storage area of the specified size is defined by the configuration
> + * for the Classic API initialization task.  The
> + *
> + * * #CONFIGURE_INIT_TASK_STACK_SIZE and
> + *
> + * * ``CONFIGURE_INIT_TASK_STORAGE_SIZE``
> + *
> + * configuration options are mutually exclusive.
> + * @endparblock
> + */
> +#define CONFIGURE_INIT_TASK_STORAGE_SIZE
> +
>  /* Generated from spec:/acfg/if/rtems-init-tasks-table */
>
>  /**
> diff --git a/cpukit/include/rtems/confdefs/inittask.h 
> b/cpukit/include/rtems/confdefs/inittask.h
> index 25453f031d..f1d937e561 100644
> --- a/cpukit/include/rtems/confdefs/inittask.h
> +++ b/cpukit/include/rtems/confdefs/inittask.h
> @@ -48,6 +48,7 @@
>  #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
>
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -72,15 +73,6 @@
>#define CONFIGURE_INIT_TASK_PRIORITY 1
>  #endif
>
> -#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
> -  #define CONFIGURE_INIT_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE
> -#endif
> -
> -#if CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE
> -  #define _CONFIGURE_INIT_TASK_STACK_EXTRA \
> -( CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE )
> -#endif
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> @@ -113,6 +105,47 @@ RTEMS_STATIC_ASSERT(

Re: [PATCH 11/20] rtems: Move _Partition_Is_buffer_on_boundary()

2020-11-20 Thread Sebastian Huber

On 20/11/2020 17:10, Gedare Bloom wrote:


-/**
- *  @brief Checks whether is on a valid buffer boundary for the_partition.
- *
- *  This function returns TRUE if the_buffer is on a valid buffer
- *  boundary for the_partition, and FALSE otherwise.

I think keep these two lines. This function is not so clear without
thinking through what it means to do pointer arithmetic (subtraction
and mod).


- */
-RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_on_boundary (
-  void  *the_buffer,
-  Partition_Control *the_partition
-)


The function name is _Partition_Is_buffer_on_boundary().

The brief description is "Checks whether is on a valid buffer boundary 
for the_partition". This sentence is ill formed. If we disregard this, 
the only extra information is "valid". So, maybe rename it to 
_Partition_Is_buffer_on_valid_boundary().


The "This function returns TRUE if the_buffer is on a valid buffer 
boundary for the_partition, and FALSE otherwise." tells you the obvious.


--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 2/3] score: Add CONFIGURE_INIT_TASK_STORAGE_SIZE

2020-11-20 Thread Sebastian Huber


On 20/11/2020 17:35, Gedare Bloom wrote:

+#else /* CONFIGURE_INIT_TASK_STORAGE_SIZE */
+
+#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
+  #define CONFIGURE_INIT_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE
+#endif
+
+#if CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE
+  #define _CONFIGURE_INIT_TASK_STACK_EXTRA \
+( CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE )

In some other places, we emit #error instead of fixing the user's
misconfiguration. Does it make sense to do that here also?

I think the idea is that it is better to make the user do it right
than for us to hide the fix.
There is no configuration error here. If CONFIGURE_INIT_TASK_STACK_SIZE 
is greater than CONFIGURE_MINIMUM_TASK_STACK_SIZE, then this extra stack 
size is automatically added to the stack size estimate.


--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Proposal for hardware configuration dependent performance limits

2020-11-20 Thread Gedare Bloom
On Thu, Nov 19, 2020 at 4:51 PM Chris Johns  wrote:
>
> On 19/11/20 7:26 pm, Sebastian Huber wrote:
> > Hello Chris,
> >
> > On 17/11/2020 22:43, Chris Johns wrote:
> >
> >>
> >> On 17/11/20 6:14 pm, Sebastian Huber wrote:
> >>> On 16/11/2020 23:42, Chris Johns wrote:
>  On 16/11/20 5:40 pm, Sebastian Huber wrote:
> > On 16/11/2020 00:33, Chris Johns wrote:
> >
> > In the proposal, limits are specified like this:
> >
> >
> > limits:
> >sparc/gr712rc:
> >  DirtyCache:
> >max-upper-bound: 0.05
> >mean-upper-bound: 0.05
> >  FullCache:
> >max-upper-bound: 0.05
> >mean-upper-bound: 0.05
> >  HotCache:
> >max-upper-bound: 0.05
> >mean-upper-bound: 0.05
> >  Load/1:
> >max-upper-bound: 0.1
> >mean-upper-bound: 0.1
> >  Load/2:
> >max-upper-bound: 0.1
> >mean-upper-bound: 0.1
> >  Load/3:
> >max-upper-bound: 0.1
> >mean-upper-bound: 0.1
> >  Load/4:
> >max-upper-bound: 0.1
> >mean-upper-bound: 0.1
> >
> > This neglects that the limits are subject to a board configuration. 
> > One
> > approach to cover this is the addition of a new BSP provided 
> > function:
> >
> > const char *rtems_get_hardware_performance_hash();
> >
> > The BSP feeds all performance related data into a hash function and
>  "data" here means configuration?
> >>> Yes, hardware configuration.
> >> Why not make these values part of the BSP configuration? The defaults 
> >> for the
> >> BSP can have a set of suitable values. Different boards have different
> >> configurations to match and a separate kernel build.
> >>
> > This doesn't work on BSPs which support configuration via a hardware
> > enumeration, boot loader settings, or device trees. Also changes in the 
> > BSP
> > options have no influence on the BSP name. Not only BSP configuration
> > influence
> > performance, the CPU options play a role too, for example RTEMS_SMP. In
> > order to
> > compare performance values over time we have to obtain the values under 
> > the
> > same
> > conditions.
>  Maybe I am not understanding the context.
> 
>  A BSP, which ever one, has a set of options that configure it. An 
>  example is
>  the
>  xilinx_zynq_zc702 and the `ZYNQ_RAM_LENGTH = 0x4000`. If I have 2 
>  Zynq
>  circuits one with 256M and one with 1G I need to build and maintain 2 
>  RTEMS
>  builds and from a purists point of view I need to maintain 2 builds of 
>  the
>  exact
>  same application.
> 
>  I asked about the fixed memory and your answer was to use the BSP 
>  options, the
>  size is fixed in the linker command files via the BSP option. That is 
>  what I
>  have done.
> 
>  I would expect there exists a set of values for the xilinx_zynq_zc702 
>  with no
>  SMP and with SMP as this BSP supports SMP. Those values would match all 
>  the
>  other settings for the BSP such as ZYNQ_CLOCK_CPU_1X,
>  BSP_ARM_A9MPCORE_PERIPHCLK
>  etc. If my clock is different (and they are) I would need to supply a 
>  suitable
>  set of performance values if I wanted to pass those tests.
> 
>  I am not questioning the need for the values or the tests. I am 
>  suggesting the
>  values form part of the BSP settings so a user can adjust them to suite 
>  their
>  specific set up in the same way they adjust other BSP settings. I do not 
>  think
>  we should attempt to hold or manage an endless sets of possible values 
>  and I do
>  not see the need for complex encapsulation methods such as a base64 
>  hashes. The
>  systems we interact with are too complex and list is endless.
> >>> I think it will be highly BSP-specific what parameters are relevant to the
> >>> performance limits. This is why I suggested to add a function which can be
> >>> implemented by each BSP.
> >>>
> >>> const char *rtems_get_hardware_performance_something();
> >>>
> >>> It should return a string which changes if a performance relevant 
> >>> parameter
> >>> changed. If it is only SMP/no-SMP, ZYNQ_CLOCK_CPU_1X, and
> >>> BSP_ARM_A9MPCORE_PERIPHCLK, then fine, just return "SMP/800MHz/400MHz" or
> >>> whatever.
> >> I suggest you avoid heading down a path of specific strings, ie avoid 
> >> something
> >> meaningful a human can read. Also performance characteristics are a part 
> >> of a
> >> wider configuration to

Re: [PATCH 12/20] rtems: Move _Partition_Is_buffer_size_aligned()

2020-11-20 Thread Gedare Bloom
On Fri, Nov 20, 2020 at 9:28 AM Sebastian Huber
 wrote:
>
> On 20/11/2020 17:15, Gedare Bloom wrote:
>
> >> +static bool _Partition_Is_buffer_size_aligned( size_t buffer_size )
> > Nit: I never saw this before, but this isn't what "aligned" means.
> > Aligned means you start something at a specific multiple. This is
> > checking if the buffer_size is a multiple of the pointer size. Anyway,
> > it is just used here so it's fine, but maybe just a one-line comment
> > that buffer sizes are required to be a multiple of the pointer size.
> >
> I think in this case we should review the documentation. If the function
> name is irritating, then we should remove it. It is only called in one
> place. So change
>
>if ( !_Partition_Is_buffer_size_aligned( buffer_size ) )
>  return RTEMS_INVALID_SIZE;
>
> to
>
>
>if ( ( buffer_size % CPU_SIZEOF_POINTER ) != 0 )
>  return RTEMS_INVALID_SIZE;
>
that would be fine by me. I'm fairly certain the manual already covers
this requirement.

> --
> embedded brains GmbH
> Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.hu...@embedded-brains.de
> Phone: +49-89-18 94 741 - 16
> Fax:   +49-89-18 94 741 - 08
> PGP: Public key available on request.
>
> embedded brains GmbH
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier: 
> https://embedded-brains.de/datenschutzerklaerung/
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 11/20] rtems: Move _Partition_Is_buffer_on_boundary()

2020-11-20 Thread Gedare Bloom
On Fri, Nov 20, 2020 at 9:38 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:
>
> On 20/11/2020 17:10, Gedare Bloom wrote:
>
> >> -/**
> >> - *  @brief Checks whether is on a valid buffer boundary for
the_partition.
> >> - *
> >> - *  This function returns TRUE if the_buffer is on a valid buffer
> >> - *  boundary for the_partition, and FALSE otherwise.
> > I think keep these two lines. This function is not so clear without
> > thinking through what it means to do pointer arithmetic (subtraction
> > and mod).
> >
> >> - */
> >> -RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_on_boundary (
> >> -  void  *the_buffer,
> >> -  Partition_Control *the_partition
> >> -)
>
> The function name is _Partition_Is_buffer_on_boundary().
>
> The brief description is "Checks whether is on a valid buffer boundary
> for the_partition". This sentence is ill formed. If we disregard this,
> the only extra information is "valid". So, maybe rename it to
> _Partition_Is_buffer_on_valid_boundary().
>
> The "This function returns TRUE if the_buffer is on a valid buffer
> boundary for the_partition, and FALSE otherwise." tells you the obvious.
>

It depends on whether "valid boundary" has a good meaning at this level of
the code. Adding valid to the function name is helpful. Thanks.

Just trying to help you pass those code comment density metrics :'D

> --
> embedded brains GmbH
> Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.hu...@embedded-brains.de
> Phone: +49-89-18 94 741 - 16
> Fax:   +49-89-18 94 741 - 08
> PGP: Public key available on request.
>
> embedded brains GmbH
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 2/3] score: Add CONFIGURE_INIT_TASK_STORAGE_SIZE

2020-11-20 Thread Gedare Bloom
On Fri, Nov 20, 2020 at 9:42 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

>
> On 20/11/2020 17:35, Gedare Bloom wrote:
> >> +#else /* CONFIGURE_INIT_TASK_STORAGE_SIZE */
> >> +
> >> +#ifndef CONFIGURE_INIT_TASK_STACK_SIZE
> >> +  #define CONFIGURE_INIT_TASK_STACK_SIZE
> CONFIGURE_MINIMUM_TASK_STACK_SIZE
> >> +#endif
> >> +
> >> +#if CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE
> >> +  #define _CONFIGURE_INIT_TASK_STACK_EXTRA \
> >> +( CONFIGURE_INIT_TASK_STACK_SIZE -
> CONFIGURE_MINIMUM_TASK_STACK_SIZE )
> > In some other places, we emit #error instead of fixing the user's
> > misconfiguration. Does it make sense to do that here also?
> >
> > I think the idea is that it is better to make the user do it right
> > than for us to hide the fix.
> There is no configuration error here. If CONFIGURE_INIT_TASK_STACK_SIZE
> is greater than CONFIGURE_MINIMUM_TASK_STACK_SIZE, then this extra stack
> size is automatically added to the stack size estimate.
>
>
It is an error to configure an init task stack size smaller than the
minimum.

We can either fix that error for the user, or tell them to fix it
themselves.


> --
> embedded brains GmbH
> Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.hu...@embedded-brains.de
> Phone: +49-89-18 94 741 - 16
> Fax:   +49-89-18 94 741 - 08
> PGP: Public key available on request.
>
> embedded brains GmbH
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 2/3] score: Add CONFIGURE_INIT_TASK_STORAGE_SIZE

2020-11-20 Thread Sebastian Huber


On 20/11/2020 17:51, Gedare Bloom wrote:


>> +#if CONFIGURE_INIT_TASK_STACK_SIZE >
CONFIGURE_MINIMUM_TASK_STACK_SIZE
>> +  #define _CONFIGURE_INIT_TASK_STACK_EXTRA \
>> +    ( CONFIGURE_INIT_TASK_STACK_SIZE -
CONFIGURE_MINIMUM_TASK_STACK_SIZE )
> In some other places, we emit #error instead of fixing the user's
> misconfiguration. Does it make sense to do that here also?
>
> I think the idea is that it is better to make the user do it right
> than for us to hide the fix.
There is no configuration error here. If
CONFIGURE_INIT_TASK_STACK_SIZE
is greater than CONFIGURE_MINIMUM_TASK_STACK_SIZE, then this extra
stack
size is automatically added to the stack size estimate.


It is an error to configure an init task stack size smaller than the 
minimum.


We can either fix that error for the user, or tell them to fix it 
themselves.

Ok, now I got it. I will add a check for this.

--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: 
https://embedded-brains.de/datenschutzerklaerung/

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] rtems: Delete rtems_object_id_api_maximum_class()

2020-11-20 Thread Sebastian Huber
This function has no implementation.  It is documented in the RTEMS
Classic API Guide.
---
 cpukit/include/rtems/rtems/object.h | 17 -
 1 file changed, 17 deletions(-)

diff --git a/cpukit/include/rtems/rtems/object.h 
b/cpukit/include/rtems/rtems/object.h
index 8e8bfbf293..77c13f473f 100644
--- a/cpukit/include/rtems/rtems/object.h
+++ b/cpukit/include/rtems/rtems/object.h
@@ -285,23 +285,6 @@ int rtems_object_api_maximum_class(
   int api
 );
 
-
-/**
- * @brief Get Highest Valid Class Value
- *
- * This method returns the lowest valid value Class for the
- * specified @a api. Each API supports a different number
- * of object classes.
- *
- * @param[in] api is the API to obtain the maximum class of
- *
- * @retval This method returns the least valid value for
- * class number for the specified @a api.
- */
-int rtems_object_id_api_maximum_class(
-  int api
-);
-
 /**
  * @brief Get API Name
  *
-- 
2.26.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] rtems: Delete rtems_object_id_api_maximum_class()

2020-11-20 Thread Joel Sherrill
It should be implemented. File a ticket if you don't want to do it now.

But don't delete it. It should be there for completeness. I would have
thought there was code that iterated over all the APIs and classes and used
it. What is being used instead?

On Fri, Nov 20, 2020 at 11:47 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> This function has no implementation.  It is documented in the RTEMS
> Classic API Guide.
> ---
>  cpukit/include/rtems/rtems/object.h | 17 -
>  1 file changed, 17 deletions(-)
>
> diff --git a/cpukit/include/rtems/rtems/object.h
> b/cpukit/include/rtems/rtems/object.h
> index 8e8bfbf293..77c13f473f 100644
> --- a/cpukit/include/rtems/rtems/object.h
> +++ b/cpukit/include/rtems/rtems/object.h
> @@ -285,23 +285,6 @@ int rtems_object_api_maximum_class(
>int api
>  );
>
> -
> -/**
> - * @brief Get Highest Valid Class Value
> - *
> - * This method returns the lowest valid value Class for the
> - * specified @a api. Each API supports a different number
> - * of object classes.
> - *
> - * @param[in] api is the API to obtain the maximum class of
> - *
> - * @retval This method returns the least valid value for
> - * class number for the specified @a api.
> - */
> -int rtems_object_id_api_maximum_class(
> -  int api
> -);
> -
>  /**
>   * @brief Get API Name
>   *
> --
> 2.26.2
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] rtems: Delete rtems_object_id_api_maximum_class()

2020-11-20 Thread Sebastian Huber

On 20/11/2020 18:56, Joel Sherrill wrote:


It should be implemented. File a ticket if you don't want to do it now.

But don't delete it. It should be there for completeness. I would have 
thought there was code that iterated over all the APIs and classes and 
used it. What is being used instead?


This function was added by

commit 6c06288f6452da96fa630f1482aeaaba5d217531
Author: Joel Sherrill 
Date:   Tue Jan 29 21:52:21 2008 +

    2008-01-29  Joel Sherrill 

    * itron/src/exd_tsk.c, itron/src/task.c, 
libmisc/capture/capture.c,

    libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c,
    libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c,
    libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c,
    libmisc/monitor/mon-symbols.c, posix/src/cancelrun.c,
    posix/src/pthreadexit.c, rtems/Makefile.am, 
rtems/preinstall.am,

    rtems/include/rtems.h, rtems/include/rtems/rtems/support.h,
    rtems/inline/rtems/rtems/tasks.inl, rtems/src/eventmp.c,
    rtems/src/msgmp.c, rtems/src/partmp.c, rtems/src/regionmp.c,
    rtems/src/rtemsobjectgetname.c, rtems/src/semmp.c,
    rtems/src/signalmp.c, rtems/src/taskdelete.c, 
rtems/src/taskmp.c,

    rtems/src/timerserver.c, score/Makefile.am,
    score/include/rtems/score/object.h,
    score/inline/rtems/score/object.inl, score/src/Unlimited.txt,
    score/src/objectgetnameasstring.c,
    score/src/threadqextractwithproxy.c: Add new Object Services
    collection. This changed the name of a few previously 
public but

    undocumented services and added a some new services.
    * rtems/include/rtems/rtems/object.h, rtems/src/rtemsbuildid.c,
    rtems/src/rtemsbuildname.c, 
rtems/src/rtemsobjectapimaximumclass.c,

    rtems/src/rtemsobjectapiminimumclass.c,
    rtems/src/rtemsobjectgetapiclassname.c,
    rtems/src/rtemsobjectgetapiname.c,
    rtems/src/rtemsobjectgetclassicname.c,
    rtems/src/rtemsobjectgetclassinfo.c,
    rtems/src/rtemsobjectidapimaximum.c,
    rtems/src/rtemsobjectidapiminimum.c, 
rtems/src/rtemsobjectidgetapi.c,
    rtems/src/rtemsobjectidgetclass.c, 
rtems/src/rtemsobjectidgetindex.c,
    rtems/src/rtemsobjectidgetnode.c, 
rtems/src/rtemsobjectsetname.c,

    score/src/objectapimaximumclass.c, score/src/objectgetinfo.c,
    score/src/objectgetinfoid.c, score/src/objectsetname.c: New 
files.

    * rtems/src/rtemsidtoname.c: Removed.

Nobody noticed that this function is missing in the last twelve years. 
What is the differences to:


/**
 * @brief Get Highest Valid Class Value
 *
 * This method returns the highest valid value Class for the
 * specified @a api. Each API supports a different number
 * of object classes.
 *
 * @param[in] api is the API to obtain the maximum class of
 *
 * @retval This method returns the greatet valid value for
 * class number for the specified @a api.
 */
int rtems_object_api_maximum_class(
  int api
);

To me the removed function looks like some fragment left over from 
development.




On Fri, Nov 20, 2020 at 11:47 AM Sebastian Huber 
> wrote:


This function has no implementation.  It is documented in the RTEMS
Classic API Guide.
---
 cpukit/include/rtems/rtems/object.h | 17 -
 1 file changed, 17 deletions(-)

diff --git a/cpukit/include/rtems/rtems/object.h
b/cpukit/include/rtems/rtems/object.h
index 8e8bfbf293..77c13f473f 100644
--- a/cpukit/include/rtems/rtems/object.h
+++ b/cpukit/include/rtems/rtems/object.h
@@ -285,23 +285,6 @@ int rtems_object_api_maximum_class(
   int api
 );

-
-/**
- * @brief Get Highest Valid Class Value
- *
- * This method returns the lowest valid value Class for the
- * specified @a api. Each API supports a different number
- * of object classes.
- *
- * @param[in] api is the API to obtain the maximum class of
- *
- * @retval This method returns the least valid value for
- *         class number for the specified @a api.
- */
-int rtems_object_id_api_maximum_class(
-  int api
-);
-
 /**
  * @brief Get API Name
  *
-- 
2.26.2


___
devel mailing list
devel@rtems.org 
http://lists.rtems.org/mailman/listinfo/devel



--
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmusse

Re: [PATCH v2 2/2] libtests/ofw01: Added a test for RTEMS OFW

2020-11-20 Thread Niteesh G. S.
On Fri, Nov 20, 2020 at 2:50 PM Christian Mauderer <
christian.maude...@embedded-brains.de> wrote:

> On a last test before I wanted to push it, I found a problem (sorry). On
> BSPs that rely on a FDT the test doesn't work:
>
No problem :).



> You wrap bsp_fdt_get and return another FDT. So as soon as one driver of
> the BSP needs the original FDT, that driver won't work any more.
>
> I think I remember that problem from the Beagle too. Didn't you have a
> version where you have enabled the wrapper later? If not: I added a
> suggestion below.

Really sorry since it has been a couple of months now I don't exactly
remember what all I tried.

>
> Am 03.11.20 um 19:18 schrieb G S Niteesh Babu:
> > Added a basic test for the implemented RTEMS OFW
> > API.
> > ---
> >   spec/build/testsuites/libtests/grp.yml   |   2 +
> >   spec/build/testsuites/libtests/ofw01.yml |  21 +++
> >   testsuites/libtests/ofw01/init.c | 187 +++
> >   testsuites/libtests/ofw01/ofw01.doc  |  29 
> >   testsuites/libtests/ofw01/ofw01.scn  |   2 +
> >   testsuites/libtests/ofw01/some.c |  72 +
> >   testsuites/libtests/ofw01/some.dts   |  76 +
> >   testsuites/libtests/ofw01/some.h |  15 ++
> >   8 files changed, 404 insertions(+)
> >   create mode 100644 spec/build/testsuites/libtests/ofw01.yml
> >   create mode 100644 testsuites/libtests/ofw01/init.c
> >   create mode 100644 testsuites/libtests/ofw01/ofw01.doc
> >   create mode 100644 testsuites/libtests/ofw01/ofw01.scn
> >   create mode 100644 testsuites/libtests/ofw01/some.c
> >   create mode 100644 testsuites/libtests/ofw01/some.dts
> >   create mode 100644 testsuites/libtests/ofw01/some.h
> >
> > diff --git a/spec/build/testsuites/libtests/grp.yml
> b/spec/build/testsuites/libtests/grp.yml
> > index b9ca014b0d..1aa136854a 100644
> > --- a/spec/build/testsuites/libtests/grp.yml
> > +++ b/spec/build/testsuites/libtests/grp.yml
> > @@ -316,6 +316,8 @@ links:
> > uid: write
> >   - role: build-dependency
> > uid: writev
> > +- role: build-dependency
> > +  uid: ofw01
> >   type: build
> >   use-after:
> >   - rtemstest
> > diff --git a/spec/build/testsuites/libtests/ofw01.yml
> b/spec/build/testsuites/libtests/ofw01.yml
> > new file mode 100644
> > index 00..8517c58bad
> > --- /dev/null
> > +++ b/spec/build/testsuites/libtests/ofw01.yml
> > @@ -0,0 +1,21 @@
> > +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> > +build-type: test-program
> > +cflags: []
> > +copyrights:
> > +- Copyright (C) 2020 Niteesh G S
> > +cppflags: []
> > +cxxflags: []
> > +enabled-by: true
> > +features: c cprogram
> > +includes: []
> > +ldflags:
> > +- -Wl,--wrap=bsp_fdt_get
> > +links: []
> > +source:
> > +- testsuites/libtests/ofw01/init.c
> > +- testsuites/libtests/ofw01/some.c
> > +stlib: []
> > +target: testsuites/libtests/ofw01.exe
> > +type: build
> > +use-after: []
> > +use-before: []
> > diff --git a/testsuites/libtests/ofw01/init.c
> b/testsuites/libtests/ofw01/init.c
> > new file mode 100644
> > index 00..82ee5eb11f
> > --- /dev/null
> > +++ b/testsuites/libtests/ofw01/init.c
> > @@ -0,0 +1,187 @@
> > +/* SPDX-License-Identifier: BSD-2-Clause */
> > +
> > +/*
> > + * Copyright (C) <2020> Niteesh G S 
> > + *
> > + * Redistribution and use in source and binary forms, with or without
> > + * modification, are permitted provided that the following conditions
> > + * are met:
> > + * 1. Redistributions of source code must retain the above copyright
> > + *notice, this list of conditions and the following disclaimer.
> > + * 2. Redistributions in binary form must reproduce the above copyright
> > + *notice, this list of conditions and the following disclaimer in
> the
> > + *documentation and/or other materials provided with the
> distribution.
> > + *
> > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> "AS IS"
> > + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
> TO, THE
> > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE
> > + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
> CONTRIBUTORS BE
> > + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> > + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> BUSINESS
> > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
> IN
> > + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
> OTHERWISE)
> > + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
> OF THE
> > + * POSSIBILITY OF SUCH DAMAGE.
> > + */
> > +
> > +#ifdef HAVE_CONFIG_H
> > +#include "config.h"
> > +#endif
> > +
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +
> > +#include "some.h"
> > +
> > +#define BUF_SIZE 100
> > +
> > +const char rtems_test_name[] = "OFW 

RE: [PATCH 5/8] libtest: Allow assert checks during test begin

2020-11-20 Thread Kinsey Moore
-Original Message-
From: devel  On Behalf Of Sebastian Huber
Sent: Friday, November 13, 2020 04:08
To: devel@rtems.org
Subject: [PATCH 5/8] libtest: Allow assert checks during test begin

> Allow assert checks in test begin actions and setup fixture methods.
> ---
>  cpukit/include/rtems/test.h |  2 +-
>  cpukit/libtest/t-test.c | 29 +
>  2 files changed, 18 insertions(+), 13 deletions(-)

This patch appears to have broken ttest01.exe for arm/xilinx-zynq as well as 
aarch64 targets. I suspect it has also broken other arm targets. I tried 
looking into the failure, but I'm unfamiliar with the test framework in use.

Test output from arm/xilinx-zynq:
$ qemu-system-arm -no-reboot -nographic -serial null -serial mon:stdio -machine 
xilinx-zynq-a9 -m 4096 -kernel 
build/arm/xilinx_zynq_a9_qemu/testsuites/libtests/ttest01.exe


*** BEGIN OF TEST TTEST 1 ***
*** TEST VERSION: 6.0.0.46bf926570503dec3d70a8f09d12e461fd7e0914
*** TEST STATE: EXPECTED_PASS
*** TEST BUILD:
*** TEST TOOLS: 10.2.1 20200918 (RTEMS 6, RSB 
748525234945de047196f9974b866f8595efd66e, Newlib 749cbcc)
A:ttest01
S:Platform:RTEMS
S:Compiler:*
S:Version:*
S:BSP:*
S:RTEMS_DEBUG:*
S:RTEMS_MULTIPROCESSING:*
S:RTEMS_POSIX_API:*
S:RTEMS_PROFILING:*
S:RTEMS_SMP:*
B:zalloc_auto
P:0:0:UI1:test-malloc.c:35
P:1:0:UI1:test-malloc.c:36
P:2:0:UI1:test-malloc.c:26
E:zalloc_auto:N:3:F:0:D:0.001000
B:wrong_step
P:0:0:UI1:test-plan.c:6
F:1:0:UI1:test-plan.c:7:planned step (2)
E:wrong_step:N:2:F:1:D:0.001000
B:verbosity_changes
F:3:0:UI1:test-verbosity.c:12:normal: check fails -> with output
P:4:0:UI1:test-verbosity.c:14
F:5:0:UI1:test-verbosity.c:15:verbose: check fails -> with output
E:verbosity_changes:N:6:F:3:D:0.001000
B:timer
P:0:0:UI1:test-rtems.c:26
P:1:0:UI1:test-rtems.c:29
P:2:0:UI1:test-rtems.c:39
P:3:0:ISR:test-rtems.c:14
P:4:0:ISR:test-rtems.c:15
P:5:0:UI1:test-rtems.c:44
P:6:0:UI1:test-rtems.c:45
P:7:0:UI1:test-rtems.c:48
E:timer:N:8:F:0:D:0.001000
B:time_to_string
P:0:0:UI1:test-time.c:11
P:1:0:UI1:test-time.c:12
P:2:0:UI1:test-time.c:13
P:3:0:UI1:test-time.c:14
P:4:0:UI1:test-time.c:17
P:5:0:UI1:test-time.c:18
E:time_to_string:N:6:F:0:D:0.001000
B:time
P:0:0:UI1:test-time.c:55
P:1:0:UI1:test-time.c:56
P:2:0:UI1:test-time.c:57
P:3:0:UI1:test-time.c:58
P:4:0:UI1:test-time.c:61
P:5:0:UI1:test-time.c:63
P:6:0:UI1:test-time.c:64
P:7:0:UI1:test-time.c:67
P:8:0:UI1:test-time.c:69
P:9:0:UI1:test-time.c:70
P:10:0:UI1:test-time.c:73
P:11:0:UI1:test-time.c:75
P:12:0:UI1:test-time.c:76
P:13:0:UI1:test-time.c:79
P:14:0:UI1:test-time.c:81
P:15:0:UI1:test-time.c:82
P:16:0:UI1:test-time.c:85
P:17:0:UI1:test-time.c:87
P:18:0:UI1:test-time.c:88
P:19:0:UI1:test-time.c:91
P:20:0:UI1:test-time.c:93
P:21:0:UI1:test-time.c:94
P:22:0:UI1:test-time.c:97
P:23:0:UI1:test-time.c:99
P:24:0:UI1:test-time.c:100
P:25:0:UI1:test-time.c:103
P:26:0:UI1:test-time.c:105
P:27:0:UI1:test-time.c:106
P:28:0:UI1:test-time.c:109
P:29:0:UI1:test-time.c:111
P:30:0:UI1:test-time.c:112
P:31:0:UI1:test-time.c:115
P:32:0:UI1:test-time.c:117
P:33:0:UI1:test-time.c:118
P:34:0:UI1:test-time.c:121
P:35:0:UI1:test-time.c:123
P:36:0:UI1:test-time.c:124
P:37:0:UI1:test-time.c:127
P:38:0:UI1:test-time.c:129
P:39:0:UI1:test-time.c:130
E:time:N:40:F:0:D:0.001000
B:ticks
P:0:0:UI1:test-time.c:147
P:1:0:UI1:test-time.c:151
P:2:0:UI1:test-time.c:152
P:3:0:UI1:test-time.c:172
P:4:0:UI1:test-time.c:173
P:5:0:UI1:test-time.c:174
P:6:0:UI1:test-time.c:175
E:ticks:N:7:F:0:D:0.001000
B:tick
P:0:0:UI1:test-time.c:44
E:tick:N:1:F:0:D:0.001000
B:test_psx_success
P:0:0:UI1:test-psx.c:31
F:1:0:UI1:test-psx.c:32:-1 == 0, 0
F:*:0:UI1:test-psx.c:34:-1 == 0, 0
P:2:0:UI1:test-psx.c:35
F:3:0:UI1:test-psx.c:36:-1 == 0, 0
E:
*** FATAL ***
fatal source: 9 (RTEMS_FATAL_SOURCE_EXCEPTION)

R0   = 0xfff8 R8  = 0x
R1   = 0x0030 R9  = 0x00116d79
R2   = 0x00207798 R10 = 0x0002
R3   = 0x0001 R11 = 0x00204378
R4   = 0x R12 = 0x
R5   = 0xffecb9a8 SP  = 0x00207700
R6   = 0x0030 LR  = 0x001108b3
R7   = 0x0013465a PC  = 0x00119f6c
CPSR = 0x600f0173 VEC = 0x0004
FPEXC = 0x4000
FPSCR = 0x
D00 = 0x
D01 = 0x
D02 = 0x
D03 = 0x
D04 = 0x
D05 = 0x
D06 = 0x
D07 = 0x
D08 = 0x
D09 = 0x
D10 = 0x
D11 = 0x
D12 = 0x
D13 = 0x
D14 = 0x
D15 = 0x
D16 = 0x
D17 = 0x
D18 = 0x
D19 = 0x
D20 = 0x
D21 = 0x
D22 = 0x
D23 = 0x
D24 = 0x
D25 = 0x
D26 = 0x
D27 = 0x
D28 = 0x
D29 = 0x
D30 = 0x
D31 = 0x
RTEMS version: 6.0.0.46bf926570503dec3d70a8f09d12e461fd7e0914
RTEMS tools:

RSB error in MSYS2 MinGW

2020-11-20 Thread jameszxj
Hi,
    I built arm compiler with "../source-builder/sb-set-builder 
--dry-run --with-download 6/rtems-arm", and got the errors:


config: tools/rtems-gdb-head.cfg
error: shell macro failed: sh -c "/mingw64/bin/python2-config --ldflags | awk 
'BEGIN{FS=\" \"}/python/{for(i=1;i<>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel