RTEMS | Draft: bsps/i386/pc386: add probe for Kvaser PCICan4, 2, 1 and CTU CAN FD CAN controllers (!1578)

Pavel Pisa (@ppisa) gitlab at rtems.org
Thu Nov 12 22:57:18 UTC 2026




Pavel Pisa commented on a discussion: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1578#note_162477


The library looks good. Problem is that it compiles for SPARC only now. Are you working/is there plan to work on the version for Noel-V and generic RISC-V?

In the longer term it would worth to extend it to all architectures.

Which targets/boards are supported? Is some of them supported with QEMU to the level that I can try to map CAN controllers on it?

As for the `ctucanfd_pci.c` and `sja1000_kvpcican.c`, I am not sure if these should be extended to support both PCI access methods (libpci and legacy i386) in single file or if they should be duplicated as one for legacy and one for libpci supported targets. There is not a lot of code/logic in these except mapping, but local bridge config is required for Kvaser PCICanX, chips count probing, on CTU CAN FD PCI side cont of cores probe logic reads information from the BAR0 region and there is Cyclone CRA region access to enable interrupts. So this speaks for keeping single copy of these code functionalities and to attempt to include both PCI access approaches in the single file. When libpci is extended for i386 and ideally even for x86_64, then legacy code paths can be removed.

I have found only GR and SPARC PCI implementations `bsps/shared/grlib/pci/`{`grpci.c`,`grpci2.c`,`pcif.c`} and `bsps/sparc/leon2/pci/at697_pci.c`.

So i386 legacy IN/OUT realized and them memory mapped control space access approach could be implemented based on the found SPARC files.

Do you have idea where to place such implementation? 

In theory, it should go into something as `bsps/x86_64/amd64/pci_low_level.c` and `bsps/i386/pc386/pci_low_level.c`. But it could be shared for both x86 targets, so something like `bsps/shared/dev/pci_pc_style`...

Is there some opinion how it matches or cashes with libbsd PCI devices support?

It seems to be longer time interesting project but if/when I find time for it is questionable. The same for finding some student with interest to work on it as thesis.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1578#note_162477
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/6-60w3wh463n50j7vd632o2b0r4-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20261112/ac1ff08f/attachment.htm>


More information about the bugs mailing list