xref: /netbsd-src/crypto/external/cpl/trousers/dist/doc/TSS_programming_SNAFUs.txt (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1
2Tspi_TPM_GetEvents
3
4  Events in the TCS event log are 0 indexed.  So, a call such as:
5
6	UINT32 five = 5;
7	Tspi_TPM_GetEvents(hTPM, ulPcrIndex, 1, &five, &prgbPcrEvents);
8
9  will get you 5 events (assuming at least 6 events have happened on the PCR) which
10  will be the 2nd through 6th events on the PCR. (Since the 1st event is at index 0).
11  This is probably what you want:
12
13	UINT32 five = 5;
14	Tspi_TPM_GetEvents(hTPM, ulPcrIndex, 0, &five, &prgbPcrEvents);
15
16