blob: a851d9c4af2373cfbede182f1d2a80a9335d5770 [file] [log] [blame]
Miquel Raynal4c6759e2018-05-15 11:57:06 +02001/* 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
10void print_byte_string(u8 *data, size_t count);
11void *parse_byte_string(char *bytes, u8 *data, size_t *count_ptr);
12int report_return_code(int return_code);
13int type_string_get_num_values(const char *type_str);
14size_t type_string_get_space_size(const char *type_str);
15void *type_string_alloc(const char *type_str, u32 *count);
16int type_string_pack(const char *type_str, char * const values[], u8 *data);
17int type_string_write_vars(const char *type_str, u8 *data, char * const vars[]);
18int get_tpm(struct udevice **devp);
19
Philippe Reynescbe97392020-01-09 18:45:46 +010020int do_tpm_device(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
Miquel Raynal4c6759e2018-05-15 11:57:06 +020021int do_tpm_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
22int do_tpm_info(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
23int do_tpm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
24
25#endif /* __TPM_USER_UTILS_H */