xref: /openbmc/u-boot/include/tee/optee_ta_avb.h (revision b9553986)
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /* Copyright (c) 2018, Linaro Limited */
3 
4 #ifndef __TA_AVB_H
5 #define __TA_AVB_H
6 
7 #define TA_AVB_UUID { 0x023f8f1a, 0x292a, 0x432b, \
8 		      { 0x8f, 0xc4, 0xde, 0x84, 0x71, 0x35, 0x80, 0x67 } }
9 
10 #define TA_AVB_MAX_ROLLBACK_LOCATIONS	256
11 
12 /*
13  * Gets the rollback index corresponding to the given rollback index slot.
14  *
15  * in	params[0].value.a:	rollback index slot
16  * out	params[1].value.a:	upper 32 bits of rollback index
17  * out	params[1].value.b:	lower 32 bits of rollback index
18  */
19 #define TA_AVB_CMD_READ_ROLLBACK_INDEX	0
20 
21 /*
22  * Updates the rollback index corresponding to the given rollback index slot.
23  *
24  * Will refuse to update a slot with a lower value.
25  *
26  * in	params[0].value.a:	rollback index slot
27  * in	params[1].value.a:	upper 32 bits of rollback index
28  * in	params[1].value.b:	lower 32 bits of rollback index
29  */
30 #define TA_AVB_CMD_WRITE_ROLLBACK_INDEX	1
31 
32 /*
33  * Gets the lock state of the device.
34  *
35  * out	params[0].value.a:	lock state
36  */
37 #define TA_AVB_CMD_READ_LOCK_STATE	2
38 
39 /*
40  * Sets the lock state of the device.
41  *
42  * If the lock state is changed all rollback slots will be reset to 0
43  *
44  * in	params[0].value.a:	lock state
45  */
46 #define TA_AVB_CMD_WRITE_LOCK_STATE	3
47 
48 #endif /* __TA_AVB_H */
49