06 Feb, 2020

2 commits

  • At present dm/device.h includes the linux-compatible features. This
    requires including linux/compat.h which in turn includes a lot of headers.
    One of these is malloc.h which we thus end up including in every file in
    U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
    which needs to use the system malloc() in some files.

    Move the compatibility features into a separate header file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present devres.h is included in all files that include dm.h but few
    make use of it. Also this pulls in linux/compat which adds several more
    headers. Drop the automatic inclusion and require files to include devres
    themselves. This provides a good indication of which files use devres.

    Signed-off-by: Simon Glass
    Reviewed-by: Anatolij Gustschin

    Simon Glass
     

05 Dec, 2019

1 commit

  • The mmc CID value is one of the input parameters used to provision the
    RPMB key. The trusted execution environment expects this value to be
    specified in big endian format.

    Before this fix, on little endian systems, the value returned by the
    linux kernel mmc driver differed from the one returned by u-boot.
    This meant that if linux provisioned the RPMB key, u-boot would not
    have access to the partition (and the other way around).

    Signed-off-by: Jorge Ramirez-Ortiz
    Reviewed-by: Jens Wiklander

    Jorge Ramirez-Ortiz
     

12 Aug, 2019

2 commits

  • Avoid using a typedef here which is unnecessary. Add an 'env_' prefix to
    both the enum and its members to make it clear that these are related to
    the environment.

    Add an ENV prefix to these two flags so that it is clear what they relate
    to. Also move them to env.h since they are part of the public API. Use an
    enum rather than a #define to tie them together.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • U-Boot is not supposed to use typedef for structs anymore. Also this name
    is the same as the ENTRY() macro used in assembler files, and 'entry'
    itself is widely used in U-Boot (>8k matches).

    Drop the typedef and rename the struct to env_entry to reduce confusion.

    Signed-off-by: Simon Glass
    Acked-by: Joe Hershberger

    Simon Glass
     

10 May, 2019

1 commit


27 Apr, 2019

1 commit

  • AVB 2.0 spec. revision 1.1 introduces support for named persistent values
    that must be tamper evident and allows AVB to store arbitrary key-value
    pairs [1].

    Introduce implementation of two additional AVB operations
    read_persistent_value()/write_persistent_value() for retrieving/storing
    named persistent values.

    Correspondent pull request in the OP-TEE OS project repo [2].

    [1]: https://android.googlesource.com/platform/external/avb/+/android-9.0.0_r22
    [2]: https://github.com/OP-TEE/optee_os/pull/2699

    Reviewed-by: Simon Glass
    Reviewed-by: Sam Protsenko
    Signed-off-by: Igor Opaniuk

    Igor Opaniuk
     

16 Dec, 2018

1 commit

  • If OP-TEE core is compiled with support of REE FS and RPMB
    at the same time (CFG_RPMB_FS ?= y; CFG_RPMB_FS ?= y), and persistent
    storage API is used with TEE_STORAGE_PRIVATE storage id, it will
    lead to TA panic.

    E/TC:? 0 TA panicked with code 0xffff0009
    .....
    E/TC:? 0 Call stack:
    E/TC:? 0 0x000000004002f2f8 TEE_OpenPersistentObject at
    lib/libutee/tee_api_objects.c:422

    In this particular case TEE_ERROR_STORAGE_NOT_AVAILABLE is more suitable
    than TEE_ERROR_NOT_IMPLEMENTED, as it provides to a TA a possibility
    to handle this error code [1].

    >From GPD TEE Internal Core specification [2]:
    TEE_ERROR_STORAGE_NOT_AVAILABLE - if the persistent object is stored in a
    storage area which is currently inaccessible. It may be associated with
    the device but unplugged, busy, or inaccessible for some other reason.

    [1]: https://github.com/OP-TEE/optee_os/blob/94db01ef448d1e552161c2d861d57a5f8bda0cc0/lib/libutee/tee_api_objects.c#L419
    [2]: https://globalplatform.org/wp-content/uploads/2018/06/GPD_TEE_Internal_Core_API_Specification_v1.1.2.50_PublicReview.pdf

    Signed-off-by: Igor Opaniuk
    Reviewed-by: Jens Wiklander

    Igor Opaniuk
     

07 Oct, 2018

5 commits

  • Adds a sandbox tee driver which emulates a generic TEE with the OP-TEE
    AVB TA.

    Reviewed-by: Simon Glass
    Signed-off-by: Jens Wiklander
    Reviewed-by: Simon Glass
    [trini: Fix printf warnings in ta_avb_invoke_func, slots is uint]
    Signed-off-by: Tom Rini

    Jens Wiklander
     
  • Adds configuration option OPTEE_TA_AVB and a header file describing the
    interface to the Android Verified Boot 2.0 (AVB) trusted application
    provided by OP-TEE.

    Tested-by: Igor Opaniuk
    Reviewed-by: Igor Opaniuk
    Signed-off-by: Jens Wiklander
    Reviewed-by: Simon Glass

    Jens Wiklander
     
  • Adds support in optee supplicant to route signed (MACed) RPMB frames
    from OP-TEE Secure OS to MMC and vice versa to manipulate the RPMB
    partition.

    Tested-by: Igor Opaniuk
    Signed-off-by: Jens Wiklander
    Reviewed-by: Simon Glass

    Jens Wiklander
     
  • Adds a OP-TEE driver.

    * Targets ARM and ARM64
    * Supports using any U-Boot memory as shared memory
    * Probes OP-TEE version using SMCs
    * Uses OPTEE message protocol version 2 to communicate with secure world

    Reviewed-by: Simon Glass
    Tested-by: Igor Opaniuk
    Signed-off-by: Jens Wiklander

    Jens Wiklander
     
  • Adds a uclass to interface with a TEE (Trusted Execution Environment).

    A TEE driver is a driver that interfaces with a trusted OS running in
    some secure environment, for example, TrustZone on ARM cpus, or a
    separate secure co-processor etc.

    The TEE subsystem can serve a TEE driver for a Global Platform compliant
    TEE, but it's not limited to only Global Platform TEEs.

    The over all design is based on the TEE subsystem in the Linux kernel,
    tailored for U-Boot.

    Reviewed-by: Simon Glass
    Tested-by: Igor Opaniuk
    Signed-off-by: Jens Wiklander

    Jens Wiklander