#ifndef __VK_ERROR_H__
#define __VK_ERROR_H__

#if defined(VK_SWD_QSEE)
#define VK_ERR_BASE                     -10000
#elif defined(VK_SWD_KINIBI)
#define VK_ERR_BASE                     -20000
#elif defined(VK_SWD_TEEGRIS)
#define VK_ERR_BASE                     -30000
#else
#define VK_ERR_BASE                     0
#endif

#define VK_SUCCESS                      0
#define VK_ERR_GENERAL                  VK_ERR_BASE - 1
#define VK_ERR_INVALID_ARGUMENT         VK_ERR_BASE - 2
#define VK_ERR_ALLOCATE_MEMORY          VK_ERR_BASE - 3
#define VK_ERR_PERMISSION_DENIED        VK_ERR_BASE - 4
#define VK_ERR_BUFFER_ALL_ZERO          VK_ERR_BASE - 5
#define VK_ERR_PARSING                  VK_ERR_BASE - 6
#define VK_ERR_TZ_API                   VK_ERR_BASE - 7
#define VK_ERR_TZ_API_FUSE              VK_ERR_BASE - 8
#define VK_ERR_TZ_API_CRYPTO            VK_ERR_BASE - 9
#define VK_ERR_TZ_API_RPMB              VK_ERR_BASE - 10
#define VK_ERR_TZ_API_PERSISTENT        VK_ERR_BASE - 11
#define VK_ERR_TZ_API_KEY               VK_ERR_BASE - 12
#define VK_ERR_READ_VAULT               VK_ERR_BASE - 13
#define VK_ERR_WRITE_VAULT              VK_ERR_BASE - 14
#define VK_ERR_READ_VTAB                VK_ERR_BASE - 15
#define VK_ERR_READ_NONCE               VK_ERR_BASE - 16
#define VK_ERR_WRITE_NONCE              VK_ERR_BASE - 17
#define VK_ERR_CLIENT_NOT_INITIALIZED   VK_ERR_BASE - 18
#define VK_ERR_INTEGRITY_FAILED         VK_ERR_BASE - 19
#define VK_ERR_MISMATCH_HMAC            VK_ERR_BASE - 20
#define VK_ERR_VERIFY_CERT_CHAIN        VK_ERR_BASE - 21
#define VK_ERR_VERIFY_SIGNATURE         VK_ERR_BASE - 22
#define VK_ERR_CRYPTO_ENCRYPT           VK_ERR_BASE - 23
#define VK_ERR_CRYPTO_DECRYPT           VK_ERR_BASE - 24
#define VK_ERR_WRAP_UNWRAP_OBJECT       VK_ERR_BASE - 25
#define VK_ERR_RPMB_OPERATION           VK_ERR_BASE - 26
#define VK_ERR_RPMB_KEY_PROV            VK_ERR_BASE - 27
#define VK_ERR_SECURE_BOOT_DISABLED     VK_ERR_BASE - 28
#define VK_ERR_WRITE_PROTECTED          VK_ERR_BASE - 29
#define VK_ERR_MISMATCH_HOTP            VK_ERR_BASE - 30
#define VK_ERR_FATAL_VAULT              VK_ERR_BASE - 31
#define VK_ERR_SERVICE_TAMPERED         VK_ERR_BASE - 32

#endif // __VK_ERROR_H__
