30 Nov, 2018

1 commit

  • At present these functions are not accessible outside the TPM library, but
    in some cases we need to call them. Export them in the header file and add
    a define for the SHA1 digest size.

    Also adjust tpm_open() to call tpm_close() first so that the TPM is in a
    known state before opening (e.g. by a previous phase of U-Boot).

    Signed-off-by: Simon Glass

    Simon Glass
     

09 Oct, 2018

1 commit


26 May, 2018

1 commit

  • There are no changes in this commit but a new organization of the code
    as follow.

    * cmd/ directory:
    > move existing code from cmd/tpm.c in cmd/tpm-common.c
    > move specific code in cmd/tpm-v1.c
    > create a specific header file with generic definitions for
    commands only called cmd/tpm-user-utils.h

    * lib/ directory:
    > move existing code from lib/tpm.c in lib/tpm-common.c
    > move specific code in lib/tpm-v1.c
    > create a specific header file with generic definitions for
    the library itself called lib/tpm-utils.h

    * include/ directory:
    > move existing code from include/tpm.h in include/tpm-common.h
    > move specific code in include/tpm-v1.h

    Code designated as 'common' is compiled if TPM are used. Code designated
    as 'specific' is compiled only if the right specification has been
    selected.

    All files include tpm-common.h.
    Files in cmd/ include tpm-user-utils.h.
    Files in lib/ include tpm-utils.h.
    Depending on the specification, files may include either (not both)
    tpm-v1.h or tpm-v2.h.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Tom Rini
    [trini: Fix a few more cases of tpm.h -> tpm-v1.h, some Kconfig logic]
    Signed-off-by: Tom Rini

    Miquel Raynal
     

07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

01 Jun, 2017

1 commit

  • These support the flat device tree. We want to use the dev_read_..()
    prefix for functions that support both flat tree and live tree. So rename
    the existing functions to avoid confusion.

    In the end we will have:

    1. dev_read_addr...() - works on devices, supports flat/live tree
    2. devfdt_get_addr...() - current functions, flat tree only
    3. of_get_address() etc. - new functions, live tree only

    All drivers will be written to use 1. That function will in turn call
    either 2 or 3 depending on whether the flat or live tree is in use.

    Note this involves changing some dead code - the imx_lpi2c.c file.

    Signed-off-by: Simon Glass

    Simon Glass
     

03 Dec, 2016

1 commit


11 Oct, 2016

1 commit

  • We should consistently use %z with size_t, and avoid passing a uint32_t as
    a size_t value. Fix these issues to avoid warnings on 64-bit machines.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     

23 Oct, 2015

1 commit


31 Aug, 2015

2 commits

  • Convert the tpm_tis_lpc driver to use driver model and update boards which
    use it.

    Signed-off-by: Simon Glass
    Acked-by: Christophe Ricard
    Reviewed-by: Heiko Schocher

    Simon Glass
     
  • Add a new uclass for TPMs which uses almost the same TIS (TPM Interface
    Specification) as is currently implemented. Since init() is handled by the
    normal driver model probe() method, we don't need to implement that. Also
    rename the transfer method to xfer() which is a less clumbsy name.

    Once all drivers and users are converted to driver model we can remove the
    old code.

    Signed-off-by: Simon Glass
    Acked-by: Christophe Ricard
    Reviewed-by: Heiko Schocher

    Simon Glass
     

23 Nov, 2014

1 commit

  • U-Boot has never cared about the type when we get max/min of two
    values, but Linux Kernel does. This commit gets min, max, min3, max3
    macros synced with the kernel introducing type checks.

    Many of references of those macros must be fixed to suppress warnings.
    We have two options:
    - Use min, max, min3, max3 only when the arguments have the same type
    (or add casts to the arguments)
    - Use min_t/max_t instead with the appropriate type for the first
    argument

    Signed-off-by: Masahiro Yamada
    Acked-by: Pavel Machek
    Acked-by: Lukasz Majewski
    Tested-by: Lukasz Majewski
    [trini: Fixup arch/blackfin/lib/string.c]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     

24 Jul, 2013

1 commit


03 Jun, 2013

1 commit