a1504e95 | 13-May-2022 |
Eddie James <eajames@linux.ibm.com> |
tpm: add support for TPMv2.x I2C chips
Add the tpm2_tis_i2c driver that should support any TPMv2 compliant I2C chips, such as the NPCT75X chip.
Signed-off-by: Eddie James <eajames@linux.ibm.com> Li
tpm: add support for TPMv2.x I2C chips
Add the tpm2_tis_i2c driver that should support any TPMv2 compliant I2C chips, such as the NPCT75X chip.
Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20220513170715.43475-8-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
80e87988 | 13-May-2022 |
Eddie James <eajames@linux.ibm.com> |
tpm: core: Set timeouts before requesting locality
Requesting the locality uses the timeout values, so they need to be set beforehand.
Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https
tpm: core: Set timeouts before requesting locality
Requesting the locality uses the timeout values, so they need to be set beforehand.
Signed-off-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20220513170715.43475-6-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
3ac88d09 | 13-May-2022 |
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> |
tis: fix tpm_tis_remove()
tpm_tis_remove() leads to calling tpm_tis_ready() with the IO region unmapped and chip->locality == -1 (locality released). This leads to a crash in mmio_write_bytes().
Th
tis: fix tpm_tis_remove()
tpm_tis_remove() leads to calling tpm_tis_ready() with the IO region unmapped and chip->locality == -1 (locality released). This leads to a crash in mmio_write_bytes().
The patch implements these changes:
tpm_tis_remove(): Unmap the IO region after calling tpm_tis_cleanup().
tpm_tis_cleanup(): Request locality before IO output and releasing locality.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Link: https://lore.kernel.org/r/20220513170715.43475-5-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
cea4033d | 13-May-2022 |
Ilias Apalodimas <ilias.apalodimas@linaro.org> |
tpm2: Introduce TIS tpm core
There's a lot of code duplication in U-Boot right now. All the TPM TIS compatible drivers we have at the moment have their own copy of a TIS implementation.
So let's c
tpm2: Introduce TIS tpm core
There's a lot of code duplication in U-Boot right now. All the TPM TIS compatible drivers we have at the moment have their own copy of a TIS implementation.
So let's create a common layer which implements the core TIS functions. Any driver added from now own, which is compatible with the TIS spec, will only have to provide the underlying bus communication mechanisms.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Link: https://lore.kernel.org/r/20220513170715.43475-4-eajames@linux.ibm.com Signed-off-by: Joel Stanley <joel@jms.id.au>
show more ...
|
ef8a2500 | 01-Oct-2018 |
Simon Glass <sjg@chromium.org> |
sandbox: tpm: Enhance to support the latest Chromium OS
This driver was originally written against Chromium OS circa 2012. A few new features have been added. Enhance the TPM driver to match. This m
sandbox: tpm: Enhance to support the latest Chromium OS
This driver was originally written against Chromium OS circa 2012. A few new features have been added. Enhance the TPM driver to match. This mostly includes a few new messages and properly modelling whether a particular 'space' is present or not.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
46703cd9 | 05-Aug-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
tpm: sandbox: fix wrong assignment with a simplification
The recv variable in sandbox_tpm2_fill_buf() is a pointer on a pointer of a char array. It means accessing *recv is the char array pointer it
tpm: sandbox: fix wrong assignment with a simplification
The recv variable in sandbox_tpm2_fill_buf() is a pointer on a pointer of a char array. It means accessing *recv is the char array pointer itself while **recv is the first character of that array. There is no need for such indirection here, so simplify the code.
Simplifying things will make the last assignment right: "*recv = NULL" is now correct. The issue has been found by the following Coverity Scan report:
CID 183371: Incorrect expression (UNUSED_VALUE) Assigning value "4UL" to "*recv" here, but that stored value is overwritten before it can be used. 232 *recv += sizeof(rc); 233 234 /* Add trailing \0 */ 235 *recv = NULL;
While at simplifying things, use '\0' instead of NULL when adding an empty char at the end of the buffer.
Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
58233075 | 19-Jul-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
tpm: make TPM_V2 be compiled by default
TPM_V1 was already compiled by default. Now that both can be compiled at the same time, compiled them both by default.
Signed-off-by: Miquel Raynal <miquel.r
tpm: make TPM_V2 be compiled by default
TPM_V1 was already compiled by default. Now that both can be compiled at the same time, compiled them both by default.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
2a2096ea | 19-Jul-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
tpm: allow TPM v1 and v2 to be compiled at the same time
While there is probably no reason to do so in a real life situation, it will allow to compile test both stacks with the same sandbox defconfi
tpm: allow TPM v1 and v2 to be compiled at the same time
While there is probably no reason to do so in a real life situation, it will allow to compile test both stacks with the same sandbox defconfig.
As we cannot define two 'tpm' commands at the same time, the command for TPM v1 is still called 'tpm' and the one for TPM v2 'tpm2'. While this is the exact command name that must be written into eg. test files, any user already using the TPM v2 stack can continue to do so by just writing 'tpm' because as long as TPM v1 support is not compiled, U-Boot prompt will search for the closest command named after 'tpm'.
The command set can also be changed at runtime (not supported yet, but ready to be), but as one can compile only either one stack or the other, there is still one spot in the code where conditionals are used: to retrieve the v1 or v2 command set.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: In sandbox_tpm2_fill_buf() use NULL not \0 to ensure NULL terminated string due to LLVM warning] Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
8a7aa3e2 | 19-Jul-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
tpm: remove stale symbol in Kconfig
The TPM_DRIVER_SELECTED symbol was used in one of the initial series about TPMv2 but its use has been dropped, making these selects useless, remove them.
Signed-
tpm: remove stale symbol in Kconfig
The TPM_DRIVER_SELECTED symbol was used in one of the initial series about TPMv2 but its use has been dropped, making these selects useless, remove them.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
a174f000 | 16-May-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
tpm2: tis_spi: add the possibility to reset the chip with a gpio
On some designs, the reset line could not be connected to the SoC reset line, in this case, request the GPIO and ensure the chip gets
tpm2: tis_spi: add the possibility to reset the chip with a gpio
On some designs, the reset line could not be connected to the SoC reset line, in this case, request the GPIO and ensure the chip gets reset.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
d677bfe2 | 15-May-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
tpm: disociate TPMv1.x specific and generic code
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 c
tpm: disociate TPMv1.x specific and generic code
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 <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Fix a few more cases of tpm.h -> tpm-v1.h, some Kconfig logic] Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|