1 #ifndef NUGGET_AVB_H 2 #define NUGGET_AVB_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 enum { 9 AVB_NUM_SLOTS = 8, 10 AVB_METADATA_MAX_SIZE = 2048, 11 AVB_CHUNK_MAX_SIZE = 512, 12 AVB_DEVICE_DATA_SIZE = (256 / 8), 13 AVB_SIGNATURE_SIZE = 256, 14 }; 15 16 /* error codes specific to this application */ 17 enum { 18 19 /* The requested operation can only be performed by the AP bootloader */ 20 APP_ERROR_AVB_BOOTLOADER = APP_SPECIFIC_ERROR + 0, 21 22 /* The requested operation can only be performed by the HLOS */ 23 APP_ERROR_AVB_HLOS, 24 25 /* 26 * The requested operation is not allowed by the spec, for example trying to 27 * lock something that's already locked. This is different from 28 * APP_ERROR_BOGUS_ARGS, which is used for out-of-bounds indices, etc.. 29 */ 30 APP_ERROR_AVB_DENIED, 31 32 /* Authorization failure for operations that require it */ 33 APP_ERROR_AVB_AUTHORIZATION, 34 }; 35 36 #ifdef __cplusplus 37 } 38 #endif 39 40 #endif 41