summaryrefslogtreecommitdiffstats
path: root/drivers/tpm/tpm_tis_sandbox.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers/tpm/tpm_tis_sandbox.c: Fix uninitialized variable useTom Rini2016-04-151-1/+1
| | | | | | | | | | 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 <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* lib/crc8: Add crc start valueStefan Roese2016-04-111-1/+1
| | | | | | | | | | | | | | | | | | 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 <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: tpm: sandbox: Convert TPM driver to driver modelSimon Glass2015-08-311-12/+45
| | | | | | | | | 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 <sjg@chromium.org> Acked-by: Christophe Ricard <christophe-h.ricard@st.com> Reviewed-by: Heiko Schocher <hs@denx.de>
* sandbox: tpm: Fix nvwrite commandChe-Liang Chiou2014-01-081-3/+1
| | | | | | | | | | | The original codes misused recvbuf in source buffer instead of sendbuf, and read from incorrect offset 14 instead of 22. Signed-off-by: Che-Liang Chiou <clchiou@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Che-Liang Chiou <clchiou@chromium.org>
* sandbox: tpm: Add TPM emulationSimon Glass2014-01-081-0/+262
Add a simple TPM emulator for sandbox. It only supports a small subset of TPM operations. However, these are enough to perform common tasks. Note this is an initial commit to get this working, but it could use cleaning up (for example constants instead of open-coded values). Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud