18 Jan, 2020

1 commit


12 Aug, 2019

1 commit


30 Nov, 2018

1 commit

  • At present many TPM calls assume there is only one TPM in the system and
    look up this TPM themselves. This is inconsistent with driver model, which
    expects all driver methods to have a device parameter. Update the code to
    correct this.

    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
     

04 Oct, 2017

1 commit

  • U-Boot widely uses error() as a bit noisier variant of printf().

    This macro causes name conflict with the following line in
    include/linux/compiler-gcc.h:

    # define __compiletime_error(message) __attribute__((error(message)))

    This prevents us from using __compiletime_error(), and makes it
    difficult to fully sync BUILD_BUG macros with Linux. (Notice
    Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)

    Let's convert error() into now treewide-available pr_err().

    Done with the help of Coccinelle, excluing tools/ directory.

    The semantic patch I used is as follows:

    //
    @@@@
    -error
    +pr_err
    (...)
    //

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass
    [trini: Re-run Coccinelle]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     

03 Dec, 2016

1 commit

  • GCC 6.2 reasonably complains about the current code:

    ../cmd/tpm_test.c: In function ‘do_tpmtest’:
    ../cmd/tpm_test.c:540:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
    for (i = 0; i < argc; i++)
    ^~~
    ../cmd/tpm_test.c:542:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
    printf("\n------\n");
    ^~~~~~

    Signed-off-by: Stefan Brüns
    Reviewed-by: Simon Glass
    Updated to remove C99 variable decl:
    Signed-off-by: Simon Glass

    Stefan Brüns
     

25 Jan, 2016

1 commit

  • Now that they are in their own directory, we can remove this prefix.
    This makes it easier to find a file since the prefix does not get in the
    way.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Acked-by: Stefan Roese
    Acked-by: Przemyslaw Marczak

    Simon Glass