Skip to content
Snippets Groups Projects
  1. May 26, 2018
    • Miquel Raynal's avatar
      tpm: disociate TPMv1.x specific and generic code · d677bfe2
      Miquel Raynal authored
      
      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: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      [trini: Fix a few more cases of tpm.h -> tpm-v1.h, some Kconfig logic]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      d677bfe2
  2. May 25, 2018
  3. May 07, 2018
    • Tom Rini's avatar
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini authored
      
      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: default avatarTom Rini <trini@konsulko.com>
      83d290c5
  4. Nov 17, 2017
  5. Aug 13, 2017
  6. May 12, 2017
  7. Mar 26, 2017
    • mario.six@gdsys.cc's avatar
      tpm: Add function to load keys via their parent's SHA1 hash · 0f4b2ba1
      mario.six@gdsys.cc authored
      
      If we want to load a key into a TPM, we need to know the designated parent
      key's handle, so that the TPM is able to insert the key at the correct place in
      the key hierarchy.
      
      However, if we want to load a key whose designated parent key we also
      previously loaded ourselves, we first need to memorize this parent key's handle
      (since the handles for the key are chosen at random when they are inserted into
      the TPM). If we are, however, unable to do so, for example if the parent key is
      loaded into the TPM during production, and its child key during the actual
      boot, we must find a different mechanism to identify the parent key.
      
      To solve this problem, we add a function that allows U-Boot to load a key into
      the TPM using their designated parent key's SHA1 hash, and the corresponding
      auth data.
      
      Signed-off-by: default avatarMario Six <mario.six@gdsys.cc>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      0f4b2ba1
  8. Feb 01, 2017
  9. Mar 14, 2016
  10. Jan 29, 2016
  11. Oct 23, 2015
  12. Aug 31, 2015
  13. Jun 19, 2014
  14. Jul 24, 2013
  15. Jul 16, 2013
  16. Apr 12, 2013
    • Che-liang Chiou's avatar
      tpm: Add TPM command library · 8732b070
      Che-liang Chiou authored
      
      TPM command library implements a subset of TPM commands defined in TCG
      Main Specification 1.2 that are useful for implementing secure boot.
      More TPM commands could be added out of necessity.
      
      You may exercise these commands through the 'tpm' command.  However, the
      raw TPM commands are too primitive for writing secure boot in command
      interpreter scripts; so the 'tpm' command also provides helper functions
      to make scripting easier.
      
      For example, to define a counter in TPM non-volatile storage and
      initialize it to zero:
      
      $ tpm init
      $ tpm startup TPM_ST_CLEAR
      $ tpm nv_define d 0x1001 0x1
      $ tpm nv_write d 0x1001 0
      
      And then increment the counter by one:
      
      $ tpm nv_read d 0x1001 i
      $ setexpr.l i $i + 1
      $ tpm nv_write d 0x1001 $i
      
      Signed-off-by: default avatarChe-Liang Chiou <clchiou@chromium.org>
      8732b070
Loading