#ifndef __EM_VERSION_H
#define __EM_VERSION_H

/*
 * =====================================================================================
 *
 *       Filename:  em_version.h
 *
 *    Description:  version management.
 *
 *         Author:  Daehoon Ko   (), d14.ko@samsung.com
 *
 * Collaborator#1:  Gimin Kim    (), gimin1224.kim@samsung.com
 *
 * Collaborator#2:  Dongpyo Yang (), dongpyo.yang@samsung.com
 *
 *        Company:  Samsung Electronics
 *
 *        Copyright (c) 2020 by Samsung Electronics, All rights reserved.
 *
 * =====================================================================================
 *
 * =====================================================================================
 * Version history.
 *
 * 30.0.0  - (20.08.25) [SWD] Initial commit(Support R OS)
 * 30.0.1  - (20.08.26) [SWD] Fix check provisioning return value
 *                            Add logic about checking core all zero
 * 30.0.2  - (20.08.31) [SWD] Fix return value of rpmb read function (Qualcomm)
 * 30.0.3  - (20.08.31) [SWD] Recovery error because parameter of making key function isn't normal
 * 30.0.4  - (20.08.31) [SWD] Add 'System' permission for Qualcomm
 * 30.0.5  - (20.09.02) [SWD] If esi isn't updated, return success without flag
 * 30.0.6  - (20.09.07) [SWD] Error value is duplicated
 * 30.0.7  - (20.09.07) [SWD] Add flag for recovery esi
 * 30.0.8  - (20.09.08) [SWD] Fixed logic coverting 'string UID' to 'integer UID'
 * 30.0.9  - (20.09.09) [SWD] Add missing file for 30.0.7
 * 30.0.10 - (20.09.16) [SWD] Enable kernel log for qualcomm
 * 30.0.11 - (20.09.28) [SWD] Change sign_run_type of engmode TA
 * 30.0.12 - (20.10.19) [SWD] Add condition for esi remove
 * 30.0.13 - (20.10.20) [SWD] Add kernel log for debugging
 * 30.0.14 - (20.10.20) [SWD] 1. Add logic to restore ESI using recovery counter in BL.
 *                            2. Change to sharing state only from emservice
 *                            3. Add logic to change DID
 *                            4. prevent issue
 *                            5. bootloader build error
 * 30.0.15 - (20.10.20) [SWD] Fix return value of get modes bit function (if mode is more than 32, incorrect value is returned)
 * 30.0.16 - (20.10.20) [SWD] DID of ESI isn't updated when DID is updated in BL
 * 30.0.17 - (20.10.21) [SWD] Support AT+ENGMODES=0,0,3,0 (Delete token - offline)
 * 30.0.18 - (20.10.21) [SWD] 1. Prevent issue
 *                            2. issue : token id is mismatched when fac token is installed
 *                            3. token isn't recognized when the DID is changed via em get modes bit
 * 30.0.19 - (20.10.23) [SWD] Support init core
 * 30.0.20 - (20.10.23) [SWD] 1. Apply EM TSTATE property
 *                            2. incorrect Get modes bit value
 * 30.0.21 - (20.10.23) [SWD] Prevent issue(critical)
 * 30.0.22 - (20.10.26) [SWD] Prevent issue(major)
 * 30.0.23 - (20.11.02) [SWD] Re-arrange codes for LSI LK
 * 30.0.24 - (20.11.02) [SWD] prevent issue (BL)
 * 30.0.25 - (20.11.02) [SWD] Fixed build error on R-OS QC projects
 * 30.0.26 - (20.11.02) [SWD] To prevent integer overflow when parsing token information
 * 30.0.27 - (20.11.02) [SWD] Change the context for parameters of all commands
 * 30.0.28 - (20.11.03) [SWD] Modify code by LSI LK checkpatch rule
 * 30.0.29 - (20.11.03) [SWD] Kinibi TA porting(9810)
 * 30.0.30 - (20.11.04) [SWD] For prevent overflow
 * 30.0.31 - (20.11.04) [SWD] Add missing files for 30.0.30
 * 30.0.32 - (20.11.04) [SWD] Reduce unnecessary writing esi
 *                            (When tuc table isn't updated, em data(esi, core) won't be updated)
 * 30.0.33 - (20.11.04) [SWD] prevent issue (BL)
 * 30.0.34 - (20.11.05) [SWD] Add new command to FILE type token names of installed token.
 * 30.0.35 - (20.11.05) [SWD] Add new command to get infomation of token
 * 30.0.36 - (20.11.09) [SWD] Add the debugging log for BL
 * 30.0.37 - (20.11.10) [SWD] Set dafult model and issuer whitin EM_CMD_GET_INFO's response
 * 30.0.38 - (20.11.10) [SWD] prevent issue (BL)
 * 30.0.39 - (20.11.10) [SWD] Fix checkpatch issue (LSI BL)
 * 30.0.40 - (20.11.10) [SWD] Change the error value of the ESS command
 * 30.0.41 - (20.11.11) [SWD] Delete unuse define value
 * 30.1.00 - (20.11.11) [SWD] Write em core after all operations are done
 * 30.2.00 - (20.11.11) [SWD] Fixed recovery error when RPMB is not provisioned
 * 30.2.01 - (20.11.13) [SWD] Fixed checkpatch issue (LSI BL)
 *                            Fixed some bugs on bootloader
 * 30.2.02 - (20.11.16) [SWD] Not set esi version on em_token_get_status
 * 30.2.03 - (20.11.16) [SWD] If server tuc == 0 && this mode isn't related to tuc,
 *                            then application can't recognized tuc of this mode
 * 30.2.04 - (20.11.17) [SWD] Memory leak when free esi item
 * 30.2.05 - (20.11.17) [SWD] Not set RETURN_TOKEN_REMOVE flag when parsing token is failed
 * 30.2.06 - (20.11.17) [SWD] Fix low/major prevent issue
 * 30.3.00 - (20.11.19) [SWD] 1. Added local variable to pass paremeter for LSI BL
 *                            2. Not check TUC if NO_COUNT flag is set (bug fix)
 *                            3. Add EM_TYPE_ESI_ITEM_RECOVERY_COUNTER_BL for recovering ESI by BL
 *                            4. Delete the logic clearing IIN in the ESI from the SHARED status (bug fix)
 *                            5. Increase size of buffer of priority date (9 -> 26)
 * 30.3.01 - (20.11.19) [SWD] 1. Fix checkpath issue(LSI BL)
 *                            2. Not set RETURN_TOKEN_REMOVE flag setting or getting expiry date without token
 * 30.3.02 - (20.11.20) [SWD] Enable engmode TA for MTK
 * 30.3.03 - (20.11.24) [SWD] Changed correct LTI type for recoverying ESI
 * 30.3.04 - (20.11.24) [SWD] ADD ESI meta check logic
 * 30.3.05 - (20.11.25) [SWD] Support lsec tok feature
 * 30.3.06 - (20.11.25) [SWD] Add LTS flag logic for BL
 * 30.3.07 - (20.11.25) [SWD] Change to MTK RPMB USER ID (9->10)
 * 30.3.08 - (20.11.30) [SWD] Update RPMB static lib for MTK
 * 30.3.09 - (20.12.02) [SWD] Arrange the code
 * 30.3.10 - (20.12.02) [SWD] Add log for analysis
 * 30.3.11 - (20.12.07) [SWD] MTK patch(Change to rpmb static lib)
 * 30.3.12 - (20.12.08) [SWD] MTK patch(Change to rpmb static lib)
 * 30.3.13 - (20.12.08) [SWD] MTK patch(Change to rpmb static lib)
 * 30.3.14 - (20.12.15) [SWD] MTK patch(Add to rpmb static lib for A32 LTE)
 * 30.3.15 - (20.12.23) [SWD] Store core data backup on RPMB
 * 30.4.00 - (21.01.06) [SWD] Refactoring codes (Remove alignment(1) of the structure)
 * 30.4.01 - (21.01.08) [SWD] Add the core init flag
 * 30.4.02 - (21.01.13) [SWD] 1. Add the shared esi counter item in ESI
 *                            2. Add init flag in core if init flag isn't set in core
 * 30.5.00 - (21.01.13) [SWD] Enhanced EM Token Certificate Validation
 * 30.5.01 - (21.01.15) [SWD] Enhanced EM Token Certificate Validation-2
 * 30.5.02 - (21.01.18) [SWD] stack buffer overflow when printing char array without '\0'
 * 30.5.03 - (21.01.18) [SWD] EM ta porting for BSP build chipset(SDM670)
 * 30.5.04 - (21.02.05) [SWD] 1. Add new error code for Teegris RPMB driver unavailable (since Teegris 4.2)
 *                            2. Add sync count to improve debugging
 * 30.5.05 - (21.03.17) [SWD] Fixed the wrong response for no token device
 * 30.6.00 - (21.04.13) [SWD/DAEMON] Increase buffer max size for ENGMODES command (10K -> 50K)
 * 30.6.01 - (21.04.23) [SWD] Move em_client_manager to common code
 * 30.6.02 - (21.06.01) [SWD] Apply common scrypto lib of confidential (CL#21865329)
 * 30.6.03 - (21.06.01) [SWD(QSEE)] Add linkflag for deterministic QSEE TA build
 * 30.7.00 - (21.06.02) [SWD] Add information for Fraud Analysis
 * 30.8.00 - (21.06.08) [SWD/DAEMON] Support EM lite (Disable em core & esi)
 * 30.8.01 - (21.06.09) [SWD] Update did compare logic & EM LITE Write Token Flags
 * 30.8.02 - (21.06.14) [SWD] When network is connected, tuc will be recover by framework call
 * 30.8.03 - (21.08.20) [SWD] Support 'Remote Token Deletion'
 * 30.8.04 - (21.09.07) [SWD] EMLITE build error
 * 30.8.05 - (21.09.16) [SWD] Check incorrect did for debugging when DID isn't matched
 * 30.8.06 - (21.09.24) [SWD] Dev token is not allowed when calling get status
 * 30.8.07 - (21.10.06) [SWD] Change DID check logic
 * 30.8.08 - (21.10.27) [SWD] QSEE Kernel log to qsee log
 * 30.8.09 - (21.11.02) [SWD] Change checking priority flag when called get status
 * 30.8.10 - (21.11.15) [SWD] Moved token parsing logic
 * 30.8.11 - (21.11.15) [SWD] Apply TRQ0004
 * 30.8.12 - (21.11.24) [SWD] Prevent [STRING_NULL]
 * 30.8.13 - (21.11.29) [SWD] Prevent [STRING_NULL]
 * 30.8.14 - (21.12.01) [SWD] Improve returning message for at command
 * 30.8.15 - (21.12.23) [SWD] Add no need core flag for EM_CMD_SUPPORT_ESS_V1 and EM_CMD_INIT_CORE
 * 30.8.16 - (22.01.12) [SWD] Improve logic about DID update when RPMB isn't provisioned
 * 30.8.17 - (22.02.16) [SWD] Missing TRQ message data due to length check error.
 * 30.8.18 - (22.02.21) [SWD] Add rpmb libary for MT6877
 * ============================================================================================================
 */

#define EM_MODULE_VERSION           "30.8.18"

#define EM_PROTOCOL_VERSION_20      "0002"
#define EM_PROTOCOL_VERSION_30      "0003"

#define EM_TA_RP 0

#endif
