Miquel Raynal | 4c6759e | 2018-05-15 11:57:06 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (c) 2013 The Chromium OS Authors. |
| 4 | * Coypright (c) 2013 Guntermann & Drunck GmbH |
| 5 | */ |
| 6 | |
| 7 | #ifndef __TPM_USER_UTILS_H |
| 8 | #define __TPM_USER_UTILS_H |
| 9 | |
| 10 | void print_byte_string(u8 *data, size_t count); |
| 11 | void *parse_byte_string(char *bytes, u8 *data, size_t *count_ptr); |
| 12 | int report_return_code(int return_code); |
| 13 | int type_string_get_num_values(const char *type_str); |
| 14 | size_t type_string_get_space_size(const char *type_str); |
| 15 | void *type_string_alloc(const char *type_str, u32 *count); |
| 16 | int type_string_pack(const char *type_str, char * const values[], u8 *data); |
| 17 | int type_string_write_vars(const char *type_str, u8 *data, char * const vars[]); |
| 18 | int get_tpm(struct udevice **devp); |
| 19 | |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 20 | int do_tpm_device(struct cmd_tbl *cmdtp, int flag, int argc, |
| 21 | char *const argv[]); |
| 22 | int do_tpm_init(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
Ilias Apalodimas | 3be8926 | 2023-06-07 12:18:10 +0300 | [diff] [blame] | 23 | int do_tpm_autostart(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 24 | int do_tpm_info(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
Simon Glass | 11a075c | 2022-08-30 21:05:36 -0600 | [diff] [blame] | 25 | int do_tpm_report_state(struct cmd_tbl *cmdtp, int flag, int argc, |
| 26 | char *const argv[]); |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 27 | int do_tpm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
Miquel Raynal | 4c6759e | 2018-05-15 11:57:06 +0200 | [diff] [blame] | 28 | |
| 29 | #endif /* __TPM_USER_UTILS_H */ |