1. 28 Jul, 2018 4 commits
  2. 26 May, 2018 4 commits
    • Miquel Raynal's avatar
      tpm: add a Sandbox TPMv2.x driver · 2bae712f
      Miquel Raynal authored and Tom Rini's avatar Tom Rini committed
      
      
      This driver can emulate all the basic functionalities of a TPMv2.x
      chip and should behave like them during regular testing.
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      2bae712f
    • Miquel Raynal's avatar
      tpm: add support for TPMv2.x SPI modules · eb46910b
      Miquel Raynal authored and Tom Rini's avatar Tom Rini committed
      
      
      Add the tpm2_tis_spi driver that should support any TPMv2 compliant
      (SPI) module.
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      eb46910b
    • Miquel Raynal's avatar
      tpm: disociate TPMv1.x specific and generic code · d677bfe2
      Miquel Raynal authored and Tom Rini's avatar Tom Rini committed
      
      
      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: Tom Rini's avatarTom Rini <trini@konsulko.com>
      [trini: Fix a few more cases of tpm.h -> tpm-v1.h, some Kconfig logic]
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      d677bfe2
    • Miquel Raynal's avatar
      tpm: prepare introduction of TPMv2.x support in Kconfig · 9f9ce3c3
      Miquel Raynal authored and Tom Rini's avatar Tom Rini committed
      
      
      Because both major revisions are not compatible at all, let's make them
      mutually exclusive in Kconfig. This way we will be sure, when using a
      command or a library function that it is supported by the right
      revision.
      
      Current drivers are currently prefixed by "tpm_", we will prefix TPMv2.x
      files by "tpm2_" to make the distinction without moving everything.
      
      The Kconfig menu about TPM drivers is now divided into two sections, one
      for each specification. Compliant drivers with one specification will
      only show up if this specification _only_ has been selected, otherwise a
      comment is displayed.
      
      Once a driver is selected by the user, it selects automatically a
      boolean value, that is needed in order to activate the TPM commands.
      Selecting the TPM commands will automatically select the right
      command/library files.
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      [trini: Rework deps as TPM_V1 and TPM_V2 depend on TPM,
              drop TPM_DRIVER_SELECTED]
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      9f9ce3c3
  3. 26 Mar, 2017 2 commits
    • Mario Six's avatar
      lib: tpm: Add command to list resources · 3d1df0e3
      Mario Six authored and Simon Glass's avatar Simon Glass committed
      
      
      It is sometimes convenient to know how many and/or which resources are
      currently loaded into a TPG, e.g. to test is a flush operation succeeded.
      
      Hence, we add a command that lists the resources of a given type currently
      loaded into the TPM.
      Signed-off-by: Mario Six's avatarMario Six <mario.six@gdsys.cc>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      3d1df0e3
    • Mario Six's avatar
      tpm: Add function to load keys via their parent's SHA1 hash · 0f4b2ba1
      Mario Six authored and Simon Glass's avatar Simon Glass committed
      
      
      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: Mario Six's avatarMario Six <mario.six@gdsys.cc>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      0f4b2ba1
  4. 01 Feb, 2017 1 commit
  5. 15 Aug, 2016 1 commit
    • Mario Six's avatar
      tpm: atmel_twi: Make compatible with DM I2C busses · 03dcd410
      Mario Six authored
      Commit 302c5dba ("dm: tpm: Add Driver Model support for tpm_atmel_twi
      driver") converted the Atmel TWI TPM driver itself to driver model, but
      kept the legacy-style i2c_write/i2c_read calls.
      
      Commit 3e7d940b
      
       ("dm: tpm: Every TPM drivers should depends on DM_TPM")
      then made DM_I2C a dependency of the driver, effectively forcing users
      to turn on CONFIG_DM_I2C_COMPAT to get it to work.
      
      This patch adds the necessary dm_i2c_write/dm_i2c_read calls to make the
      driver compatible with DM, but also keeps the legacy calls in ifdefs, so
      that the driver is now compatible with both DM and non-DM setups.
      Signed-off-by: Mario Six's avatarMario Six <mario.six@gdsys.cc>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarAndreas Bießmann <andreas@biessmann.org>
      03dcd410
  6. 29 Jan, 2016 3 commits
  7. 23 Oct, 2015 4 commits
  8. 31 Aug, 2015 2 commits
  9. 18 Apr, 2015 1 commit
  10. 24 Sep, 2014 1 commit
  11. 30 Jul, 2014 1 commit
    • Masahiro Yamada's avatar
      kconfig: add board Kconfig and defconfig files · dd84058d
      Masahiro Yamada authored
      
      
      This commit adds:
       - arch/${ARCH}/Kconfig
          provide a menu to select target boards
       - board/${VENDOR}/${BOARD}/Kconfig or board/${BOARD}/Kconfig
          set CONFIG macros to the appropriate values for each board
       - configs/${TARGET_BOARD}_defconfig
          default setting of each board
      
      (This commit was automatically generated by a conversion script
      based on boards.cfg)
      
      In Linux Kernel, defconfig files are located under
      arch/${ARCH}/configs/ directory.
      It works in Linux Kernel since ARCH is always given from the
      command line for cross compile.
      
      But in U-Boot, ARCH is not given from the command line.
      Which means we cannot know ARCH until the board configuration is done.
      That is why all the "*_defconfig" files should be gathered into a
      single directory ./configs/.
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Acked-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      dd84058d