;;=======================  Security API ====================================
{SetMsgColor = MAGENTA}
;;============CryptoLibrary============
94 01,	  "      BASE FW  LIB (%0Ad ms), Crypto_GetEntropy(), Length=0x%08X", 4 4
94 02,	  "      BASE FW  LIB (%0Ad ms), Crypto_GetNoise(), Length=0x%08X", 4 4
94 03,	  "      BASE FW  LIB (%0Ad ms), Crypto_GenerateNDRBG(), Length=0x%08X", 4 4
94 04,	  "      BASE FW  LIB (%0Ad ms), Crypto_GenerateDRBG(), Length=0x%08X, PredictionResistance=0x%04X", 4 4 2
94 05,	  "      BASE FW  LIB (%0Ad ms), Crypto_ReSeedDRBG()", 4
94 06,	  "      BASE FW  LIB (%0Ad ms), Crypto_InstantiateDRBG()", 4
94 07,	  "      BASE FW  LIB (%0Ad ms), Crypto_GenKey() ", 4
94 08,	  "      BASE FW  LIB (%0Ad ms), GenKey Compare Error ", 4
94 09,	  "      BASE FW  LIB (%0Ad ms), Crypto_DeriveKey() ", 4
94 0A,	  "      BASE FW  LIB (%0Ad ms), Crypto_KDFCTR() ", 4
94 0B,	  "      BASE FW  LIB (%0Ad ms), Crypto_Hash() ", 4
94 0C,	  "      BASE FW  LIB (%0Ad ms), Crypto_Mac() ", 4
94 0D,	  "      BASE FW  LIB (%0Ad ms), Crypto_Decrypt() ", 4
94 0E,	  "      BASE FW  LIB (%0Ad ms), Crypto_Encrypt() ", 4
94 0F,	  "      BASE FW  LIB (%0Ad ms), Crypto_RsaVerify() ", 4

;;============Debug============
;;ATA Passthrough
C0 30,	  "      SecurityFW	  (%0Ad ms), Read_Buffer() , ATA_Buffer = 0x%04X 0x%04X 0x%04X 0x%04X.", 4 2 2 2 2

;;RPMB
C0 40,	  "      SecurityFW	  (%0Ad ms), RPMB Req_Buf = 0x%04X 0x%04X 0x%04X 0x%04X.", 4 2 2 2 2
C0 41,	  "      SecurityFW	  (%0Ad ms), RPMB Req_Buf = 0x%04X.", 4 2
C0 42,	  "      SecurityFW	  (%0Ad ms), RPMB Resp_Buf = 0x%04X 0x%04X 0x%04X 0x%04X.", 4 2 2 2 2
C0 43,	  "      SecurityFW	  (%0Ad ms), RPMB Resp_Buf = 0x%04X.", 4 2

;;SecurityFW---
C0 60,	  "      SecurityFW	  (%0Ad ms), SessionManager_Control_Method() , g32ErrorLocateBit = 0x%08X , g32ErrorLocateBit2 = 0x%08X.", 4 4 4
C0 61,	  "      SecurityFW	  (%0Ad ms), SecIntf_TCG_WriteProcess() , u32ByteOffset = 0x%08X , u32DesAddrInByte = 0x%08X.", 4 4 4
C0 62,	  "      SecurityFW	  (%0Ad ms), SecIntf_TCG_ReadDone() , u32ByteOffset = 0x%08X , u32SrcAddrInByte = 0x%08X.", 4 4 4
C0 63,	  "      SecurityFW	  (%0Ad ms), SecIntf_TCG_WriteProcess() , garSendTCGBuf = 0x%04X 0x%04X 0x%04X 0x%04X.", 4 2 2 2 2
C0 64,	  "      SecurityFW	  (%0Ad ms), SecIntf_TCG_ReadDone() , garRcvTCGBuf = 0x%04X 0x%04X 0x%04X 0x%04X.", 4 2 2 2 2
C0 65,	  "      SecurityFW	  (%0Ad ms), SendBuffer = %04X %04X %04X %04X.",4 2 2 2 2
C0 66,	  "      SecurityFW	  (%0Ad ms), ReceiveBuffer = %04X %04X %04X %04X.",4 2 2 2 2
C0 67,	  "      SecurityFW	  (%0Ad ms), GenTCGRangeKEK(): garTCGRangeKEK = %04X %04X %04X %04X.",4 2 2 2 2
C0 68,	  "      SecurityFW	  (%0Ad ms), LoadRangeKeySub() Failing: garTCGRangeKEK = %04X %04X %04X %04X.",4 2 2 2 2
C0 69,	  "      SecurityFW	  (%0Ad ms), TrustedSendProcess() Set Pin: garTCGRangeKEK = %04X %04X %04X %04X.",4 2 2 2 2

