mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-26 07:17:10 +00:00
tpm: Correct the permissions command in TPMv1
The offset here is incorrect. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
a557d258c6
commit
a0f3804a42
1 changed files with 3 additions and 2 deletions
|
@ -456,12 +456,13 @@ u32 tpm1_get_permissions(struct udevice *dev, u32 index, u32 *perm)
|
||||||
0x0, 0x0, 0x0, 0x4,
|
0x0, 0x0, 0x0, 0x4,
|
||||||
};
|
};
|
||||||
const size_t index_offset = 18;
|
const size_t index_offset = 18;
|
||||||
const size_t perm_offset = 60;
|
const size_t perm_offset = 74;
|
||||||
u8 buf[COMMAND_BUFFER_SIZE], response[COMMAND_BUFFER_SIZE];
|
u8 buf[COMMAND_BUFFER_SIZE], response[COMMAND_BUFFER_SIZE];
|
||||||
size_t response_length = sizeof(response);
|
size_t response_length = sizeof(response);
|
||||||
u32 err;
|
u32 err;
|
||||||
|
|
||||||
if (pack_byte_string(buf, sizeof(buf), "d", 0, command, sizeof(command),
|
if (pack_byte_string(buf, sizeof(buf), "sd",
|
||||||
|
0, command, sizeof(command),
|
||||||
index_offset, index))
|
index_offset, index))
|
||||||
return TPM_LIB_ERROR;
|
return TPM_LIB_ERROR;
|
||||||
err = tpm_sendrecv_command(dev, buf, response, &response_length);
|
err = tpm_sendrecv_command(dev, buf, response, &response_length);
|
||||||
|
|
Loading…
Add table
Reference in a new issue