18 Jan, 2021

14 commits

  • All user-selectable kconfig options need to have help text.

    Change-Id: I9b8a9caccecec0425d52cb5c9195ec0767437345
    Signed-off-by: Eric Biggers

    Eric Biggers
     
  • Currently TRUSTY_IRQ and TRUSTY_LOG are forced on whenever TRUSTY is,
    which defeats the point of them being separate options.

    Make them deselectable so that the user can disable these modules if
    they aren't needed.

    Change-Id: I6e5199bea203918dcb967f257e2797b105b03ca4
    Signed-off-by: Eric Biggers

    Eric Biggers
     
  • Makefiles and Kconfig files should have an SPDX line too.

    Change-Id: I644d4fb8dd7383ec5c36b310a11bb42a93960581
    Signed-off-by: Eric Biggers

    Eric Biggers
     
  • Avoid having to use 'depends on TRUSTY' in every option.

    Change-Id: Ic4e0e8d636af44d1a0360b9f7616bb3ecd8ccb26
    Signed-off-by: Eric Biggers

    Eric Biggers
     
  • There's no need for these kconfig symbols since CONFIG_ARM and
    CONFIG_ARM64 can just be used directly instead.

    Change-Id: Ie2416a4a76bd190faeb101e02171f94ae3f42255
    Signed-off-by: Eric Biggers

    Eric Biggers
     
  • 'n' is already the default when no default is explicitly specified.

    Change-Id: Ia55333edaf48718f8c8b318c2776ec4eafd1d267
    Signed-off-by: Eric Biggers

    Eric Biggers
     
  • The trusty driver currently only builds for the ARM and ARM64
    architectures. Add the missing dependency to the kconfig symbol.

    Change-Id: If78b260032b23761bcc9f7d147342a307f95da82
    Signed-off-by: Eric Biggers

    Eric Biggers
     
  • TRUSTY_SMC_ARM and TRUSTY_SMC_ARM64 should be bool instead of tristate,
    since they're not modules themselves but rather options for the
    trusty-core module.

    Change-Id: Ifa1fef51fa2b841503a4e84956008adf33e87c45
    Signed-off-by: Eric Biggers

    Eric Biggers
     
  • Bug: 140053385
    Change-Id: Iafe6597c04342dffddbf587c3ca568b8f6790a36
    Signed-off-by: Tri Vo

    Tri Vo
     
  • Tests shared memory interface with a stdcall.

    Bug: 147322844
    Change-Id: Id1b8991dfdccdb136126127968e110df709cc59b
    Signed-off-by: Arve Hjønnevåg

    Arve Hjønnevåg
     
  • Trusty IPC driver provides message passing interface
    between non-secure side (Linux) and secure side running
    Trusty. It is handling a set of trusty IPC virtio devices
    instantiated and configured by trusty-virtio driver based
    on device description retrieved from secure side.

    * Updated for 4.19 VirtIO API (mmaurer@google.com)

    includes: Rework tipc_chan_destroy

    It seems unnecessary to dynamically detach vds pointer in
    tipc_chan_destroy. Instead, it is cleaner to keep it around
    until channel object itself is actually freed. This eliminates
    the need to dynamically check presence of that pointer as it
    is should always be present if tipc_chan exists.

    includes: Fix a race condition in tipc_release

    Under certain conditions it is possible that an instance of
    tipc_dn_chan structure will be freed in context of tipc_release
    call while still be referenced and in use by corresponding
    instance of tipc_chan struct. In order to fix that, we will need
    to make sure that corresponding tipc_chan struct is not in use
    before freeing tipc_dn_chan struct. This CL introduces and
    implements a new callback in tipc_chan_ops struct, called
    handle_release, that when specified will be called while an
    instance of tipc_chan object is getting destroyed. This is
    only possible when the last reference to tipc_chan struct
    goes away so it is not in use anymore.

    includes: Fix off by one error in idr allocation.

    The driver is configured to support 4 devices, but only the first 3
    worked.

    Change-Id: I81288aa458675996cbc93e73baf3c41d735d5429
    Signed-off-by: Michael Ryleev
    Signed-off-by: Matthew Maurer
    Signed-off-by: Arve Hjønnevåg
    Signed-off-by: Tri Vo

    Michael Ryleev
     
  • Trusty virtio driver is responsible for management an
    interaction with virtio devices exposed by Trusty.
    During initialization, this driver makes an smc
    call to retrieve Trusty virtio device descriptor from
    secure side, parses it then instantiates and configures
    the specified set of virtio devices.

    * Updated for 4.19 VirtIO API (mmaurer@google.com)

    includes: Add null terminator to of_device_id table

    Change-Id: I20a23518d5c19bedd9282f7f1d4b16957ba75408
    Signed-off-by: Michael Ryleev
    Signed-off-by: Matthew Maurer
    Signed-off-by: Tri Vo

    Michael Ryleev
     
  • This driver is the consumer side of a ringbuffer of log data
    that the secure operating system dumps prints into. Trusty
    printfs will be dumped into the kernel log after smc calls
    and during panics.

    * Added header needed in 4.19 (mmaurer@google.com)

    Change-Id: Ib4fc8b9077da5e2c628607bc6cd04dc8760dead5
    Signed-off-by: Michael Ryleev
    Signed-off-by: Matthew Maurer
    Signed-off-by: Tri Vo

    Riley Andrews
     
  • includes: Add arm64 support

    includes: Add trusty_fast_call64 api on 64 bit systems.

    includes: move probe to subsys_initcall

    Child devices of trusty like FIQ-based debuggers and watchdogs may
    want to probe early, move trusty from module init to subsys init
    to allow it and its children to probe earlier.

    includes: Retry std_calls on SM_ERR_BUSY

    If the trusty spinlock is held, or if the strex fails for another
    reason, trusty returns SM_ERR_BUSY. Add retry code to handle this.

    Without this retry code, std_calls can fail. If the previous smc
    call had returned SM_ERR_INTERRUPTED, this failure would cause
    the driver to get out of sync with trusty. All later calls would
    then fail with SM_ERR_INTERLEAVED_SMC.

    includes: Extend smc function and move to arch specific asm file

    Extend trusty smc function to pass 8 registers in both directions. Move
    to separate assembly files so r7 can be used (in thumb mode r7 got
    corrupted by the inline assembly even though it was specified as an
    output).

    Change-Id: I35318be3d41f84b922397e9afdca6bf47d9645db
    Signed-off-by: Arve Hjønnevåg
    Signed-off-by: Tri Vo

    Arve Hjønnevåg