;;============SecurityFW===========
;; SecIntf_IfSendCmd/SecIntf_IfSendData 
C2 00,    "      SecurityFW	  (%0Ad ms), C_Invalid_Transfer_Length_IEEE1667.", 4
C2 01,	  "      SecurityFW	  (%0Ad ms), Returned value of SessionManagement(): uCmdStatus = 0x%04X.", 4 2
C2 02,	  "      SecurityFW	  (%0Ad ms), ProtocolID = 0x%04X , Silo Index = 0x%02X , Command ID = 0x%02X , g32HostXfrByte = 0x%08X.",4 2 1 1 4
C2 03,	  "      SecurityFW	  (%0Ad ms), ProtocolID = 0x%04X , COM ID = 0x%04X , g32HostXfrByte = 0x%08X.",4 2 2 4
C2 04,	  "      SecurityFW	  (%0Ad ms), SecIntf_SessionTimeoutCall(), u32TimerDiff = 0x%08Xms, u32MaxSessionTimeout = 0x%08Xms.", 4 4 4
C2 05,	  "      SecurityFW	  (%0Ad ms), SessionManagement() end.(TPer/Stack reset Abort) Status = 0x%04X.", 4 2
C2 06,	  "      SecurityFW	  (%0Ad ms), TrustedSendProcess() done. u16AuthenticationFailFlag = 0x%04X.", 4 2

;; SecIntf_IfRecvCmd/SecIntf_IfRecvComplete
C2 10,	  "      SecurityFW	  (%0Ad ms), C_IEEE_INVALID_POUTPIN_SEQUENCE_REJECTION.", 4 
C2 11,	  "      SecurityFW	  (%0Ad ms), ProtocolID = 0x%04X , Silo Index = 0x%02X , Command ID = 0x%02X , g32HostXfrByte = 0x%08X.", 4 2 1 1 4
C2 12,	  "      SecurityFW	  (%0Ad ms), ProtocolID = 0x%04X , COM ID = 0x%04X , g32HostXfrByte = 0x%08X.", 4 2 2 4
C2 13,	  "      SecurityFW	  (%0Ad ms), Invalid Com ID.", 4
C2 14,	  "      SecurityFW	  (%0Ad ms), IEEE Status code not zero. Status = 0x%04X.", 4 2
C2 15,	  "      SecurityFW	  (%0Ad ms), Invalid Security Protocol 0x%04X.", 4 2
C2 16,	  "      SecurityFW	  (%0Ad ms), Fatal Error!!!", 4
C2 17,	  "      SecurityFW	  (%0Ad ms), Handle Min Transfer for TCG. gMinTransferTrig = 0x%04X , g16MinTransfer = 0x%04X , g32HostXfrByte = 0x%08X.", 4 2 2 4
C2 18,	  "      SecurityFW	  (%0Ad ms), Handle Min Transfer for IEEE1667. g32IEEEPayloadLength = 0x%08X , g32HostXfrByte = 0x%08X.", 4 4 4

