[PATCH rtems-libbsd] aarch64/nexus: add GEM definitions for Versal
Gedare Bloom
gedare at rtems.org
Fri Jun 25 19:04:00 UTC 2021
On Fri, Jun 25, 2021 at 12:55 PM Gedare Bloom <gedare at rtems.org> 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 <gedare at rtems.org> 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 <bsp/irq.h>
> > +
> > +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, 0xff0e0000, _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, 0xff0c0000, _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, 0xff0d0000, _irq)
> > +#endif /* RTEMS_BSD_DRIVER_XILINX_VERSAL_GEM1 */
> >
> > /*
> > * Designware/Synopsys Ethernet MAC Controller.
> > --
> > 2.25.1
> >
More information about the devel
mailing list