Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rptun framework update and related driver update #13526

Merged
merged 22 commits into from
Sep 25, 2024

Commits on Sep 24, 2024

  1. nuttx/dirvers: Add secure rptun file

    rptun secure is a rptun driver used for the rpmsg communication
    between (Non-Secure) REE and (Secure) TEE environments.
    
    Signed-off-by: yanghuatao <[email protected]>
    Signed-off-by: Bowen Wang <[email protected]>
    yanghuatao authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    a27e014 View commit details
    Browse the repository at this point in the history
  2. rptun: use local rx virtqueue idx to resolve remote low power

    Store the rx virtqueue idx to the local headrx index, and only
    process the data when the rx virtqueue has data to avoid access
    the ram in low power mode.
    
    Signed-off-by: ligd <[email protected]>
    GUIDINGLI authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    317d48c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dd9eac5 View commit details
    Browse the repository at this point in the history
  4. rptun/pm: use pm_wakelock

    Signed-off-by: ligd <[email protected]>
    GUIDINGLI authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    58e5230 View commit details
    Browse the repository at this point in the history
  5. rptun: add RPTUN_PM_AUTORELAX method.

    Signed-off-by: ligd <[email protected]>
    GUIDINGLI authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    e21a27d View commit details
    Browse the repository at this point in the history
  6. drivers/rptun: flush the image memory when read from the file system

    Flush the image memory to make sure the remote core access the correct
    image.
    
    Signed-off-by: Bowen Wang <[email protected]>
    CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    31a98d9 View commit details
    Browse the repository at this point in the history
  7. rptun: use detail name for pm wakelock

    So we can distinguish the pm wakelock
    
    Signed-off-by: ligd <[email protected]>
    GUIDINGLI authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    0ca81db View commit details
    Browse the repository at this point in the history
  8. rptun: BUG fix, should not destory the semaphore twice

    This BUG is introduced in PR: apache#13172
    
    Signed-off-by: Bowen Wang <[email protected]>
    CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    b950142 View commit details
    Browse the repository at this point in the history
  9. rptun/rptun_dump: remove unused rptun_dump.c

    rptun_dump related code has been moved to rptun.c from rptun_dump.c,
    but file rptun_dump.c is not deleted in PR:
    apache#11712
    
    So delete this file.
    
    Signed-off-by: Bowen Wang <[email protected]>
    CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    36b1570 View commit details
    Browse the repository at this point in the history
  10. rptun: add timeout to wait_tx_buffer callback

    Signed-off-by: ligd <[email protected]>
    GUIDINGLI authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    e7f4a2e View commit details
    Browse the repository at this point in the history
  11. rptun: Rename rptun_panic_ to rptun_panic

    The function name rptun_panic_ is not consistent with other functions
    
    Signed-off-by: Xiang Xiao <[email protected]>
    xiaoxiang781216 authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    92cd7cf View commit details
    Browse the repository at this point in the history
  12. rptun: rptun pm and rptun dump support cacheable memory

    Should invalidate the memory when the data is located in shared
    memory and write by remote core.
    
    Signed-off-by: Bowen Wang <[email protected]>
    CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    8a5424c View commit details
    Browse the repository at this point in the history
  13. drivers/rptun/rptun.c: move headrx out of CONFIG_RPTUN_PM

    headrx is very convient to check weather current core miss interrupt
    by comparing the headrx with the rx vring avail.idx for slave side or
    rx vring used.idx for master side.
    
    So move headrx out of the CONFIG_RPTUN_PM range.
    
    Signed-off-by: Bowen Wang <[email protected]>
    CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    0d072ff View commit details
    Browse the repository at this point in the history
  14. rptun_ivshmem.c: Replace work queue with wdog

    wdog has better performance than work queue
    
    Signed-off-by: wangyongrong <[email protected]>
    wyr-7 authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    9b23ecc View commit details
    Browse the repository at this point in the history
  15. sim/sim_rptun: add 64-bit support for sim_rptun

    add remote addrenv to make the da is start from 0, so the uint32_t
    da in resource table can store the correct address
    
    Signed-off-by: Bowen Wang <[email protected]>
    CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    f3a2fd3 View commit details
    Browse the repository at this point in the history
  16. rptun.c/rpmsg_virtio.c: move panic logic from chip to rptun/rpmsg_virtio

    Move the panic logic in common places, later we can move more logic to
    the framework instead of having the drivers implement it repeatedly.
    
    Signed-off-by: Yongrong Wang <[email protected]>
    Signed-off-by: Bowen Wang <[email protected]>
    wyr-7 authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    d18c7f3 View commit details
    Browse the repository at this point in the history
  17. sim_rptun.c: remove sim_rptun_panic

    Because we can use the common part implemented in rptun
    
    Signed-off-by: Yongrong Wang <[email protected]>
    wyr-7 authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    91a4d5c View commit details
    Browse the repository at this point in the history
  18. rptun/rpmsg_virtio: remove chip cmd and reuse the common ones

    Add more common command for rptun and rpmsg_virtio frameworks,
    also modify the rptun and rpmsg_virtio driver to use the common
    commands.
    
    Signed-off-by: Yongrong Wang <[email protected]>
    wyr-7 authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    9d65886 View commit details
    Browse the repository at this point in the history
  19. rptun: move rptun cmd definition before the resource table

    Because locate the command at the end the resource table is unfriendly
    when we want to support multi virtio devices instead only one virtio
    rpmsg device.
    
    Signed-off-by: Bowen Wang <[email protected]>
    CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    4acb838 View commit details
    Browse the repository at this point in the history
  20. rptun: fix memleak on failure

    Leak backtrace:
        1 14 2096 9886 0x4318d768 [0x040320744] <romfs_fileconfigure+184> romfs/fs_romfsutil.c:1039
                                                     [0x04031fd3e] <romfs_open+378> romfs/fs_romfs.c:281
                                                     [0x04027fa9e] <file_open+446> vfs/fs_open.c:244
                                                     [0x0402ab986] <rptun_store_open+26> rptun/rptun.c:955
                                                     [0x04034cc88] <remoteproc_load+120> open-amp/lib/remoteproc/remoteproc.c:452
                                                     [0x0402ac8ac] <rptun_dev_start+176> rptun/rptun.c:748
                                                     [0x0402ad038] <rptun_ioctl+416> rptun/rptun.c:618
    
    Signed-off-by: xuxingliang <[email protected]>
    XuNeo authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    ba8fcbd View commit details
    Browse the repository at this point in the history
  21. rptun/rptun_ivshmem:add restart cmd to reboot slave

    Master can send restart command to slave to reboot the slave core
    
    Signed-off-by: mazhuang <[email protected]>
    Signed-off-by: Yongrong Wang <[email protected]>
    mazhuang authored and CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    68b1588 View commit details
    Browse the repository at this point in the history
  22. include/nuttx/rptun/rptun.h: change offset type to uint32_t

    Sync the offset data type with resource table defined in OpenAMP
    and Linux.
    
    Signed-off-by: Bowen Wang <[email protected]>
    CV-Bowen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    2056b76 View commit details
    Browse the repository at this point in the history