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

Enable dynamic SHM support #1631

Merged
merged 5 commits into from
Oct 11, 2017
Merged

Enable dynamic SHM support #1631

merged 5 commits into from
Oct 11, 2017

Commits on Oct 10, 2017

  1. entry_std: save parameters attributes into local memory

    Normal World can change contents of shared memory at any time.
    Right now it does not pose any threat. But next patches
    will rely on attribute values. Thus, we need to read
    parameter attributes only once and then use this saved value.
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
    Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
    lorc committed Oct 10, 2017
    Configuration menu
    Copy the full SHA
    f246ecf View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2017

  1. core: add registered shared memory support

    Normal world now can call OPTEE_MSG_CMD_REGISTER_SHM and
    OPTEE_MSG_CMD_UNREGISTER_SHM functions to register/unregister
    shared memory.
    
    After that, it can use OPTEE_MSG_ATTR_TYPE_RMEM_* to reference
    to that registered shared buffers.
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
    Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
    lorc committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    7793de9 View commit details
    Browse the repository at this point in the history
  2. core: enable non-contiguous temporary reference parameters

    Now, when we can pass list of pages between REE and TEE it is possible
    to use temporary memory references that are not located in a preallocated
    shared memory area. By employing OPTEE_MSG_ATTR_NONCONTIG parameter
    attribute, REE can provide own buffer as a temporary memory reference.
    
    Actually, such parameters are indistinguishable from registered shared
    memory references. So, when OP-TEE spots temporary memory reference with
    OPTEE_MSG_ATTR_NONCONTIG attribute, it will create `mobj_reg_shm` for it.
    After call was handled, it will free that mobj.
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
    Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
    Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (FVP, QEMU v7/v8)
    Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (Juno with and without pager)
    Tested-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> (Rcar M3)
    lorc committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    b03d245 View commit details
    Browse the repository at this point in the history
  3. entry_std.c: comment fixes in assign_mobj_to_param_mem()

     - removed spaces before "?" in comments
     - Capitalized first letter in first words
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
    Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
    lorc committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    2ef9a31 View commit details
    Browse the repository at this point in the history
  4. build: add CFG_DYN_SHM_CAP config variable

    This variable can disable reported capability
    OPTEE_SMC_SEC_CAP_DYNAMIC_SHM.
    
    But dynamic SHM remains fully operational, though. This can be used
    for testing and debugging to emulate system, where dynamic SHM is not
    supported.
    
    Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
    Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
    lorc committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    6a86455 View commit details
    Browse the repository at this point in the history