17 Nov, 2017
3 commits
-
While commit 36d35345b1f6 ("tpm: add missing va_end") added
some missing calls to va_end(), it missed a few places.Signed-off-by: André Draszik
Acked-by: Simon Glass -
Add a function to obtain random data from the TPM.
Signed-off-by: André Draszik
Added commit message, add cast to min()
Signed-off-by: Simon Glass
Acked-by: Simon Glass -
The offset of the permanent flags structure is in a different
place in the response compared to what the code is doing,
which gives us a completely useless result.Fix by replacing hand-crafted code with generic parser
infrastructure.Signed-off-by: André Draszik
Acked-by: Simon Glass
14 Aug, 2017
1 commit
-
va_start must always be matched by va_end.
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
12 May, 2017
1 commit
-
The function tpm_xfer returns int so make 'err' be int rather than
uint32_t so that we can catch an error condition. Reported by
clang-3.8.Signed-off-by: Tom Rini
27 Mar, 2017
1 commit
-
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
Reviewed-by: Simon Glass
01 Feb, 2017
1 commit
-
This patch adds a function to the TPM library, which allows U-Boot to
flush resources, e.g. keys, from the TPM.Signed-off-by: Mario Six
Reviewed-by: Stefan Roese
Reviewed-by: Simon Glass
Signed-off-by: Stefan Roese
15 Mar, 2016
1 commit
-
Use this new function in places where it simplifies the code.
Signed-off-by: Simon Glass
29 Jan, 2016
1 commit
-
In case CONFIG_DM_TPM was set without any TPM chipset configured a fault
was generated (NULL pointer access).Reviewed-by: Simon Glass
Signed-off-by: Christophe Ricard
23 Oct, 2015
1 commit
-
As every TPM drivers support UCLASS_TPM, we can only rely on DM_TPM
functions.This simplify a bit the code.
Signed-off-by: Christophe Ricard
Reviewed-by: Tom Rini
Acked-by: Simon Glass
31 Aug, 2015
2 commits
-
Add a few new functions which will be used by the test command in a future
patch.Signed-off-by: Simon Glass
Acked-by: Christophe Ricard
Reviewed-by: Heiko Schocher -
Add driver model support to the TPM command and the TPM library. Both
support only a single TPM at present.Signed-off-by: Simon Glass
Acked-by: Christophe Ricard
Reviewed-by: Heiko Schocher
19 Jun, 2014
1 commit
-
commit 18b06652cd "tools: include u-boot version of sha256.h"
unconditionally forced the sha256.h from u-boot to be used
for tools instead of the host version. This is fragile though
as it will also include the host version. Therefore move it
to include/u-boot to join u-boot/md5.h etc which were renamed
for the same reason.cc: Simon Glass
Signed-off-by: Jeroen Hofstee
24 Jul, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini
17 Jul, 2013
1 commit
-
Extend the tpm library with support for single authorized (AUTH1) commands
as specified in the TCG Main Specification 1.2. (The internally used helper
functions are implemented in a way that they could also be used for double
authorized commands if someone needs it.)Provide enums with the return codes from the TCG Main specification.
For now only a single OIAP session is supported.
OIAP authorized version of the commands TPM_LoadKey2 and TPM_GetPubKey are
provided. Both features are available using the 'tpm' command, too.Authorized commands are enabled with CONFIG_TPM_AUTH_SESSIONS. (Note that
this also requires CONFIG_SHA1 to be enabled.)Signed-off-by: Reinhard Pfau
Signed-off-by: Dirk Eibach
Acked-by: Che-Liang Chiou
Signed-off-by: Andy Fleming
13 Apr, 2013
1 commit
-
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 0And then increment the counter by one:
$ tpm nv_read d 0x1001 i
$ setexpr.l i $i + 1
$ tpm nv_write d 0x1001 $iSigned-off-by: Che-Liang Chiou