09 Mar, 2018
1 commit
-
The @gdsys.cc addresses are supposed to be used for mailing lists.
Switch all occurrences of @gdsys.de mail addresses to their @gdsys.cc
equivalent.Also, Dirk's address was wrong in one place; fix that as well.
Signed-off-by: Mario Six
05 Mar, 2018
3 commits
-
Ensure that the Atmel TPM driver performs sufficient
validation of the length returned in the TPM response header.
This patch prevents memory corruption if the header contains a
length value that is larger than the destination buffer.Signed-off-by: Jeremy Boone
-
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
-
This patch prevents integer underflow when the length was too small,
which could lead to memory corruption.Signed-off-by: Jeremy Boone
06 Nov, 2017
1 commit
-
Uniformize STMicroelectronics copyrights header
Signed-off-by: Patrice Chotard
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
01 Jun, 2017
1 commit
-
These support the flat device tree. We want to use the dev_read_..()
prefix for functions that support both flat tree and live tree. So rename
the existing functions to avoid confusion.In the end we will have:
1. dev_read_addr...() - works on devices, supports flat/live tree
2. devfdt_get_addr...() - current functions, flat tree only
3. of_get_address() etc. - new functions, live tree onlyAll drivers will be written to use 1. That function will in turn call
either 2 or 3 depending on whether the flat or live tree is in use.Note this involves changing some dead code - the imx_lpi2c.c file.
Signed-off-by: Simon Glass
27 Mar, 2017
2 commits
-
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
Reviewed-by: Simon Glass -
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
03 Dec, 2016
1 commit
-
The Atmel AT97SC3204 is also TIS compliant.
Modify the tpm_tis_lpc driver to check for the vid/did used by the
Atmel AT97SC3204 and report an appropriate description.Signed-off-by: George McCollister
Reviewed-by: Simon Glass
11 Oct, 2016
1 commit
-
We should consistently use %z with size_t, and avoid passing a uint32_t as
a size_t value. Fix these issues to avoid warnings on 64-bit machines.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
24 Sep, 2016
1 commit
-
Now, include/linux/errno.h is a wrapper of .
Replace all include directives for with
.is supposed to be included from when
arch-headers fall back into generic implementation. Generally, they
should not be directly included from .c files.Signed-off-by: Masahiro Yamada
[trini: Add drivers/usb/host/xhci-rockchip.c]
Signed-off-by: Tom Rini
16 Aug, 2016
1 commit
-
Commit 302c5db ("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 3e7d940 ("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
Reviewed-by: Simon Glass
Reviewed-by: Andreas Bießmann
15 Apr, 2016
1 commit
-
In rollback_space_kernel we were not initializing the reserved fields
which should be for safety sake, and doing memset here means we don't
need to set the version field specifically either.Reported-by: Coverity (CID: 143917)
Cc: Simon Glass
Signed-off-by: Tom Rini
12 Apr, 2016
1 commit
-
To make the usage of this function more flexible, lets add the CRC start
value as parameter to this function. This way it can be used by other
functions requiring different start values than 0 as well.For non-zero CRC start values to work, I've reworked the function a bit.
The new implementation is copied from the Linux version in
drivers/i2c/i2c-core.c / i2c_smbus_pec(). Which supports non-zero
CRC stating values.I've double-checked that the results for zero starting values are
identical to the results from the original version of this function.Signed-off-by: Stefan Roese
Cc: Simon Glass
Reviewed-by: Simon Glass
29 Jan, 2016
4 commits
-
Add support for TPM ST33ZP24 spi.
The ST33ZP24 does have a spi interface.
The transport protocol is proprietary.For spi we are relying only on DM_SPI.
Reviewed-by: Simon Glass
Signed-off-by: Christophe Ricard -
Add support for TPM ST33ZP24 family with i2c.
For i2c we are relying only on DM_I2C.
Reviewed-by: Simon Glass
Signed-off-by: Christophe Ricard -
I2C protocol is not standardize for TPM 1.2.
TIS prococol is define by the Trusted Computing Group and potentially
available on several TPMs.tpm_tis_infineon.h header is not generic enough.
Rename tpm_tis_infineon.h to tpm_tis.h and move infineon specific
defines/variables to tpm_tis_infineon.cReviewed-by: Simon Glass
Signed-off-by: Christophe Ricard -
TPM_TIS_LPC is connected to the LPC bus, not I2C.
Reviewed-by: Simon Glass
Signed-off-by: Christophe Ricard
23 Oct, 2015
5 commits
-
Now that all TPM drivers use driver model, we can drop the special driver
model CONFIG option.Signed-off-by: Simon Glass
Acked-by: Christophe Ricard -
Every TPM drivers should now depends on DM_TPM and not only TPM.
Signed-off-by: Christophe Ricard
Reviewed-by: Tom Rini
Acked-by: Simon Glass -
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 -
tpm_atmel_twi can fit perfectly to the new UCLASS_TPM class.
Signed-off-by: Christophe Ricard
Reviewed-by: Tom Rini
Acked-by: Simon Glass -
As there is no TCG specification or recommendation for i2c TPM 1.2,
move tpm_tis_i2c driver to tpm_i2c_infineon. Other tpm vendors like Atmel
or STMicroelectronics may have a different transport protocol for i2c.Signed-off-by: Christophe Ricard
Reviewed-by: Tom Rini
Acked-by: Simon Glass
31 Aug, 2015
15 commits
-
Convert the tpm_tis_lpc driver to use driver model and update boards which
use it.Signed-off-by: Simon Glass
Acked-by: Christophe Ricard
Reviewed-by: Heiko Schocher -
Convert the tpm_tis_i2c driver to use driver model and update boards which
use it.Signed-off-by: Simon Glass
Acked-by: Christophe Ricard
Reviewed-by: Heiko Schocher -
Convert the sandbox TPM driver to use driver model. Add it to the device
tree so that it can be found on start-up.Signed-off-by: Simon Glass
Acked-by: Christophe Ricard
Reviewed-by: Heiko Schocher -
Add a new uclass for TPMs which uses almost the same TIS (TPM Interface
Specification) as is currently implemented. Since init() is handled by the
normal driver model probe() method, we don't need to implement that. Also
rename the transfer method to xfer() which is a less clumbsy name.Once all drivers and users are converted to driver model we can remove the
old code.Signed-off-by: Simon Glass
Acked-by: Christophe Ricard
Reviewed-by: Heiko Schocher -
Use a _US suffix for microseconds and a _MS suffic for milliseconds. Move
all timeouts and delays into one place. Use mdelay() instead of udelay()
where appropriate.Signed-off-by: Simon Glass
Acked-by: Christophe Ricard
Reviewed-by: Heiko Schocher -
Use the same prefix on each function for consistency.
Signed-off-by: Simon Glass
Acked-by: Christophe Ricard
Reviewed-by: Heiko Schocher -
Move all the init and uninit code into one place.
Signed-off-by: Simon Glass
Acked-by: Christophe Ricard
Reviewed-by: Heiko Schocher -
Some definitions are in the C file and some are in the header file. Move
everything into the header file for consistency and to reduce clutter.Signed-off-by: Simon Glass
Reviewed-by: Heiko Schocher -
There are too many structures storing the same sort of information. Move the
fields from struct tpm into struct tpm_chip and remove the former struct.Signed-off-by: Simon Glass
Reviewed-by: Heiko Schocher -
There are too many structures storing the same sort of information. Move the
fields from struct tpm_dev into struct tpm_chip and remove the former
struct.Signed-off-by: Simon Glass
Reviewed-by: Heiko Schocher -
This function is misnamed since it only applies to a single driver. Merge
its fields into its parent.Signed-off-by: Simon Glass
Reviewed-by: Heiko Schocher -
The function methods in struct tpm_vendor_specific just call local functions.
Change the code to use a direct call.Signed-off-by: Simon Glass
Reviewed-by: Heiko Schocher -
The current Infineon I2C TPM driver is written in two parts, intended to
support use with other I2C devices. However we don't have any users and the
Atmel I2C TPM device does not use this file.We should simplify this and remove the unused abstration. As a first step,
move the code into one file.Also the name tpm_private.h suggests that the header file is generic to all
TPMs but it is not. Rename it indicate that it relates only to this driverSigned-off-by: Simon Glass
Reviewed-by: Heiko Schocher -
Add an SPDX header to two drivers that don't have it.
Signed-off-by: Simon Glass
Acked-by: Christophe Ricard
Reviewed-by: Heiko Schocher -
Add new Kconfig options for TPMs in preparation for moving boards to use
Kconfig for TPM configuration.Signed-off-by: Simon Glass
Acked-by: Christophe Ricard
Reviewed-by: Heiko Schocher