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

[RFC] Dynamic shared memory implementation. #1232

Closed
wants to merge 7 commits into from

Commits on Jun 2, 2017

  1. msg_param: add msg_param.c with helper functions

    This patch adds various helper functions to manipulate with parameters
    passed to/from normal world.
    
    Also it introduces new optee_param type which is used to pass long
    lists of parameters.
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    lorc committed Jun 2, 2017
    Configuration menu
    Copy the full SHA
    0d1b759 View commit details
    Browse the repository at this point in the history
  2. mem: add registered shared memory support

    This is quite large patch, that enables registered shared memory
    support. Main idea is that normal world can provide own pages
    for shared memory. So there are two new calls:
    OPTEE_MSG_CMD_REGISTER_SHM and OPTEE_MSG_CMD_UNREGISTER_SHM.
    
    Also, OPTEE_MSG_RPC_CMD_SHM_ALLOC can return registered shared
    buffer. To ease up use of such buffers all code that uses them
    is moved to mobjs. That means that TA loader, fs_rpc, sockets, etc
    all use mobjs to represent shared buffers instead of simple paddr_t.
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    lorc committed Jun 2, 2017
    Configuration menu
    Copy the full SHA
    a699ccb View commit details
    Browse the repository at this point in the history
  3. reg_shm: v5 delta: new ABI for shared memory

    reworked ABI for registered SHM and RPC calls.
    Removed OPTEE_MSG_ATTR_TYPE_NESTED and OPTEE_MSG_ATTR_FRAGMENT,
    added OPTEE_MSG_ATTR_TYPE_NONCONTIG.
    Now "register SHM" and "alloc mem" RPC are handled in the same way.
    List of pages is stored as plain array of 64 bit values.
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    lorc committed Jun 2, 2017
    Configuration menu
    Copy the full SHA
    5ba40e3 View commit details
    Browse the repository at this point in the history
  4. shmem: v6 delta

     - OPTEE_MSG_ATTR_TYPE_NONCONTIG converted to OPTEE_MSG_ATTR_NONCONTIG:
    This is flag now, rather than a type.
     - removed OPTEE_MSG_ATTR_FRAGMENT (forgot to remove in prev commit).
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    lorc committed Jun 2, 2017
    Configuration menu
    Copy the full SHA
    43b8c25 View commit details
    Browse the repository at this point in the history
  5. shmem: v7 delta:

     - fixed dump mistake with
     (OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT | OPTEE_MSG_ATTR_TYPE_MASK)
     instead of
     (OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT | OPTEE_MSG_ATTR_NONCONTIG)
     in thread.c
    
     - added support for non-contig TMEM references
     - removed duplicate code that constructed mobjs from non-contig buffers:
       added msg_param_mobj_from_noncontig_param() function that does the job.
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    lorc committed Jun 2, 2017
    Configuration menu
    Copy the full SHA
    99c855b View commit details
    Browse the repository at this point in the history
  6. reg_shm: delta v8: added new mobj_shm

    mobj_shm represents buffer in predefined SHM region.
    It is used as fallback, when dynamic SHM is disabled.
    
    also removed "#ifdef CFG_SMALL_PAGE_USER_TA" check
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    lorc committed Jun 2, 2017
    Configuration menu
    Copy the full SHA
    5e668b5 View commit details
    Browse the repository at this point in the history
  7. mobj: mobj_reg_shm: fix offset calculation

    There was bug in offset calculation: invalid variable was used.
    Also division remainder was replaced with bitwise and to speed up
    things a bit.
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    lorc committed Jun 2, 2017
    Configuration menu
    Copy the full SHA
    3d4b5d7 View commit details
    Browse the repository at this point in the history