;;Others---
C2 20,	  "      SecurityFW	  (%0Ad ms), Invoking ID = %08X_%08X." 4 4 4
C2 21,	  "      SecurityFW	  (%0Ad ms), Method ID = %08X_%08X.", 4 4 4
C2 22,    "      SecurityFW	  (%0Ad ms), End of SessionManagement. Method Status = 0x%04X.", 4 2
C2 23,	  "      SecurityFW	  (%0Ad ms), CheckPinHash() fails. g32PmgrPinId = 0x%08X , gPayloadMethodId = 0x%04X.", 4 4 2
C2 24,	  "      SecurityFW	  (%0Ad ms), AUTHENTICATION. g32PayloadParamUint32_1 = %08X , gPayloadParamUint8_1 = 0x%04X.", 4 4 2
;;C2 25,	  "      SecurityFW	  (%0Ad ms), 
C2 26,    "      SecurityFW	  (%0Ad ms), GENKEY. gRangeID = 0x%04X.", 4 2
C2 27,	  "      SecurityFW	  (%0Ad ms), SET_PIN. gTakeOwnership = 0x%04X , g32PmgrLen = 0x%04X , g32PmgrPinId = %08X.", 4 2 2 4
C2 28,	  "      SecurityFW	  (%0Ad ms), B_PROCESS_REVERT-1. SecTmp_gTcgNviSpLockingLifeCycleState = 0x%04X , gTCGInTransaction = %04X , gPayloadMethodId = 0x%04X.", 4 2 2 2
C2 29,	  "      SecurityFW	  (%0Ad ms), B_PROCESS_REVERT-2. gPayloadParamUint8_1 = 0x%04X , g32PayloadParamUint32_1 = %08X.", 4 2 4 
C2 2A,	  "      SecurityFW	  (%0Ad ms), Check ComID, 0x%04X.", 4 2
C2 2B,	  "      SecurityFW	  (%0Ad ms), gPayloadSessionType = 0x%04X , gPayloadMethodId = 0x%04X.", 4 2 2
C2 2C,	  "      SecurityFW	  (%0Ad ms), gPayloadTokenType = 0x%04X.", 4 2
C2 2D,	  "      SecurityFW	  (%0Ad ms), gMethodStatus = 0x%04X , gSessionCurSp = 0x%02X , gPayLoadTableID(FW) = 0x%02X.", 4 2 1 1
C2 2E,	  "      SecurityFW	  (%0Ad ms), TPer/Stack Reset. gTCGTperReset = 0x%04X , gTCGLockingStatus = 0x%02X , gTCGStackReset = 0x%02X.", 4 2 1 1
C2 2F,	  "      SecurityFW	  (%0Ad ms), Locking Sp Activate.", 4
C2 30,	  "      SecurityFW	  (%0Ad ms), Set Locking Table--GlobalRange. Column = 0x%04X , Value = 0x%04X.", 4 2 2
C2 31,	  "      SecurityFW	  (%0Ad ms), Set Locking Table--LockingRange%04X. Range Start = 0x%08X.", 4 2 4
C2 32,	  "      SecurityFW	  (%0Ad ms), Set Locking Table--LockingRange%04X. Range Lenght = 0x%08X.", 4 2 4
C2 33,	  "      SecurityFW	  (%0Ad ms), Set Locking Table--LockingRange%04X. flag = 0x%02X , LockOnReset = 0x%02X.", 4 2 1 1
C2 34,	  "      SecurityFW	  (%0Ad ms), TrustedSendProcess() , g16PayloadProcessType = 0x%04X.", 4 2
C2 35,	  "      SecurityFW	  (%0Ad ms), TrustRecvProcess() , g16PayloadProcessType = 0x%04X , g16RangeChangeInTransactionFlag = 0x%04X , gTrimLockingRangeInTransaction = 0x%02X , gLockingRangeChangeInTransaction = 0x%02X", 4 2 2 1 1
C2 36,	  "      SecurityFW	  (%0Ad ms), TcgNviDefault() , u8KeepGlobalRangeKey = 0x%04X.", 4 2
C2 37,	  "      SecurityFW	  (%0Ad ms), SecIntf_NoticeBackupResume() - Backup Start, uAction = 0x%04X.", 4 2
C2 38,	  "      SecurityFW	  (%0Ad ms), SecIntf_NoticeBackupResume() - Backup End, uAction = 0x%04X.", 4 2
C2 39,	  "      SecurityFW	  (%0Ad ms), SecIntf_NoticeBackupResume() - Resume Start, uAction = 0x%04X.", 4 2
C2 3A,	  "      SecurityFW	  (%0Ad ms), SecIntf_NoticeBackupResume() - Resume End, uAction = 0x%04X.", 4 2
C2 3B,	  "      SecurityFW	  (%0Ad ms), SecIntf_InitStart() - Start, uMode = 0x%04X.", 4 2
C2 3C,	  "      SecurityFW	  (%0Ad ms), SecIntf_InitStart() - End, uMode = 0x%04X.", 4 2
C2 3D,	  "      SecurityFW	  (%0Ad ms), SID is taken ownership.", 4 
C2 3E,    "      SecurityFW	  (%0Ad ms), Load range key fail, uRangeId = 0x%04X.", 4 2
C2 3F,    "      SecurityFW	  (%0Ad ms), Receive Reset Event, uType = 0x%04X.", 4 2
C2 40,    "      SecurityFW	  (%0Ad ms), Decrypt MEK fails.", 4
C2 41,    "      SecurityFW	  (%0Ad ms), Set PSID and MSID failed - PSID and MSID are already set.", 4
C2 42,    "      SecurityFW	  (%0Ad ms), Set PSID and MSID failed - SP Life Cycle = Manufactured.", 4
C2 43,    "      SecurityFW	  (%0Ad ms), Set PSID and MSID failed - SID is taken ownership.", 4
C2 44,    "      SecurityFW	  (%0Ad ms), Decrypt Root Key fails.", 4
C2 45,	  "      SecurityFW	  (%0Ad ms), RestoreTCGRangeKEK() fails",4

;;ATA Security
C2 60,	  "      SecurityFW	  (%0Ad ms), ATA PassThrough, gProtocolID = 0x%04X, g16ComID = 0x%04X, status = 0x%04X.", 4 2 2 2
C2 61,	  "      SecurityFW	  (%0Ad ms), ATA Security Locked, Set/Disable Password fail.", 4
C2 62,	  "      SecurityFW	  (%0Ad ms), ATA Security Frozen, Unlock fail.", 4
C2 63,	  "      SecurityFW	  (%0Ad ms), ATA Security Frozen, Erase fail.", 4
C2 64,	  "      SecurityFW	  (%0Ad ms), ATA Security Locked, Freeze Lock fail.", 4
C2 65,	  "      SecurityFW	  (%0Ad ms), ATA Security-Erase Start.", 4
C2 66,	  "      SecurityFW	  (%0Ad ms), ATA Security-Erase End, Security Unlocked , Status = 0x%04X.", 4 2
C2 67,	  "      SecurityFW	  (%0Ad ms), ATA Security-Erase failed, Control = 0x%04X.", 4 2
C2 68,	  "      SecurityFW	  (%0Ad ms), ATA Security-Unlock failed, Control = 0x%04X.", 4 2
C2 69,	  "      SecurityFW	  (%0Ad ms), ATA Security-Disable pwd failed, Control = 0x%04X.", 4 2
C2 6A,	  "      SecurityFW	  (%0Ad ms), ATA Security Error, Control = 0x%04X , Status = 0x%04X.", 4 2 2
C2 6B,	  "      SecurityFW	  (%0Ad ms), SecIntf_InitATASecurity() - Start, uMode = 0x%04X.", 4 2
C2 6C,	  "      SecurityFW	  (%0Ad ms), SecIntf_InitATASecurity() - End, uMode = 0x%04X.", 4 2
C2 6D,	  "      SecurityFW	  (%0Ad ms), UpdateATASecurityStatus(), Status = 0x%04X.", 4 2
C2 6E,	  "      SecurityFW	  (%0Ad ms), ATA Security-Set user password.", 4
C2 6F,	  "      SecurityFW	  (%0Ad ms), ATA Security-Security Unlocked.", 4

