Hi,
I am trying to install a SMR with advanced secure boot mod, I get the following response from the HSE: HSE_SRV_RSP_NOT_ALLOWED. I know it is not related to my LC State, I don't what I am missing. The ECDSA signature for the region is written in internal Flash memory.
Here is my code for the configuration:
hseSmrDecrypt_t smrDecrypt = {HSE_SMR_DECRYPT_KEY_HANDLE_NOT_USED, 0, 0, NULL, 0};
hseEcdsaScheme_t ecdsaScheme = {HSE_HASH_ALGO_SHA2_256, NULL};
hseSignScheme_t cryptoScheme;
cryptoScheme.signSch = HSE_SIGN_ECDSA;
cryptoScheme.sch.ecdsa = ecdsaScheme;
hseAuthScheme_t authScheme;
authScheme.sigScheme = cryptoScheme;
hseSmrEntry_t hseEntry;
hseEntry.pSmrsrc=COM_FLS_u32ActivePhysicalStartAddr;
hseEntry.smrSize = 0X200000U;
hseEntry.pSmrDest = NULL;
hseEntry.configFlags = 0U;
hseEntry.checkPeriod = 0U;
hseEntry.authKeyHandle = 0x00010000U;
hseEntry.authScheme = authScheme;
hseEntry.smrDecrypt = smrDecrypt;
hseEntry.versionOffset = HSE_SMR_VERSION_NOT_USED;
hseSmrEntryInstallSrv_t hseInstallSmr;
hseInstallSmr.accessMode = HSE_ACCESS_MODE_ONE_PASS;
hseInstallSmr.entryIndex = 0u;
hseInstallSmr.pSmrEntry = (HOST_ADDR) &hseEntry;
hseInstallSmr.pSmrData = COM_FLS_u32PassivePhysicalStartAddr;
hseInstallSmr.smrDataLength = 0X200000U;
hseInstallSmr.pAuthTag[0U] = (HOST_ADDR) COM_FLS_u32PhysicalAdressSignature;
hseInstallSmr.pAuthTag[1U] = (HOST_ADDR) COM_FLS_u32PhysicalAdressSignature + 32U;
hseInstallSmr.authTagLength[0U] = HSE_BYTES_TO_BITS(32U);
hseInstallSmr.authTagLength[1U] = HSE_BYTES_TO_BITS(32U);
Regards