Home
last modified time | relevance | path

Searched refs:tpm_msg (Results 1 – 5 of 5) sorted by relevance

/qemu/tests/qtest/
H A Dtpm-emu.c51 s->tpm_msg = g_new(struct tpm_hdr, 1); in tpm_emu_tpm_thread()
53 int minhlen = sizeof(s->tpm_msg->tag) + sizeof(s->tpm_msg->len); in tpm_emu_tpm_thread()
58 s->tpm_msg->tag = be16_to_cpu(s->tpm_msg->tag); in tpm_emu_tpm_thread()
59 s->tpm_msg->len = be32_to_cpu(s->tpm_msg->len); in tpm_emu_tpm_thread()
60 g_assert_cmpint(s->tpm_msg->len, >=, minhlen); in tpm_emu_tpm_thread()
62 s->tpm_msg = g_realloc(s->tpm_msg, s->tpm_msg->len); in tpm_emu_tpm_thread()
65 s->tpm_msg->code = be32_to_cpu(s->tpm_msg->code); in tpm_emu_tpm_thread()
77 s->tpm_msg->code = cpu_to_be32(TPM_FAIL); in tpm_emu_tpm_thread()
83 qio_channel_write(ioc, (char *)s->tpm_msg, be32_to_cpu(s->tpm_msg->len), in tpm_emu_tpm_thread()
88 g_free(s->tpm_msg); in tpm_emu_tpm_thread()
[all …]
H A Dtpm-crb-test.c110 struct tpm_hdr tpm_msg; in tpm_crb_test() local
111 memread(raddr, &tpm_msg, sizeof(tpm_msg)); in tpm_crb_test()
112 g_assert_cmpmem(&tpm_msg, sizeof(tpm_msg), s->tpm_msg, sizeof(*s->tpm_msg)); in tpm_crb_test()
H A Dtpm-tis-util.c435 uint8_t tpm_msg[sizeof(struct tpm_hdr)]; in tpm_tis_test_check_transmit() local
436 g_assert_cmpint(sizeof(tpm_msg), ==, bcount); in tpm_tis_test_check_transmit()
438 for (i = 0; i < sizeof(tpm_msg); i++) { in tpm_tis_test_check_transmit()
439 tpm_msg[i] = readb(TIS_REG(0, TPM_TIS_REG_DATA_FIFO)); in tpm_tis_test_check_transmit()
446 g_assert_cmpmem(tpm_msg, sizeof(tpm_msg), s->tpm_msg, sizeof(*s->tpm_msg)); in tpm_tis_test_check_transmit()
H A Dtpm-tis-i2c-test.c581 uint8_t tpm_msg[sizeof(struct tpm_hdr)]; in tpm_tis_i2c_test_check_transmit() local
582 g_assert_cmpint(sizeof(tpm_msg), ==, bcount); in tpm_tis_i2c_test_check_transmit()
584 for (i = 0; i < sizeof(tpm_msg); i++) { in tpm_tis_i2c_test_check_transmit()
585 tpm_msg[i] = tpm_tis_i2c_readb(0, TPM_I2C_REG_DATA_FIFO); in tpm_tis_i2c_test_check_transmit()
592 g_assert_cmpmem(tpm_msg, sizeof(tpm_msg), s->tpm_msg, sizeof(*s->tpm_msg)); in tpm_tis_i2c_test_check_transmit()
H A Dtpm-emu.h48 struct tpm_hdr *tpm_msg; member