Re: [PATCH rtems-libbsd v2] aarch64/nexus: add GEM definitions for Versal

2021-06-25 Thread Gedare Bloom
I pushed this v2, thanks Joel.

On Fri, Jun 25, 2021 at 1:04 PM Gedare Bloom  wrote:
>
> ---
>  rtemsbsd/include/bsp/nexus-devices.h   |  7 +++
>  rtemsbsd/include/machine/rtems-bsd-nexus-bus.h | 11 +++
>  2 files changed, 18 insertions(+)
>
> diff --git a/rtemsbsd/include/bsp/nexus-devices.h 
> b/rtemsbsd/include/bsp/nexus-devices.h
> index efe4fcb4..e6487470 100644
> --- a/rtemsbsd/include/bsp/nexus-devices.h
> +++ b/rtemsbsd/include/bsp/nexus-devices.h
> @@ -115,6 +115,13 @@ RTEMS_BSD_DRIVER_E1000PHY;
>  RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM0(ZYNQMP_IRQ_ETHERNET_0);
>  RTEMS_BSD_DRIVER_E1000PHY;
>
> +#elif defined(LIBBSP_AARCH64_XILINX_VERSAL_BSP_H)
> +
> +#include 
> +
> +RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(VERSAL_IRQ_ETHERNET_0);
> +RTEMS_BSD_DRIVER_E1000PHY;
> +
>  #elif defined(LIBBSP_ARM_ATSAM_BSP_H)
>
>  RTEMS_BSD_DRIVER_USB;
> diff --git a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h 
> b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> index 5902c58c..50a43873 100644
> --- a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> +++ b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> @@ -409,6 +409,17 @@ extern "C" {
>#define RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(_irq)   \
>  RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(3, 0xff0e, _irq)
>  #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3 */
> +/*
> + * Versal has a similar GEM as the CGEM. This should work for now.
> + */
> +#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0)
> +  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(_irq)\
> +RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(0, 0xff0c, _irq)
> +#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0 */
> +#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1)
> +  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1(_irq)   \
> +RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(1, 0xff0d, _irq)
> +#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1 */
>
>  /*
>   * Designware/Synopsys Ethernet MAC Controller.
> --
> 2.25.1
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH rtems-libbsd] aarch64/nexus: add GEM definitions for Versal

2021-06-25 Thread Gedare Bloom
On Fri, Jun 25, 2021 at 1:02 PM Joel Sherrill  wrote:
>
> Congratulations! Did you already push a tester configuration for qemu?
>
Yes, the libbsd tests work alright with the default configuration I
pushed for xilinx_versal_lp64_qemu.ini already

> I'm ok with the patches getting pushed.
>
> On Fri, Jun 25, 2021, 1:55 PM Gedare Bloom  wrote:
>>
>> With this patch, libbsd networking is functional with
>> qemu-system-aarch64   -no-reboot -nographic -M xlnx-versal-virt -m
>> 4096 -serial none -serial mon:stdio -net nic -kernel init.exe
>>
>> From what I gather, qemu is using the Cadence GEM for the
>> xlnx-versal-virt, although the real hw uses a slightly different GEM
>> IP.
>>
>> Passed:31
>> Failed: 3
>> User Input:19
>> Expected Fail:  0
>> Indeterminate:  0
>> Benchmark:  0
>> Timeout:2
>> Test too long:  0
>> Invalid:0
>> Wrong Version:  0
>> Wrong Build:0
>> Wrong Tools:0
>> -
>> Total: 55
>> Failures:
>>  ping01.exe
>>  pf01.exe
>>  commands01.exe
>>
>> commands01.exe works manually.
>>
>> I also confirmed with a telnet application that I can open a remote
>> connection to the simulated target.
>>
>> On Fri, Jun 25, 2021 at 12:45 PM Gedare Bloom  wrote:
>> >
>> > ---
>> >  rtemsbsd/include/bsp/nexus-devices.h   |  7 +++
>> >  rtemsbsd/include/machine/rtems-bsd-nexus-bus.h | 11 +++
>> >  2 files changed, 18 insertions(+)
>> >
>> > diff --git a/rtemsbsd/include/bsp/nexus-devices.h 
>> > b/rtemsbsd/include/bsp/nexus-devices.h
>> > index efe4fcb4..e6487470 100644
>> > --- a/rtemsbsd/include/bsp/nexus-devices.h
>> > +++ b/rtemsbsd/include/bsp/nexus-devices.h
>> > @@ -115,6 +115,13 @@ RTEMS_BSD_DRIVER_E1000PHY;
>> >  RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM0(ZYNQMP_IRQ_ETHERNET_0);
>> >  RTEMS_BSD_DRIVER_E1000PHY;
>> >
>> > +#elif defined(LIBBSP_AARCH64_XILINX_VERSAL_BSP_H)
>> > +
>> > +#include 
>> > +
>> > +RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(VERSAL_IRQ_ETHERNET_0);
>> > +RTEMS_BSD_DRIVER_E1000PHY;
>> > +
>> >  #elif defined(LIBBSP_ARM_ATSAM_BSP_H)
>> >
>> >  RTEMS_BSD_DRIVER_USB;
>> > diff --git a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h 
>> > b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
>> > index 5902c58c..2c013ef3 100644
>> > --- a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
>> > +++ b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
>> > @@ -409,6 +409,17 @@ extern "C" {
>> >#define RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(_irq)   \
>> >  RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(3, 0xff0e, _irq)
>> >  #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3 */
>> > +/*
>> > + * Versal has a similar GEM as the CGEM. This should work for now.
>> > + */
>> > +#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0)
>> > +  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(_irq)\
>> > +RTEMS_BSD_DRIVER_XILINX_ZYNQ_GEM(0, 0xff0c, _irq)
>> > +#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0 */
>> > +#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1)
>> > +  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1(_irq)   \
>> > +RTEMS_BSD_DRIVER_XILINX_ZYNQ_GEM(1, 0xff0d, _irq)
>> > +#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1 */
>> >
>> >  /*
>> >   * Designware/Synopsys Ethernet MAC Controller.
>> > --
>> > 2.25.1
>> >
>> ___
>> 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 rtems-libbsd v2] aarch64/nexus: add GEM definitions for Versal

2021-06-25 Thread Gedare Bloom
---
 rtemsbsd/include/bsp/nexus-devices.h   |  7 +++
 rtemsbsd/include/machine/rtems-bsd-nexus-bus.h | 11 +++
 2 files changed, 18 insertions(+)

diff --git a/rtemsbsd/include/bsp/nexus-devices.h 
b/rtemsbsd/include/bsp/nexus-devices.h
index efe4fcb4..e6487470 100644
--- a/rtemsbsd/include/bsp/nexus-devices.h
+++ b/rtemsbsd/include/bsp/nexus-devices.h
@@ -115,6 +115,13 @@ RTEMS_BSD_DRIVER_E1000PHY;
 RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM0(ZYNQMP_IRQ_ETHERNET_0);
 RTEMS_BSD_DRIVER_E1000PHY;
 
+#elif defined(LIBBSP_AARCH64_XILINX_VERSAL_BSP_H)
+
+#include 
+
+RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(VERSAL_IRQ_ETHERNET_0);
+RTEMS_BSD_DRIVER_E1000PHY;
+
 #elif defined(LIBBSP_ARM_ATSAM_BSP_H)
 
 RTEMS_BSD_DRIVER_USB;
diff --git a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h 
b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
index 5902c58c..50a43873 100644
--- a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
+++ b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
@@ -409,6 +409,17 @@ extern "C" {
   #define RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(_irq)   \
 RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(3, 0xff0e, _irq)
 #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3 */
+/*
+ * Versal has a similar GEM as the CGEM. This should work for now.
+ */
+#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0)
+  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(_irq)\
+RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(0, 0xff0c, _irq)
+#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0 */
+#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1)
+  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1(_irq)   \
+RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(1, 0xff0d, _irq)
+#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1 */
 
 /*
  * Designware/Synopsys Ethernet MAC Controller.
-- 
2.25.1

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


Re: [PATCH rtems-libbsd] aarch64/nexus: add GEM definitions for Versal

2021-06-25 Thread Gedare Bloom
On Fri, Jun 25, 2021 at 12:55 PM Gedare Bloom  wrote:
>
> With this patch, libbsd networking is functional with
> qemu-system-aarch64   -no-reboot -nographic -M xlnx-versal-virt -m
> 4096 -serial none -serial mon:stdio -net nic -kernel init.exe
>
> From what I gather, qemu is using the Cadence GEM for the
> xlnx-versal-virt, although the real hw uses a slightly different GEM
> IP.
>
> Passed:31
> Failed: 3
> User Input:19
> Expected Fail:  0
> Indeterminate:  0
> Benchmark:  0
> Timeout:2
> Test too long:  0
> Invalid:0
> Wrong Version:  0
> Wrong Build:0
> Wrong Tools:0
> -
> Total: 55
> Failures:
>  ping01.exe
>  pf01.exe
>  commands01.exe
>
> commands01.exe works manually.
>
> I also confirmed with a telnet application that I can open a remote
> connection to the simulated target.
>
> On Fri, Jun 25, 2021 at 12:45 PM Gedare Bloom  wrote:
> >
> > ---
> >  rtemsbsd/include/bsp/nexus-devices.h   |  7 +++
> >  rtemsbsd/include/machine/rtems-bsd-nexus-bus.h | 11 +++
> >  2 files changed, 18 insertions(+)
> >
> > diff --git a/rtemsbsd/include/bsp/nexus-devices.h 
> > b/rtemsbsd/include/bsp/nexus-devices.h
> > index efe4fcb4..e6487470 100644
> > --- a/rtemsbsd/include/bsp/nexus-devices.h
> > +++ b/rtemsbsd/include/bsp/nexus-devices.h
> > @@ -115,6 +115,13 @@ RTEMS_BSD_DRIVER_E1000PHY;
> >  RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM0(ZYNQMP_IRQ_ETHERNET_0);
> >  RTEMS_BSD_DRIVER_E1000PHY;
> >
> > +#elif defined(LIBBSP_AARCH64_XILINX_VERSAL_BSP_H)
> > +
> > +#include 
> > +
> > +RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(VERSAL_IRQ_ETHERNET_0);
> > +RTEMS_BSD_DRIVER_E1000PHY;
> > +
> >  #elif defined(LIBBSP_ARM_ATSAM_BSP_H)
> >
> >  RTEMS_BSD_DRIVER_USB;
> > diff --git a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h 
> > b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> > index 5902c58c..2c013ef3 100644
> > --- a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> > +++ b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> > @@ -409,6 +409,17 @@ extern "C" {
> >#define RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(_irq)   \
> >  RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(3, 0xff0e, _irq)
> >  #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3 */
> > +/*
> > + * Versal has a similar GEM as the CGEM. This should work for now.
> > + */
> > +#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0)
> > +  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(_irq)\
> > +RTEMS_BSD_DRIVER_XILINX_ZYNQ_GEM(0, 0xff0c, _irq)

typo here, should be CGEM. The macro in a header didn't cause an error
during compilation.

> > +#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0 */
> > +#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1)
> > +  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1(_irq)   \
> > +RTEMS_BSD_DRIVER_XILINX_ZYNQ_GEM(1, 0xff0d, _irq)
> > +#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1 */
> >
> >  /*
> >   * Designware/Synopsys Ethernet MAC Controller.
> > --
> > 2.25.1
> >
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH rtems-libbsd] aarch64/nexus: add GEM definitions for Versal

2021-06-25 Thread Joel Sherrill
Congratulations! Did you already push a tester configuration for qemu?

I'm ok with the patches getting pushed.

On Fri, Jun 25, 2021, 1:55 PM Gedare Bloom  wrote:

> With this patch, libbsd networking is functional with
> qemu-system-aarch64   -no-reboot -nographic -M xlnx-versal-virt -m
> 4096 -serial none -serial mon:stdio -net nic -kernel init.exe
>
> From what I gather, qemu is using the Cadence GEM for the
> xlnx-versal-virt, although the real hw uses a slightly different GEM
> IP.
>
> Passed:31
> Failed: 3
> User Input:19
> Expected Fail:  0
> Indeterminate:  0
> Benchmark:  0
> Timeout:2
> Test too long:  0
> Invalid:0
> Wrong Version:  0
> Wrong Build:0
> Wrong Tools:0
> -
> Total: 55
> Failures:
>  ping01.exe
>  pf01.exe
>  commands01.exe
>
> commands01.exe works manually.
>
> I also confirmed with a telnet application that I can open a remote
> connection to the simulated target.
>
> On Fri, Jun 25, 2021 at 12:45 PM Gedare Bloom  wrote:
> >
> > ---
> >  rtemsbsd/include/bsp/nexus-devices.h   |  7 +++
> >  rtemsbsd/include/machine/rtems-bsd-nexus-bus.h | 11 +++
> >  2 files changed, 18 insertions(+)
> >
> > diff --git a/rtemsbsd/include/bsp/nexus-devices.h
> b/rtemsbsd/include/bsp/nexus-devices.h
> > index efe4fcb4..e6487470 100644
> > --- a/rtemsbsd/include/bsp/nexus-devices.h
> > +++ b/rtemsbsd/include/bsp/nexus-devices.h
> > @@ -115,6 +115,13 @@ RTEMS_BSD_DRIVER_E1000PHY;
> >  RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM0(ZYNQMP_IRQ_ETHERNET_0);
> >  RTEMS_BSD_DRIVER_E1000PHY;
> >
> > +#elif defined(LIBBSP_AARCH64_XILINX_VERSAL_BSP_H)
> > +
> > +#include 
> > +
> > +RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(VERSAL_IRQ_ETHERNET_0);
> > +RTEMS_BSD_DRIVER_E1000PHY;
> > +
> >  #elif defined(LIBBSP_ARM_ATSAM_BSP_H)
> >
> >  RTEMS_BSD_DRIVER_USB;
> > diff --git a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> > index 5902c58c..2c013ef3 100644
> > --- a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> > +++ b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> > @@ -409,6 +409,17 @@ extern "C" {
> >#define RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(_irq)   \
> >  RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(3, 0xff0e, _irq)
> >  #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3 */
> > +/*
> > + * Versal has a similar GEM as the CGEM. This should work for now.
> > + */
> > +#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0)
> > +  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(_irq)\
> > +RTEMS_BSD_DRIVER_XILINX_ZYNQ_GEM(0, 0xff0c, _irq)
> > +#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0 */
> > +#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1)
> > +  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1(_irq)   \
> > +RTEMS_BSD_DRIVER_XILINX_ZYNQ_GEM(1, 0xff0d, _irq)
> > +#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1 */
> >
> >  /*
> >   * Designware/Synopsys Ethernet MAC Controller.
> > --
> > 2.25.1
> >
> ___
> 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-libbsd] aarch64/nexus: add GEM definitions for Versal

2021-06-25 Thread Gedare Bloom
With this patch, libbsd networking is functional with
qemu-system-aarch64   -no-reboot -nographic -M xlnx-versal-virt -m
4096 -serial none -serial mon:stdio -net nic -kernel init.exe

>From what I gather, qemu is using the Cadence GEM for the
xlnx-versal-virt, although the real hw uses a slightly different GEM
IP.

Passed:31
Failed: 3
User Input:19
Expected Fail:  0
Indeterminate:  0
Benchmark:  0
Timeout:2
Test too long:  0
Invalid:0
Wrong Version:  0
Wrong Build:0
Wrong Tools:0
-
Total: 55
Failures:
 ping01.exe
 pf01.exe
 commands01.exe

commands01.exe works manually.

I also confirmed with a telnet application that I can open a remote
connection to the simulated target.

On Fri, Jun 25, 2021 at 12:45 PM Gedare Bloom  wrote:
>
> ---
>  rtemsbsd/include/bsp/nexus-devices.h   |  7 +++
>  rtemsbsd/include/machine/rtems-bsd-nexus-bus.h | 11 +++
>  2 files changed, 18 insertions(+)
>
> diff --git a/rtemsbsd/include/bsp/nexus-devices.h 
> b/rtemsbsd/include/bsp/nexus-devices.h
> index efe4fcb4..e6487470 100644
> --- a/rtemsbsd/include/bsp/nexus-devices.h
> +++ b/rtemsbsd/include/bsp/nexus-devices.h
> @@ -115,6 +115,13 @@ RTEMS_BSD_DRIVER_E1000PHY;
>  RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM0(ZYNQMP_IRQ_ETHERNET_0);
>  RTEMS_BSD_DRIVER_E1000PHY;
>
> +#elif defined(LIBBSP_AARCH64_XILINX_VERSAL_BSP_H)
> +
> +#include 
> +
> +RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(VERSAL_IRQ_ETHERNET_0);
> +RTEMS_BSD_DRIVER_E1000PHY;
> +
>  #elif defined(LIBBSP_ARM_ATSAM_BSP_H)
>
>  RTEMS_BSD_DRIVER_USB;
> diff --git a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h 
> b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> index 5902c58c..2c013ef3 100644
> --- a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> +++ b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> @@ -409,6 +409,17 @@ extern "C" {
>#define RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(_irq)   \
>  RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(3, 0xff0e, _irq)
>  #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3 */
> +/*
> + * Versal has a similar GEM as the CGEM. This should work for now.
> + */
> +#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0)
> +  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(_irq)\
> +RTEMS_BSD_DRIVER_XILINX_ZYNQ_GEM(0, 0xff0c, _irq)
> +#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0 */
> +#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1)
> +  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1(_irq)   \
> +RTEMS_BSD_DRIVER_XILINX_ZYNQ_GEM(1, 0xff0d, _irq)
> +#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1 */
>
>  /*
>   * Designware/Synopsys Ethernet MAC Controller.
> --
> 2.25.1
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH rtems-libbsd] aarch64/nexus: add GEM definitions for Versal

2021-06-25 Thread Gedare Bloom
---
 rtemsbsd/include/bsp/nexus-devices.h   |  7 +++
 rtemsbsd/include/machine/rtems-bsd-nexus-bus.h | 11 +++
 2 files changed, 18 insertions(+)

diff --git a/rtemsbsd/include/bsp/nexus-devices.h 
b/rtemsbsd/include/bsp/nexus-devices.h
index efe4fcb4..e6487470 100644
--- a/rtemsbsd/include/bsp/nexus-devices.h
+++ b/rtemsbsd/include/bsp/nexus-devices.h
@@ -115,6 +115,13 @@ RTEMS_BSD_DRIVER_E1000PHY;
 RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM0(ZYNQMP_IRQ_ETHERNET_0);
 RTEMS_BSD_DRIVER_E1000PHY;
 
+#elif defined(LIBBSP_AARCH64_XILINX_VERSAL_BSP_H)
+
+#include 
+
+RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(VERSAL_IRQ_ETHERNET_0);
+RTEMS_BSD_DRIVER_E1000PHY;
+
 #elif defined(LIBBSP_ARM_ATSAM_BSP_H)
 
 RTEMS_BSD_DRIVER_USB;
diff --git a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h 
b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
index 5902c58c..2c013ef3 100644
--- a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
+++ b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
@@ -409,6 +409,17 @@ extern "C" {
   #define RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(_irq)   \
 RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(3, 0xff0e, _irq)
 #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3 */
+/*
+ * Versal has a similar GEM as the CGEM. This should work for now.
+ */
+#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0)
+  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0(_irq)\
+RTEMS_BSD_DRIVER_XILINX_ZYNQ_GEM(0, 0xff0c, _irq)
+#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM0 */
+#if !defined(RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1)
+  #define RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1(_irq)   \
+RTEMS_BSD_DRIVER_XILINX_ZYNQ_GEM(1, 0xff0d, _irq)
+#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1 */
 
 /*
  * Designware/Synopsys Ethernet MAC Controller.
-- 
2.25.1

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


[PATCH] bsps/raspberrypi: Add FDT defines to build options

2021-06-25 Thread pranav
---
 spec/build/bsps/arm/raspberrypi/grp.yml |  8 
 spec/build/bsps/arm/raspberrypi/optfdtcpyro.yml | 15 +++
 spec/build/bsps/arm/raspberrypi/optfdtmxsz.yml  | 16 
 spec/build/bsps/arm/raspberrypi/optfdtro.yml| 15 +++
 spec/build/bsps/arm/raspberrypi/optfdtuboot.yml | 15 +++
 5 files changed, 69 insertions(+)
 create mode 100644 spec/build/bsps/arm/raspberrypi/optfdtcpyro.yml
 create mode 100644 spec/build/bsps/arm/raspberrypi/optfdtmxsz.yml
 create mode 100644 spec/build/bsps/arm/raspberrypi/optfdtro.yml
 create mode 100644 spec/build/bsps/arm/raspberrypi/optfdtuboot.yml

diff --git a/spec/build/bsps/arm/raspberrypi/grp.yml 
b/spec/build/bsps/arm/raspberrypi/grp.yml
index 7291e8b178..a810fdd529 100644
--- a/spec/build/bsps/arm/raspberrypi/grp.yml
+++ b/spec/build/bsps/arm/raspberrypi/grp.yml
@@ -31,6 +31,14 @@ links:
   uid: optrpi2
 - role: build-dependency
   uid: optspiiomode
+- role: build-dependency
+  uid: optfdtuboot
+- role: build-dependency
+  uid: optfdtcpyro
+- role: build-dependency
+  uid: optfdtmxsz
+- role: build-dependency
+  uid: optfdtro
 - role: build-dependency
   uid: ../start
 - role: build-dependency
diff --git a/spec/build/bsps/arm/raspberrypi/optfdtcpyro.yml 
b/spec/build/bsps/arm/raspberrypi/optfdtcpyro.yml
new file mode 100644
index 00..c26b1ae051
--- /dev/null
+++ b/spec/build/bsps/arm/raspberrypi/optfdtcpyro.yml
@@ -0,0 +1,15 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- get-boolean: null
+- define-condition: null
+build-type: option
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+default: true
+default-by-variant: []
+description: |
+  copy the FDT blob into the read-only load area via bsp_fdt_copy()
+enabled-by: true
+links: []
+name: BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA
+type: build
diff --git a/spec/build/bsps/arm/raspberrypi/optfdtmxsz.yml 
b/spec/build/bsps/arm/raspberrypi/optfdtmxsz.yml
new file mode 100644
index 00..14af766230
--- /dev/null
+++ b/spec/build/bsps/arm/raspberrypi/optfdtmxsz.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- get-integer: null
+- define: null
+build-type: option
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+default: 262144
+default-by-variant: []
+description: |
+  maximum size of the FDT blob in bytes
+enabled-by: true
+format: '{}'
+links: []
+name: BSP_FDT_BLOB_SIZE_MAX
+type: build
diff --git a/spec/build/bsps/arm/raspberrypi/optfdtro.yml 
b/spec/build/bsps/arm/raspberrypi/optfdtro.yml
new file mode 100644
index 00..a61bb2924b
--- /dev/null
+++ b/spec/build/bsps/arm/raspberrypi/optfdtro.yml
@@ -0,0 +1,15 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- get-boolean: null
+- define-condition: null
+build-type: option
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+default: true
+default-by-variant: []
+description: |
+  place the FDT blob into the read-only data area
+enabled-by: true
+links: []
+name: BSP_FDT_BLOB_READ_ONLY
+type: build
diff --git a/spec/build/bsps/arm/raspberrypi/optfdtuboot.yml 
b/spec/build/bsps/arm/raspberrypi/optfdtuboot.yml
new file mode 100644
index 00..5805e912ff
--- /dev/null
+++ b/spec/build/bsps/arm/raspberrypi/optfdtuboot.yml
@@ -0,0 +1,15 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- get-boolean: null
+- define-condition: null
+build-type: option
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+default: true
+default-by-variant: []
+description: |
+  copy the U-Boot provided FDT to an internal storage
+enabled-by: true
+links: []
+name: BSP_START_COPY_FDT_FROM_U_BOOT
+type: build
-- 
2.27.0

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


Re: [PATCH v6 2/2] Update smpstrongapa01; Add smpstrongapa02,smpstrongapa03

2021-06-25 Thread Sebastian Huber

On 25/06/2021 14:19, Richi Dubey wrote:

Why can't the test cases of the additional two test programs be merged
into the existing test program smpstrongapa01?

Good point. I am looking into this right now. The original idea behind 
having multiple test programs was to have more testing - and be more 
confident that the task-shifting works. I will see if the tests can be 
merged safely.


I don't want to reduce the number of test cases. I just wonder why we 
need three copy and paste variants of the same generic test program 
which executes table based test cases.


--
embedded brains GmbH
Herr 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

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

[rtems5] Assertion triggered with --enable-debug

2021-06-25 Thread Jan.Sommer
As a follow-up from the discussions here: 
https://lists.rtems.org/pipermail/users/2021-June/068454.html
For RTEMS5 I noticed that an assertion fails for the Zedboard BSP if RTEMS is 
compiled with the --enable-debug option.
The assert seems to be triggered during the execution of rtems_bsd_initialize  
in the init task. The backtrace looks like this:

Breakpoint 4, _Terminate (the_source=RTEMS_FATAL_SOURCE_ASSERT, 
the_error=3378872)
at ../../../../../c/src/../../cpukit/score/src/interr.c:36
36_User_extensions_Fatal( the_source, the_error );
(gdb) bt
#0  _Terminate (the_source=RTEMS_FATAL_SOURCE_ASSERT, the_error=3378872)
at ../../../../../c/src/../../cpukit/score/src/interr.c:36
#1  0x0010aa26 in rtems_fatal (fatal_source=RTEMS_FATAL_SOURCE_ASSERT, 
error_code=3378872)
at /workspace/rtems/cpukit/include/rtems/fatal.h:88
#2  0x0010aa98 in __assert_func (
file=0x20d250 "/workspace/rtems/cpukit/include/rtems/score/chainimpl.h", 
line=688,
func=0x20d2a4 <__func__.5956> "_Chain_Append_unprotected",
failedexpr=0x20d228 "_Chain_Is_node_off_chain( the_node )")
at ../../../../../c/src/../../cpukit/libcsupport/src/__assert.c:52
#3  0x0011be6c in _Chain_Append_unprotected (the_chain=0x3126d4 
<_Configuration_Scheduler_priority_dflt+1236>,
the_node=0x310d48 <_RTEMS_tasks_Objects+4160>)
at /workspace/rtems/cpukit/include/rtems/score/chainimpl.h:688
#4  0x0011c1ca in _Scheduler_priority_Ready_queue_enqueue (node=0x310d48 
<_RTEMS_tasks_Objects+4160>,
ready_queue=0x310f28 <_RTEMS_tasks_Objects+4640>, bit_map=0x312200 
<_Configuration_Scheduler_priority_dflt>)
at /workspace/rtems/cpukit/include/rtems/score/schedulerpriorityimpl.h:119
#5  0x0011c276 in _Scheduler_priority_Unblock (scheduler=0x2089f0 
<_Scheduler_Table>,
the_thread=0x310d48 <_RTEMS_tasks_Objects+4160>, node=0x310ef0 
<_RTEMS_tasks_Objects+4584>)
at ../../../../../c/src/../../cpukit/score/src/schedulerpriorityunblock.c:50
#6  0x0011d83a in _Scheduler_Unblock (the_thread=0x310d48 
<_RTEMS_tasks_Objects+4160>)
at /workspace/rtems/cpukit/include/rtems/score/schedulerimpl.h:322
#7  0x0011d8d8 in _Thread_Clear_state_locked (the_thread=0x310d48 
<_RTEMS_tasks_Objects+4160>, state=4294967295)
at ../../../../../c/src/../../cpukit/score/src/threadclearstate.c:44
#8  0x00120230 in _Thread_Start (the_thread=0x310d48 
<_RTEMS_tasks_Objects+4160>, entry=0x338fa4,
lock_context=0x338fa0) at 
../../../../../c/src/../../cpukit/score/src/threadstart.c:43
#9  0x001171ac in rtems_task_start (id=167837701, entry_point=0x190f65 
, argument=3282804)
at ../../../../../c/src/../../cpukit/rtems/src/taskstart.c:56
#10 0x001875f4 in rtems_bsd_threads_init_late (arg=) at 
../../rtemsbsd/rtems/rtems-kernel-thread.c:211
#11 0x0018cf58 in _bsd_mi_startup () at ../../freebsd/sys/kern/init_main.c:327
#12 0x001865e0 in rtems_bsd_initialize () at 
../../rtemsbsd/rtems/rtems-kernel-init.c:150
#13 0x001058e2 in register_network_devices (ip=ip@entry=0x31fe24  
"10.42.0.225")
at 
/localdata2/somm_ja/hap/fcc-software/sw/common/rtems/register_ethernet.cpp:130
#14 0x0010534c in task_system_init () at main.cpp:59
#15 0x00120270 in _Thread_Entry_adaptor_numeric (executing=0x30fd08 
<_RTEMS_tasks_Objects>)
at 
../../../../../c/src/../../cpukit/score/src/threadentryadaptornumeric.c:25
#16 0x0011e204 in _Thread_Handler () at 
../../../../../c/src/../../cpukit/score/src/threadhandler.c:139
#17 0x00128e48 in _Thread_Start_multitasking ()
at ../../../../../c/src/../../cpukit/score/src/threadstartmultitasking.c:64

Best regards,

Jan

Deutsches Zentrum für Luft- und Raumfahrt e. V. (DLR)
German Aerospace Center
Institute for Software Technology | Software for Space Systems and Interactive 
Visualization | Lilienthalplatz 7 | 38108 Braunschweig | Germany
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v6 2/2] Update smpstrongapa01; Add smpstrongapa02,smpstrongapa03

2021-06-25 Thread Richi Dubey
Hi,

Great! Thanks a lot for the review process and the merge :)

Why can't the test cases of the additional two test programs be merged
> into the existing test program smpstrongapa01?

Good point. I am looking into this right now. The original idea behind
having multiple test programs was to have more testing - and be more
confident that the task-shifting works. I will see if the tests can be
merged safely.

On Thu, Jun 24, 2021 at 5:50 PM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> On 16/06/2021 08:00, Richi Dubey wrote:
> > Update smpstrongapa01 to account for task shifting.
> > ---
> >   spec/build/testsuites/smptests/grp.yml|   4 +
> >   .../testsuites/smptests/smpstrongapa02.yml|  21 +
> >   .../testsuites/smptests/smpstrongapa03.yml|  21 +
> >   testsuites/smptests/smpstrongapa01/init.c |  72 ++--
> >   testsuites/smptests/smpstrongapa02/init.c | 373 ++
> >   .../smpstrongapa02/smpstrongapa02.doc |  11 +
> >   .../smpstrongapa02/smpstrongapa02.scn |   2 +
> >   testsuites/smptests/smpstrongapa03/init.c | 358 +
> >   .../smpstrongapa03/smpstrongapa03.doc |  11 +
> >   .../smpstrongapa03/smpstrongapa03.scn |   2 +
> >   10 files changed, 846 insertions(+), 29 deletions(-)
> >   create mode 100644 spec/build/testsuites/smptests/smpstrongapa02.yml
> >   create mode 100644 spec/build/testsuites/smptests/smpstrongapa03.yml
> >   create mode 100644 testsuites/smptests/smpstrongapa02/init.c
> >   create mode 100644
> testsuites/smptests/smpstrongapa02/smpstrongapa02.doc
> >   create mode 100644
> testsuites/smptests/smpstrongapa02/smpstrongapa02.scn
> >   create mode 100644 testsuites/smptests/smpstrongapa03/init.c
> >   create mode 100644
> testsuites/smptests/smpstrongapa03/smpstrongapa03.doc
> >   create mode 100644
> testsuites/smptests/smpstrongapa03/smpstrongapa03.scn
>
> I checked in the first patch with a small modification to be in line
> with the file header template.
>
> Why can't the test cases of the additional two test programs be merged
> into the existing test program smpstrongapa01?
>
> --
> embedded brains GmbH
> Herr 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
>
> 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] covoar/Explanations.cc: Remove unnecessary newline strip

2021-06-25 Thread Chris Johns
OK

On 25/6/21 1:40 pm, Alex White wrote:
> This corrects an issue where the starting line numbers of explanations
> had their last digit removed. This was caused by code left over for
> handling C file IO where the newline was included in the buffer.
> ---
>  tester/covoar/Explanations.cc | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/tester/covoar/Explanations.cc b/tester/covoar/Explanations.cc
> index 4d177eb..91e65f2 100644
> --- a/tester/covoar/Explanations.cc
> +++ b/tester/covoar/Explanations.cc
> @@ -55,7 +55,6 @@ namespace Coverage {
>  if (explain.fail()) {
>return;
>  }
> -inputBuffer[ strlen(inputBuffer) - 1] = '\0';
>  line++;
>} while ( inputBuffer[0] == '\0' );
>  
> @@ -80,7 +79,6 @@ namespace Coverage {
>   << "out of sync at the classification";
>  throw rld::error( what, "Explanations::load" );
>}
> -  inputBuffer[ strlen(inputBuffer) - 1] = '\0';
>e.classification = inputBuffer;
>line++;
>  
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v2] covoar/ Explanations.cc: Handle newline at end of file

2021-06-25 Thread Chris Johns
OK

On 25/6/21 1:37 pm, Alex White wrote:
> ---
>  tester/covoar/Explanations.cc | 24 +++-
>  1 file changed, 11 insertions(+), 13 deletions(-)
> 
> diff --git a/tester/covoar/Explanations.cc b/tester/covoar/Explanations.cc
> index 1449fb2..4d177eb 100644
> --- a/tester/covoar/Explanations.cc
> +++ b/tester/covoar/Explanations.cc
> @@ -85,26 +85,24 @@ namespace Coverage {
>line++;
>  
>// Get the explanation
> -  while (1) {
> -explain.getline( inputBuffer, MAX_LINE_LENGTH );
> -// fprintf( stderr, "%d - %s\n", line, inputBuffer );
> -if (explain.fail()) {
> -  std::ostringstream what;
> -  what << "line " << line
> -   << "out of sync at the explanation";
> -  throw rld::error( what, "Explanations::load" );
> -}
> -inputBuffer[ strlen(inputBuffer) - 1] = '\0';
> +  for (std::string input_line; std::getline( explain, input_line ); ) {
>  line++;
>  
> -const char delimiter[4] = "+++";
> -if (!strncmp( inputBuffer, delimiter, 3 )) {
> +const std::string delimiter = "+++";
> +if (input_line.compare( delimiter ) == 0) {
>break;
>  }
>  // XXX only taking last line.  Needs to be a vector
> -e.explanation.push_back( inputBuffer );
> +e.explanation.push_back( input_line );
>}
>  
> +if (explain.fail()) {
> +  std::ostringstream what;
> +  what << "line " << line
> +   << "out of sync at the explanation";
> +  throw rld::error( what, "Explanations::load" );
> +}
> +
>// Add this to the set of Explanations
>set[ e.startingPoint ] = e;
>  }
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel