/**
 * @file ta_prop_info.h
 * @brief Common header for TA properties structure declaration
 * @author a_borodov (a.borodov@samsung.com)
 * @version 0.1
 * @date Created Oct 14, 2014
 * @par In Samsung Ukraine R&D Center (SRK) under a contract between
 * @par LLC "Samsung Electronics Ukraine Company" (Kiev, Ukraine) and "Samsung Elecrtronics Co", Ltd (Seoul, Republic of Korea)
 * @par Copyright: (c) Samsung Electronics Co, Ltd 2013. All rights reserved.
**/

#ifndef TA_PROP_INFO_H_
#define TA_PROP_INFO_H_

#include <stdint.h>
#include <stdbool.h>

#include "uuid.h"

#define AUTHORITY_NAME_LEN  16
#define AUTHORITY_STR_LEN   (AUTHORITY_NAME_LEN + 1)

#define GPD_TA_VERSION_LEN 20
#define GPD_TA_DESCRIPTION_LEN 20
#define CA_DIG_LEN           32
#define CA_ID_LEN   (256)

#define TA_DBG_PMR_TEE_BLOCKED (-64)
#define TA_DBG_PMR_BLOCKED     0
#define TA_DBG_PMR_CODE_ONLY   32
#define TA_DBG_PMR_CODE_STATE  64
#define TA_DBG_PMR_HEAP_STACK  96
#define TA_DBG_PMR_ALL         112U

#define TA_DBG_DLM_TEE_BLOCKED (-64U)
#define TA_DBG_DLM_BLOCKED     0
#define TA_DBG_DLM_ALL         64

struct tainfo_packed {
    uuid_t uuid;
    bool singleInstance;
    bool multiSession;
    bool instanceKeepAlive;
    uint32_t dataSize;
    uint32_t stackSize;
    char version[GPD_TA_VERSION_LEN];
    char description[GPD_TA_DESCRIPTION_LEN];
    uint32_t thread_count; /* Number of threads (N) in a service depending on service type. */
    uint32_t numInstances; /* Number of simultaneously running instances */
    uint32_t threads_initial_prio; /* Initial priority for task threads */
    uint32_t threads_max_prio; /* Maximum priority for task threads */
    char ta_authority[AUTHORITY_STR_LEN]; /* Name of TA Authority */
    bool bFIPS_Mode_Enable; /* FIPS mode of CryptoCore library enable flag */
    uint32_t dbg_dlm_data_available;
    uint32_t dbg_pmr_data_available;
};

#endif /* TA_PROP_INFO_H_ */
