mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 14:08:45 +00:00
sandbox: tpm: Fix nvwrite command
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>
This commit is contained in:
parent
b88eb329ce
commit
2c30af8f18
1 changed files with 1 additions and 3 deletions
|
@ -190,9 +190,7 @@ int tis_sendrecv(const u8 *sendbuf, size_t send_size,
|
|||
if (seq < 0)
|
||||
return -1;
|
||||
printf("tpm: nvwrite index=%#02x, len=%#02x\n", index, length);
|
||||
memcpy(&tpm->nvdata[seq],
|
||||
recvbuf + TPM_RESPONSE_HEADER_LENGTH + sizeof(uint32_t),
|
||||
length);
|
||||
memcpy(&tpm->nvdata[seq], sendbuf + 22, length);
|
||||
*recv_len = 12;
|
||||
memset(recvbuf, '\0', *recv_len);
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue