Lines Matching refs:argv
242 int argc, char * const argv[]) in do_tpm_startup() argument
248 if (!strcasecmp("TPM_ST_CLEAR", argv[1])) { in do_tpm_startup()
250 } else if (!strcasecmp("TPM_ST_STATE", argv[1])) { in do_tpm_startup()
252 } else if (!strcasecmp("TPM_ST_DEACTIVATED", argv[1])) { in do_tpm_startup()
255 printf("Couldn't recognize mode string: %s\n", argv[1]); in do_tpm_startup()
263 int argc, char * const argv[]) in do_tpm_nv_define_space() argument
269 index = simple_strtoul(argv[1], NULL, 0); in do_tpm_nv_define_space()
270 perm = simple_strtoul(argv[2], NULL, 0); in do_tpm_nv_define_space()
271 size = simple_strtoul(argv[3], NULL, 0); in do_tpm_nv_define_space()
277 int argc, char * const argv[]) in do_tpm_nv_read_value() argument
284 index = simple_strtoul(argv[1], NULL, 0); in do_tpm_nv_read_value()
285 data = (void *)simple_strtoul(argv[2], NULL, 0); in do_tpm_nv_read_value()
286 count = simple_strtoul(argv[3], NULL, 0); in do_tpm_nv_read_value()
298 int argc, char * const argv[]) in do_tpm_nv_write_value() argument
306 index = simple_strtoul(argv[1], NULL, 0); in do_tpm_nv_write_value()
307 data = parse_byte_string(argv[2], NULL, &count); in do_tpm_nv_write_value()
309 printf("Couldn't parse byte string %s\n", argv[2]); in do_tpm_nv_write_value()
320 int argc, char * const argv[]) in do_tpm_extend() argument
327 index = simple_strtoul(argv[1], NULL, 0); in do_tpm_extend()
328 if (!parse_byte_string(argv[2], in_digest, NULL)) { in do_tpm_extend()
329 printf("Couldn't parse byte string %s\n", argv[2]); in do_tpm_extend()
343 int argc, char * const argv[]) in do_tpm_pcr_read() argument
350 index = simple_strtoul(argv[1], NULL, 0); in do_tpm_pcr_read()
351 data = (void *)simple_strtoul(argv[2], NULL, 0); in do_tpm_pcr_read()
352 count = simple_strtoul(argv[3], NULL, 0); in do_tpm_pcr_read()
364 int argc, char * const argv[]) in do_tpm_tsc_physical_presence() argument
370 presence = (uint16_t)simple_strtoul(argv[1], NULL, 0); in do_tpm_tsc_physical_presence()
376 int argc, char * const argv[]) in do_tpm_read_pubek() argument
383 data = (void *)simple_strtoul(argv[1], NULL, 0); in do_tpm_read_pubek()
384 count = simple_strtoul(argv[2], NULL, 0); in do_tpm_read_pubek()
396 int argc, char * const argv[]) in do_tpm_physical_set_deactivated() argument
402 state = (uint8_t)simple_strtoul(argv[1], NULL, 0); in do_tpm_physical_set_deactivated()
408 int argc, char * const argv[]) in do_tpm_get_capability() argument
416 cap_area = simple_strtoul(argv[1], NULL, 0); in do_tpm_get_capability()
417 sub_cap = simple_strtoul(argv[2], NULL, 0); in do_tpm_get_capability()
418 cap = (void *)simple_strtoul(argv[3], NULL, 0); in do_tpm_get_capability()
419 count = simple_strtoul(argv[4], NULL, 0); in do_tpm_get_capability()
432 int argc, char * const argv[]) \
460 char *const argv[]) in do_tpm_info() argument
480 int argc, char * const argv[]) in do_tpm_raw_transfer() argument
488 command = parse_byte_string(argv[1], NULL, &count); in do_tpm_raw_transfer()
490 printf("Couldn't parse byte string %s\n", argv[1]); in do_tpm_raw_transfer()
509 int argc, char * const argv[]) in do_tpm_nv_define() argument
515 size = type_string_get_space_size(argv[1]); in do_tpm_nv_define()
520 index = simple_strtoul(argv[2], NULL, 0); in do_tpm_nv_define()
521 perm = simple_strtoul(argv[3], NULL, 0); in do_tpm_nv_define()
527 int argc, char * const argv[]) in do_tpm_nv_read() argument
534 if (argc != 3 + type_string_get_num_values(argv[1])) in do_tpm_nv_read()
536 index = simple_strtoul(argv[2], NULL, 0); in do_tpm_nv_read()
537 data = type_string_alloc(argv[1], &count); in do_tpm_nv_read()
545 if (type_string_write_vars(argv[1], data, argv + 3)) { in do_tpm_nv_read()
556 int argc, char * const argv[]) in do_tpm_nv_write() argument
563 if (argc != 3 + type_string_get_num_values(argv[1])) in do_tpm_nv_write()
565 index = simple_strtoul(argv[2], NULL, 0); in do_tpm_nv_write()
566 data = type_string_alloc(argv[1], &count); in do_tpm_nv_write()
571 if (type_string_pack(argv[1], argv + 3, data)) { in do_tpm_nv_write()
586 int argc, char * const argv[]) in do_tpm_oiap() argument
597 const argv[]) in do_tpm_load_key_by_sha1() argument
608 parse_byte_string(argv[1], parent_hash, NULL); in do_tpm_load_key_by_sha1()
609 key = (void *)simple_strtoul(argv[2], NULL, 0); in do_tpm_load_key_by_sha1()
610 key_len = simple_strtoul(argv[3], NULL, 0); in do_tpm_load_key_by_sha1()
611 if (strlen(argv[4]) != 2 * DIGEST_LENGTH) in do_tpm_load_key_by_sha1()
613 parse_byte_string(argv[4], usage_auth, NULL); in do_tpm_load_key_by_sha1()
635 int argc, char * const argv[]) in do_tpm_load_key2_oiap() argument
644 parent_handle = simple_strtoul(argv[1], NULL, 0); in do_tpm_load_key2_oiap()
645 key = (void *)simple_strtoul(argv[2], NULL, 0); in do_tpm_load_key2_oiap()
646 key_len = simple_strtoul(argv[3], NULL, 0); in do_tpm_load_key2_oiap()
647 if (strlen(argv[4]) != 2 * DIGEST_LENGTH) in do_tpm_load_key2_oiap()
649 parse_byte_string(argv[4], usage_auth, NULL); in do_tpm_load_key2_oiap()
660 int argc, char * const argv[]) in do_tpm_get_pub_key_oiap() argument
670 key_handle = simple_strtoul(argv[1], NULL, 0); in do_tpm_get_pub_key_oiap()
671 if (strlen(argv[2]) != 2 * DIGEST_LENGTH) in do_tpm_get_pub_key_oiap()
673 parse_byte_string(argv[2], usage_auth, NULL); in do_tpm_get_pub_key_oiap()
690 char * const argv[]) in TPM_COMMAND_NO_ARG()
697 if (!strcasecmp(argv[1], "key")) in TPM_COMMAND_NO_ARG()
699 else if (!strcasecmp(argv[1], "auth")) in TPM_COMMAND_NO_ARG()
701 else if (!strcasecmp(argv[1], "hash")) in TPM_COMMAND_NO_ARG()
703 else if (!strcasecmp(argv[1], "trans")) in TPM_COMMAND_NO_ARG()
705 else if (!strcasecmp(argv[1], "context")) in TPM_COMMAND_NO_ARG()
707 else if (!strcasecmp(argv[1], "counter")) in TPM_COMMAND_NO_ARG()
709 else if (!strcasecmp(argv[1], "delegate")) in TPM_COMMAND_NO_ARG()
711 else if (!strcasecmp(argv[1], "daa_tpm")) in TPM_COMMAND_NO_ARG()
713 else if (!strcasecmp(argv[1], "daa_v0")) in TPM_COMMAND_NO_ARG()
715 else if (!strcasecmp(argv[1], "daa_v1")) in TPM_COMMAND_NO_ARG()
719 printf("Resource type %s unknown.\n", argv[1]); in TPM_COMMAND_NO_ARG()
723 if (!strcasecmp(argv[2], "all")) { in TPM_COMMAND_NO_ARG()
742 uint32_t handle = simple_strtoul(argv[2], NULL, 0); in TPM_COMMAND_NO_ARG()
745 printf("Illegal resource handle %s\n", argv[2]); in TPM_COMMAND_NO_ARG()
757 char * const argv[]) in do_tpm_list() argument
769 if (!strcasecmp(argv[1], "key")) in do_tpm_list()
771 else if (!strcasecmp(argv[1], "auth")) in do_tpm_list()
773 else if (!strcasecmp(argv[1], "hash")) in do_tpm_list()
775 else if (!strcasecmp(argv[1], "trans")) in do_tpm_list()
777 else if (!strcasecmp(argv[1], "context")) in do_tpm_list()
779 else if (!strcasecmp(argv[1], "counter")) in do_tpm_list()
781 else if (!strcasecmp(argv[1], "delegate")) in do_tpm_list()
783 else if (!strcasecmp(argv[1], "daa_tpm")) in do_tpm_list()
785 else if (!strcasecmp(argv[1], "daa_v0")) in do_tpm_list()
787 else if (!strcasecmp(argv[1], "daa_v1")) in do_tpm_list()
791 printf("Resource type %s unknown.\n", argv[1]); in do_tpm_list()
805 printf("Resources of type %s (%02x):\n", argv[1], type); in do_tpm_list()
886 static int do_tpm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) in do_tpm() argument
892 tpm_cmd = find_cmd_tbl(argv[1], tpm_commands, ARRAY_SIZE(tpm_commands)); in do_tpm()
896 return tpm_cmd->cmd(cmdtp, flag, argc - 1, argv + 1); in do_tpm()