blob: 8564ababf35adf0aec768c8e9924b2ab75e7922a [file] [log] [blame]
Miquel Raynalff322452018-05-15 11:57:08 +02001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (c) 2018 Bootlin
4 * Author: Miquel Raynal <miquel.raynal@bootlin.com>
5 */
6
7#include <common.h>
8#include <dm.h>
9#include <log.h>
10#include <tpm-common.h>
11#include <tpm-v2.h>
12#include "tpm-user-utils.h"
13
14static cmd_tbl_t tpm2_commands[] = {
15 U_BOOT_CMD_MKENT(info, 0, 1, do_tpm_info, "", ""),
16 U_BOOT_CMD_MKENT(init, 0, 1, do_tpm_init, "", ""),
17};
18
19cmd_tbl_t *get_tpm_commands(unsigned int *size)
20{
21 *size = ARRAY_SIZE(tpm2_commands);
22
23 return tpm2_commands;
24}
25
26U_BOOT_CMD(tpm, CONFIG_SYS_MAXARGS, 1, do_tpm, "Issue a TPMv2.x command",
27"<command> [<arguments>]\n"
28"\n"
29"info\n"
30" Show information about the TPM.\n"
31"init\n"
32" Initialize the software stack. Always the first command to issue.\n"
33);