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
     

28 Apr, 2018

1 commit


05 Mar, 2018

1 commit

  • Ensure that the Infineon I2C and SPI TPM driver performs adequate
    validation of the length extracted from the TPM response header.
    This patch prevents integer underflow when the length was too small,
    which could lead to memory corruption.

    Signed-off-by: Jeremy Boone

    Jeremy Boone
     

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
     

24 Sep, 2016

1 commit


29 Jan, 2016

1 commit


23 Oct, 2015

2 commits