[PATCH] spextensions01: Fix assertion

2022-07-12 Thread Sebastian Huber
Commit 80090639a62b50d7d66614ca789e4592924a06e5 altered the system state
change.  Account for this in assert_allocator_protected_thread_context().
---
 testsuites/sptests/spextensions01/init.c | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/testsuites/sptests/spextensions01/init.c 
b/testsuites/sptests/spextensions01/init.c
index 66e8fac260..ceae2d3062 100644
--- a/testsuites/sptests/spextensions01/init.c
+++ b/testsuites/sptests/spextensions01/init.c
@@ -30,6 +30,11 @@ static int active_extensions = 2;
 
 static rtems_id master_task;
 
+static bool before_initialization(void)
+{
+  return _System_state_Is_before_initialization(_System_state_Get());
+}
+
 static bool before_multitasking(void)
 {
   return _System_state_Is_before_multitasking(_System_state_Get());
@@ -61,9 +66,13 @@ static void assert_life_protected_thread_context(void)
 
 static void assert_allocator_protected_thread_context(void)
 {
-  assert(_Thread_Dispatch_is_enabled() || before_multitasking());
+  assert(
+_Thread_Dispatch_is_enabled() ||
+before_initialization() ||
+before_multitasking()
+  );
   assert(_RTEMS_Allocator_is_owner());
-  assert(life_protected() || before_multitasking());
+  assert(life_protected());
 }
 
 static void assert_thread_dispatch_disabled_context(void)
-- 
2.35.3

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


Re: Time to promote lwip git repo

2022-07-12 Thread Chris Johns
On 13/7/2022 10:08 am, Joel Sherrill wrote:
> Vijay and Kinsey have made great progress in addressing the issues that were
> raised about the lwip tcpip stack that needed to be addressed before it became
> an official top level repository. Thanks to both of them.

Well done. Great effort.

> I think it's time to promote the repo. Hopefully just a couple of core
> developers agreeing is sufficient to get this moving.

I support this happening. It is great to see this networking option for small
devices become available.

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


Re: [PATCH rtems-lwip v1 0/9] Bring in devel patches and add ZynqMP

2022-07-12 Thread Vijay Kumar Banerjee
Hi,


On Fri, Jul 1, 2022 at 9:20 PM Vijay Kumar Banerjee  wrote:
>
> On Fri, Jul 1, 2022 at 8:19 PM Kinsey Moore  wrote:
> >
> > On 7/1/2022 18:50, Vijay Kumar Banerjee wrote:
> >
> > On Fri, Jul 1, 2022 at 5:49 PM Vijay Kumar Banerjee  wrote:
> >
> > Hi Kinsey,
> >
> > This patchset is looking great. Thank you!
> > Unfortunately, I won't be able to test the BBB right away but I see
> > that most patches are probably from the devel branch of lwip, which I
> >
> > correction: most of BBB related changes. :)
> >
> > It should actually be all of the BBB related changes, I just squashed some 
> > of them together since I was doing a pretty heavy rework anyway.
>
> Makes sense.
> >
> >
> > You mentioned on Discord that a couple of the patches didn't make it 
> > through. You can find the entire patch set on top of main here:
> >
> > https://github.com/KinseyMoore/rtems-lwip

I pushed the latest patches from this repository.


Thanks for the patches.

Best,
Vijay
>
> Thanks for posting the repo link.
>
>
> Best regards,
> Vijay
> >
> > Kinsey
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Time to promote lwip git repo

2022-07-12 Thread Joel Sherrill
Hi

Vijay and Kinsey have made great progress in addressing the issues that
were raised about the lwip tcpip stack that needed to be addressed before
it became an official top level repository. Thanks to both of them.

I think it's time to promote the repo. Hopefully just a couple of core
developers agreeing is sufficient to get this moving.

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

[PATCH] validation: SMP-specific spurious interrupt test

2022-07-12 Thread Sebastian Huber
Update #3716.
---
 .../validation/tc-bsp-interrupt-spurious.c| 148 +++---
 1 file changed, 125 insertions(+), 23 deletions(-)

diff --git a/testsuites/validation/tc-bsp-interrupt-spurious.c 
b/testsuites/validation/tc-bsp-interrupt-spurious.c
index 0cb14f8f1a..f5e992a51d 100644
--- a/testsuites/validation/tc-bsp-interrupt-spurious.c
+++ b/testsuites/validation/tc-bsp-interrupt-spurious.c
@@ -74,6 +74,12 @@ typedef enum {
   BspReqInterruptSpurious_Pre_First_NA
 } BspReqInterruptSpurious_Pre_First;
 