;;RPMB
C2 80,	  "      SecurityFW	  (%0Ad ms), RPMB, gProtocolID = 0xEA, g16ComID = 0x01, g32HostXfrByte = 0x%08X, gRpmbTarget_NSSF = 0x%04X.", 4 4 2
C2 81,	  "      SecurityFW	  (%0Ad ms), NSSF mismatch, Expected NSSF = 0x%04X.", 4 2
C2 82,	  "      SecurityFW	  (%0Ad ms), Invalid ComID 0x%04X for Protocol 0xEA.", 4 2
C2 83,	  "      SecurityFW	  (%0Ad ms), RPMB Request Type = 0x%04X , RPMB Target = 0x%04X.", 4 2 2
C2 84,	  "      SecurityFW	  (%0Ad ms), Invalid RPMB Target, gRpmbTargetNum(MAX) = %d, gRpmbTarget_NSSF = 0x%04X.", 4 2 2
C2 85,	  "      SecurityFW	  (%0Ad ms), Authentication Key already exists.", 4
C2 86,	  "      SecurityFW	  (%0Ad ms), HandleRpmb_Request() end, Request Result = 0x%04X.", 4 2
C2 87,	  "      SecurityFW	  (%0Ad ms), Invalid Request Type or Sequence, gRpmbLastReqType = 0x%04X.", 4 2
C2 88,	  "      SecurityFW	  (%0Ad ms), HandleRpmb_Response() end, RPMB Response Type = 0x%04X , Target = 0x%04X, Result = 0x%04X.", 4 2 2 2
C2 89,    "      SecurityFW	  (%0Ad ms), RpmbHMAC() fails, Decrypt Authentication Key fails.", 4
C2 8A,    "      SecurityFW	  (%0Ad ms), RpmbHMAC() fails, Calculated MAC doesn't match the MAC in the request.", 4
C2 90,    "      SecurityFW	  (%0Ad ms), SecIntf_SetRpmbWriteCnt() fails, RPMB Target is invalid.", 4
C2 91,    "      SecurityFW	  (%0Ad ms), SecIntf_SetRpmbWriteCnt() fails, Device Configuration Block Bit Flag is invalid.", 4
C2 92,    "      SecurityFW	  (%0Ad ms), SecIntf_SetRpmbWriteCnt() fails, RPMB Target must be 0 when DCB Bit Flag is 1.", 4
C2 93,    "      SecurityFW	  (%0Ad ms), SecIntf_SetRpmbWriteCnt() - Set DCB WriteCnt to 0x%08X.", 4 4
C2 94,    "      SecurityFW	  (%0Ad ms), SecIntf_SetRpmbWriteCnt() - Set WriteCnt of RPMB Target %04d to 0x%08X.", 4 2 4
C2 95,    "      SecurityFW	  (%0Ad ms), SecIntf_GetRpmbLBA() fails, RPMB Data Area Address is invalid.", 4
C2 96,    "      SecurityFW	  (%0Ad ms), SecIntf_GetRpmbLBA() fails, RPMB Target is invalid.", 4
C2 97,    "      SecurityFW	  (%0Ad ms), SecIntf_GetRpmbLBA() - Get LBA of Addr=0x%04X in RPMB Target %04d.", 4 2 2
{ResetMsgColor}