Hi Viraj,
Please find the code in this branch:
https://github.com/GabrielDai/rtems-libbsd/tree/port-greth-to-5-freebsd-12
Since this driver depends on drvmgr, you’ll have to compile your bsp with
support for it (make sure your bsp register the driver for your gaisler card
using the drvmgr functions).
Moreover, it is needed to add the following line for your bsp in
“nexus-devices.h” (rtems-libbsd):
SYSINIT_DRIVER_REFERENCE(grcard, pci);
This line will add a device (called grcard).
During booting (if the gaisler card get recognized) it will create child
devices (greth#) for the ethernet interfaces.
I hope this helps you.
Have fun coding,
Gabriel
Von: Viraj Jagadale <[email protected]>
Gesendet: Dienstag, 21. Februar 2023 17:36
An: Moyano Heredia, Victor Gabriel <[email protected]>; [email protected];
[email protected]
Betreff: Re: Project Discussion for GSoC 2023
Hi Daniel and Gabriel,
Thank you for responding. I don't own an ARTY A7-100T board. As suggested, I
will study the GRETH_GBIT manual at the same time. Can I refer to the DP83848
or LAN8742A documentation for stm32, both of which support legacy stack and
lwip? If not, could you please recommend a device?
Please share the driver for rtems-libbsd with me as it will be very useful as a
starting point.
Regards,
Viraj.
On Tue, Feb 21, 2023 at 2:00 PM
<[email protected]<mailto:[email protected]>> wrote:
Hi Viraj,
We ported the driver for greth to rtems-libbsd in the past but never got to
submit it (it might need some further refinement). The driver depends on the
driver manager (drvmgr). Not sure if this is the best approach but it is a good
starting point and we’d be happy to share it.
Best regards,
Gabriel
Von: devel <[email protected]<mailto:[email protected]>> Im Auftrag
von Daniel Hellstrom
Gesendet: Montag, 20. Februar 2023 15:59
An: Viraj Jagadale
<[email protected]<mailto:[email protected]>>;
[email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>;
[email protected]<mailto:[email protected]>
Betreff: Re: Project Discussion for GSoC 2023
Hi Viraj,
There is an old GRETH network driver as part of the old network stack that
would be a good reference.
Note that the old driver supports two IPs (GRETH 10/100, and GRETH_GBIT
10/100/1000). The GRETH_GBIT IP is mostly backwards compatible with the GRETH,
but as some additional functionality to off load the CPU with UDP/TCP
check-summing, unaligned DMA, and scatter-gather DMA for example. One approach
could be to begin to focus on the more capable GRETH_GBIT IP first, section 14:
https://www.gaisler.com/doc/gr740/GR740-UM-DS-2-5.pdf
or from the IP manual, section XX:
https://www.gaisler.com/products/grlib/grip.pdf
Please keep in mind that the GRETH driver will be used by both SPARC/LEON3 BSP
and RISC-V/NOEL-V BSP in the future.
It sounds as a good approach to look at the interface of the LWIP stack towards
the Network Device Driver, for example the DEC driver to learn however the best
would be if there is a MAC device supported both by legacy stack and the LWIP?
Simultaneously you could study the GRETH_GBIT manual with register and DMA
interface and the old device driver source code?
If you have a ARTY A7-100T board you could use the RISC-V design to get access
to the GRETH IP easily get started with. The GRMON eval version would also work
together with it for a hardware-debugger (no additional cost required) which
you can connect GDB for source debugging if you wish:
https://www.gaisler.com/index.php/products/processors/noel-v-examples
https://www.gaisler.com/index.php/products/debug-tools/grmon3
Kind Regards,
Daniel
On 2023-02-13 04:25, Viraj Jagadale wrote:
Dear Community,
I am interested in contributing to RTEMS and will be participating in GSoC
2023. I am interested in projects #4595<https://devel.rtems.org/ticket/4595>
and #4596<https://devel.rtems.org/ticket/4596> because I am passionate about
networking. I'm currently concentrating solely on #4595. I'm aware that I'll
need to study and comprehend the lwip stack documentation, as well as how the
Ethernet protocol is implemented and networking services are provided for
applications. Then I'll have to devise a strategy for designing the driver
architecture. I'm thinking about reading the RTEMS Legacy Networking User
Manual and understanding the DEC 21140 example to get started. I'm not sure if
this is the right approach, and I'll need your advice. I am also willing to
help with existing bugs and documentation updates.
Regards,
Viraj Jagadale.
_______________________________________________
devel mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/devel