Hi David,
Thanks you for your reply.
I will try to activate the interrupts on my TPM when I have time.
Thanks again,
François
You are not logged in. Please login or register.
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
ReferenceswolfSSL - Embedded SSL Library → Posts by Aldebaran42
Pages 1
Hi David,
Thanks you for your reply.
I will try to activate the interrupts on my TPM when I have time.
Thanks again,
François
Hi,
I’m trying to understand how the interrupt system work in TPM. The specification seems to me a bit confusing on this subject and during some of my tests using WolfTPM native test I observed a lot of polling.
To keep things simple let’s say I want to generate random numbers and get an interrupt when these are available.
Is there a simple way using WolfTPM to be able to enable this type of interrupt for a command and then disable it to switch back to polling for the next command?
Is there a particular register in the TPM to allow such interruptions to be requested?
I use ST TPMs (ST33TP SPI TPM2) communicating in SPI.
Thanks in advance,
François
Hi David,
Thank you very much for your reply!
It seems that the method I was using to log the SPI frames was causing some latencies on the bus and inducing wait states. The command `./configure --enable-debug=io ` made the ready bytes from the SPI wait states disappeared.
Thanks again,
François
Hello,
I’m using WolfTPM, with a raspberry pi and an ST ST33TP SPI TPM2 in order to understand TPM at a low level. I use the native test example here to spy on the SPI bus and understand the frame format. This is what I get for GetRandom :
/* Get Random */
/* E4 e2 51 65 6c 39 9a 8e d4 14 94 ee 19 3c 25 bf 60 77 e0 36 cf d6 57 96 f b8 dc f4 fb b9 e6 88 */
MOSI: 80 d4 0 18 80 0
MISO: 0 0 0 0 1 84
MOSI: 0 d4 0 18 0 0 0 40
MISO: 0 0 0 0 0 0 1 ff
MOSI: 80 d4 0 18 80 0
MISO: 0 0 0 0 1 c4
MOSI: b d4 0 24 b b b 80 1 0 0 0 c 0 0 1 7b 0 20
MISO: 0 0 0 0 0 0 1 ff ff ff ff ff ff ff ff ff ff ff ff
MOSI: 0 d4 0 18 0 0 0 20
MISO: 0 0 0 0 0 0 1 ff
MOSI: 80 d4 0 18 80 0
MISO: 0 0 0 0 1 94
MOSI: 89 d4 0 24 89 0 0 0 0 0 0 0 0 0 0
MISO: 0 0 0 0 1 80 1 0 0 0 2c 0 0 0 0
MOSI: 80 d4 0 18 80 0
MISO: 0 0 0 0 1 94
MOSI: 9f d4 0 24 9f 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
MISO: 0 0 0 0 1 0 20 dc f6 e9 eb fe a 74 e1 7a 92 ac e7 ad 73 b9 33 2b a8 4c 6 94 cf a7 4f 40 c3 3 d4 a3 99
MOSI: 80 d4 0 18 80 0
MISO: 0 0 0 0 1 94
MOSI: 81 d4 0 24 81 0 0
MISO: 0 0 0 0 1 f2 d
MOSI: 0 d4 0 18 0 0 0 40
MISO: 0 0 0 0 0 0 1 ff
I can understand the dialogue between the TPM and the raspberry quite well except one thing.
When the command is written to the register 24 (TPM_DATA_FIFO), why is the first byte repeated 3 times after the address bytes? Is this some kind of padding / bit stuffing?
MOSI: b d4 0 24 b b b 80 1 0 0 0 c 0 0 1 7b 0 20
Same thing with the other registers, except that this time the repetition is unique.
MOSI: 80 d4 0 18 80 0
This pattern is present on all the commands I observed. I then created a simple script rewriting the GetRandom command to /dev/spidev0.0 replacing the repeated bytes by 0. I then obtained the same results. Did I miss something? These repetitions seems useless to me.
Thanks in advance,
François
Pages 1
wolfSSL - Embedded SSL Library → Posts by Aldebaran42
Powered by PunBB, supported by Informer Technologies, Inc.
Generated in 0.015 seconds (95% PHP - 5% DB) with 5 queries