Add PCI Ivshmem support: rptun_ivshmem and uio_ivshmem#12766
Closed
CV-Bowen wants to merge 19 commits intoapache:masterfrom
Closed
Add PCI Ivshmem support: rptun_ivshmem and uio_ivshmem#12766CV-Bowen wants to merge 19 commits intoapache:masterfrom
CV-Bowen wants to merge 19 commits intoapache:masterfrom
Conversation
Now the pci framework can be used in arm archtecture Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
Some bugs fix for the pci framework Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Add rptun ivshmem driver support, ivshmem is a pci device provided by QEMU to make two virtual machines can access the same share memory. Base on the ivshmem, we implement the rptun_ivshmem driver to make rptun work in the QEMU platform. Now two nuttxs in QEMU can communicate with each other through Rpmsg. Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
In file included from pci/pci.c:30:
pci/pci.c: In function 'pci_setup_device':
pci/pci.c:449:66: warning: right shift count >= width of type [-Wshift-count-overflow]
449 | pci_write_config_dword(dev, base_address_1, res->start >> 32);
| ^~
pci/pci.c: In function 'pci_presetup_bridge':
pci/pci.c:541:51: warning: right shift count >= width of type [-Wshift-count-overflow]
541 | ctrl->mem_pref.start >> 32);
| ^~
pci/pci.c: In function 'pci_postsetup_bridge':
pci/pci.c:604:57: warning: right shift count >= width of type [-Wshift-count-overflow]
604 | (ctrl->mem_pref.start - 1) >> 32);
| ^~
CC: pthread/pthread_release.c pci/pci_ecam.c:71:12: warning: initialization of 'int (*)(struct pci_bus_s *, unsigned int, int, int, uint32_t *)' {aka 'int (*)(struct pci_bus_s *, unsigned int, int, int, long unsigned int *)'} from incompatible pointer type 'int (*)(struct pci_bus_s *, uint32_t, int, int, uint32_t *)' {aka 'int (*)(struct pci_bus_s *, long unsigned int, int, int, long unsigned int *)'} [-Wincompatible-pointer-types]
71 | .read = pci_ecam_read_config,
| ^~~~~~~~~~~~~~~~~~~~
pci/pci_ecam.c:71:12: note: (near initialization for 'g_pci_ecam_ops.read')
pci/pci_ecam.c:72:12: warning: initialization of 'int (*)(struct pci_bus_s *, unsigned int, int, int, uint32_t)' {aka 'int (*)(struct pci_bus_s *, unsigned int, int, int, long unsigned int)'} from incompatible pointer type 'int (*)(struct pci_bus_s *, uint32_t, int, int, uint32_t)' {aka 'int (*)(struct pci_bus_s *, long unsigned int, int, int, long unsigned int)'} [-Wincompatible-pointer-types]
72 | .write = pci_ecam_write_config,
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Now all the type of devfn in pci framework are unsigned int Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Update x86_64 pci controller driver Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
pci/pci.c:415:34: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
415 | FAR struct pci_resource_s *res;
| ^~~
pci/pci.c: In function ‘pci_scan_bus’:
pci/pci.c:663:32: warning: unused variable ‘ctrl’ [-Wunused-variable]
663 | FAR struct pci_controller_s *ctrl = bus->ctrl;
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Change the qmeu pci test code for new pci driver framework Signed-off-by: yangshuyong <yangshuyong@xiaomi.com> Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Change the qemu pci edu driver code for new pci driver framework Signed-off-by: yangshuyong <yangshuyong@xiaomi.com> Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Application can open "/dev/uioX" and use `mmap()` to get the memory provided by ivshmem device. Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Contributor
Author
|
This PR is a bit messy, I need some time to organize it. Please not review, thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Impact
PCI
Testing
arm64 nsh