+typedef enum {
+  BspReqInterruptSpurious_Pre_FirstAgain_Null,
+  BspReqInterruptSpurious_Pre_FirstAgain_Entry,
+  BspReqInterruptSpurious_Pre_FirstAgain_NA
+} BspReqInterruptSpurious_Pre_FirstAgain;
+
 typedef enum {
   BspReqInterruptSpurious_Post_Result_FatalError,
   BspReqInterruptSpurious_Post_Result_Dispatch,
@@ -93,6 +99,7 @@ typedef enum {
 typedef struct {
   uint8_t Skip : 1;
   uint8_t Pre_First_NA : 1;
+  uint8_t Pre_FirstAgain_NA : 1;
   uint8_t Post_Result : 2;
   uint8_t Post_FatalSource : 1;
   uint8_t Post_FatalCode : 1;
@@ -153,11 +160,23 @@ typedef struct {
*/
   rtems_interrupt_entry **first;
 
+  /**
+   * @brief This member references an interrupt entry for the first entry of
+   *   the interrupt vector or is NULL.
+   */
+  rtems_interrupt_entry *first_again;
+
   struct {
+/**
+ * @brief This member defines the pre-condition indices for the next
+ *   action.
+ */
+size_t pci[ 2 ];
+
 /**
  * @brief This member defines the pre-condition states for the next action.
  */
-size_t pcs[ 1 ];
+size_t pcs[ 2 ];
 
 /**
  * @brief If this member is true, then the test action loop is executed.
@@ -191,8 +210,15 @@ static const char * const 
BspReqInterruptSpurious_PreDesc_First[] = {
   "NA"
 };
 
+static const char * const BspReqInterruptSpurious_PreDesc_FirstAgain[] = {
+  "Null",
+  "Entry",
+  "NA"
+};
+
 static const char * const * const BspReqInterruptSpurious_PreDesc[] = {
   BspReqInterruptSpurious_PreDesc_First,
+  BspReqInterruptSpurious_PreDesc_FirstAgain,
   NULL
 };
 
@@ -271,8 +297,9 @@ static void BspReqInterruptSpurious_Pre_First_Prepare(
   switch ( state ) {
 case BspReqInterruptSpurious_Pre_First_Null: {
   /*
-   * While the pointer to the first interrupt entry of the interrupt vector
-   * specified by the ``vector`` parameter is equal to NULL.
+   * While the first loaded value of the pointer to the first interrupt
+   * entry of the interrupt vector specified by the ``vector`` parameter is
+   * equal to NULL.
*/
   *ctx->first = NULL;
   break;
@@ -280,9 +307,9 @@ static void BspReqInterruptSpurious_Pre_First_Prepare(
 
 case BspReqInterruptSpurious_Pre_First_Entry: {
   /*
-   * While the pointer to the first interrupt entry of the interrupt vector
-   * specified by the ``vector`` parameter references an object of type
-   * rtems_interrupt_entry.
+   * While the first loaded value of the pointer to the first interrupt
+   * entry of the interrupt vector specified by the ``vector`` parameter
+   * references an object of type rtems_interrupt_entry.
*/
   *ctx->first = &ctx->entry;
   break;
@@ -293,6 +320,37 @@ static void BspReqInterruptSpurious_Pre_First_Prepare(
   }
 }
 
+static void BspReqInterruptSpurious_Pre_FirstAgain_Prepare(
+  BspReqInterruptSpurious_Context   *ctx,
+  BspReqInterruptSpurious_Pre_FirstAgain state
+)
+{
+  switch ( state ) {
+case BspReqInterruptSpurious_Pre_FirstAgain_Null: {
+  /*
+   * While the second loaded value of the pointer to the first interrupt
+   * entry of the interrupt vector specified by the ``vector`` parameter is
+   * equal to NULL.
+   */
+  ctx->first_again = NULL;
+  break;
+}
+
+case BspReqInterruptSpurious_Pre_FirstAgain_Entry: {
+  /*
+   * While the second loaded value of the pointer to the first interrupt
+   * entry of the interrupt vector specified by the ``vector`` parameter
+   * references an object of type rtems_interrupt_entry.
+   */
+  ctx->first_again = &ctx->entry;
+  break;
+}
+
+case BspReqInterruptSpurious_Pre_FirstAgain_NA:
+  break;
+  }
+}
+
 static void BspReqInterruptSpurious_Post_Result_Check(
   BspReqInterruptSpurious_Context*ctx,
   BspReqInterruptSpurious_Post_Result state
@@ -416,39 +474,62 @@ static void BspReqInterruptSpurious_Action(
   BspReqInterruptSpurious_Context *ctx
 )
 {
-  rtems_status_code sc;
-
   ctx->interrupt_occurred = false;
   ctx->entry_counter = 0;
   ctx->fatal_counter = 0;
   ctx->fatal_source = RTEMS_FATAL_SOURCE_LAST;
   ctx->fatal_code = UINT32_MAX;
 
-  (void) rtems_interrupt_vector_enable( ctx->test_vector );
+  #if defined(RTEMS_SMP)
+  if ( *ctx->first == NULL && ctx->first_again != NULL ) {
+*ctx->first = ctx->first_again;
+bsp_interrupt_spurious( ctx->test_vector );
+  } else
+  #endif
+  {
+rtems_status

Re: [PATCH v3 0/5] *** New GPIO API and implementation for STM32F4 BSP ***

2022-07-12 Thread Duc Doan
Hello,

This blog of mine describes the API and shows how to use/implement the
API for a BSP/driver:
https://medium.com/@dtbpkmte/gsoc-2022-rtems-coding-period-week-4-gpio-wiki-1f10e5c4458

Thank you,

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