@@ -57,7 +57,7 @@ volatile uint8_t g_cache64MemPhyAliasId = 0U;
57
57
******************************************************************************/
58
58
#if (defined(FSL_FEATURE_SOC_CACHE64_POLSEL_COUNT ) && (FSL_FEATURE_SOC_CACHE64_POLSEL_COUNT > 0 ))
59
59
/*!
60
- * brief Returns an instance number given peripheral base address.
60
+ * brief Returns an instance number given periphearl base address.
61
61
*
62
62
* param base The peripheral base address.
63
63
* return CACHE64_POLSEL instance number starting from 0.
@@ -239,10 +239,10 @@ void CACHE64_InvalidateCacheByRange(uint32_t address, uint32_t size_byte)
239
239
{
240
240
if (size_byte > 0UL )
241
241
{
242
- uint32_t endAddr = MSDK_REG_SECURE_ADDR (address + size_byte - 0x01U );
242
+ uint32_t endAddr = MSDK_REG_NONSECURE_ADDR (address + size_byte - 0x01U );
243
243
uint32_t pccReg = 0 ;
244
244
/* Align address to cache line size. */
245
- uint32_t startAddr = MSDK_REG_SECURE_ADDR (address & ~((uint32_t )CACHE64_LINESIZE_BYTE - 1U ));
245
+ uint32_t startAddr = MSDK_REG_NONSECURE_ADDR (address & ~((uint32_t )CACHE64_LINESIZE_BYTE - 1U ));
246
246
uint32_t instance = CACHE64_GetInstanceByAddr (address );
247
247
uint32_t endLim ;
248
248
CACHE64_CTRL_Type * base ;
@@ -256,7 +256,7 @@ void CACHE64_InvalidateCacheByRange(uint32_t address, uint32_t size_byte)
256
256
return ;
257
257
}
258
258
base = s_cache64ctrlBases [instance ];
259
- endLim = MSDK_REG_SECURE_ADDR (phyMemBase [instance ][g_cache64MemPhyAliasId ] + phyMemSize [instance ][g_cache64MemPhyAliasId ] - 0x01U );
259
+ endLim = MSDK_REG_NONSECURE_ADDR (phyMemBase [instance ][g_cache64MemPhyAliasId ] + phyMemSize [instance ][g_cache64MemPhyAliasId ] - 0x01U );
260
260
endAddr = endAddr > endLim ? endLim : endAddr ;
261
261
262
262
/* Set the invalidate by line command and use the physical address. */
@@ -309,10 +309,10 @@ void CACHE64_CleanCacheByRange(uint32_t address, uint32_t size_byte)
309
309
{
310
310
if (size_byte > 0UL )
311
311
{
312
- uint32_t endAddr = MSDK_REG_SECURE_ADDR (address + size_byte - 0x01U );
312
+ uint32_t endAddr = MSDK_REG_NONSECURE_ADDR (address + size_byte - 0x01U );
313
313
uint32_t pccReg = 0 ;
314
314
/* Align address to cache line size. */
315
- uint32_t startAddr = MSDK_REG_SECURE_ADDR (address & ~((uint32_t )CACHE64_LINESIZE_BYTE - 1U ));
315
+ uint32_t startAddr = MSDK_REG_NONSECURE_ADDR (address & ~((uint32_t )CACHE64_LINESIZE_BYTE - 1U ));
316
316
uint32_t instance = CACHE64_GetInstanceByAddr (address );
317
317
uint32_t endLim ;
318
318
CACHE64_CTRL_Type * base ;
@@ -326,7 +326,7 @@ void CACHE64_CleanCacheByRange(uint32_t address, uint32_t size_byte)
326
326
return ;
327
327
}
328
328
base = s_cache64ctrlBases [instance ];
329
- endLim = MSDK_REG_SECURE_ADDR (phyMemBase [instance ][g_cache64MemPhyAliasId ] + phyMemSize [instance ][g_cache64MemPhyAliasId ] - 0x01U );
329
+ endLim = MSDK_REG_NONSECURE_ADDR (phyMemBase [instance ][g_cache64MemPhyAliasId ] + phyMemSize [instance ][g_cache64MemPhyAliasId ] - 0x01U );
330
330
endAddr = endAddr > endLim ? endLim : endAddr ;
331
331
332
332
/* Set the push by line command. */
@@ -381,10 +381,10 @@ void CACHE64_CleanInvalidateCacheByRange(uint32_t address, uint32_t size_byte)
381
381
{
382
382
if (size_byte > 0UL )
383
383
{
384
- uint32_t endAddr = MSDK_REG_SECURE_ADDR (address + size_byte - 0x01U );
384
+ uint32_t endAddr = MSDK_REG_NONSECURE_ADDR (address + size_byte - 0x01U );
385
385
uint32_t pccReg = 0 ;
386
386
/* Align address to cache line size. */
387
- uint32_t startAddr = MSDK_REG_SECURE_ADDR (address & ~((uint32_t )CACHE64_LINESIZE_BYTE - 1U ));
387
+ uint32_t startAddr = MSDK_REG_NONSECURE_ADDR (address & ~((uint32_t )CACHE64_LINESIZE_BYTE - 1U ));
388
388
uint32_t instance = CACHE64_GetInstanceByAddr (address );
389
389
uint32_t endLim ;
390
390
CACHE64_CTRL_Type * base ;
@@ -398,7 +398,7 @@ void CACHE64_CleanInvalidateCacheByRange(uint32_t address, uint32_t size_byte)
398
398
return ;
399
399
}
400
400
base = s_cache64ctrlBases [instance ];
401
- endLim = MSDK_REG_SECURE_ADDR (phyMemBase [instance ][g_cache64MemPhyAliasId ] + phyMemSize [instance ][g_cache64MemPhyAliasId ] - 0x01U );
401
+ endLim = MSDK_REG_NONSECURE_ADDR (phyMemBase [instance ][g_cache64MemPhyAliasId ] + phyMemSize [instance ][g_cache64MemPhyAliasId ] - 0x01U );
402
402
endAddr = endAddr > endLim ? endLim : endAddr ;
403
403
404
404
/* Set the push by line command. */
0 commit comments