@@ -470,6 +470,8 @@ REGION_DECLARE_EXT(Image$$, ARM_LIB_HEAP, $$ZI$$Base);
470
470
REGION_DECLARE_EXT (Image$$ , ARM_LIB_HEAP , $$ZI$$Limit );
471
471
REGION_DECLARE_EXT (Image$$ , ER_TFM_DATA , $$Base );
472
472
REGION_DECLARE_EXT (Image$$ , ER_TFM_DATA , $$Limit );
473
+ REGION_DECLARE_EXT (Image$$ , ER_TFM_DATA , $$ZI$$Base );
474
+ REGION_DECLARE_EXT (Image$$ , ER_TFM_DATA , $$ZI$$Limit );
473
475
REGION_DECLARE_EXT (Image$$ , TFM_SECURE_STACK , $$ZI$$Base );
474
476
REGION_DECLARE_EXT (Image$$ , TFM_SECURE_STACK , $$ZI$$Limit );
475
477
REGION_DECLARE_EXT (Image$$ , TFM_UNPRIV_SCRATCH , $$ZI$$Base );
@@ -534,6 +536,12 @@ int32_t tfm_memory_check(void *buffer, size_t len, int32_t ns_caller)
534
536
return IPC_SUCCESS ;
535
537
}
536
538
539
+ base = (uintptr_t )& REGION_NAME (Image$$ , ER_TFM_DATA , $$ZI$$Base );
540
+ limit = (uintptr_t )& REGION_NAME (Image$$ , ER_TFM_DATA , $$ZI$$Limit );
541
+ if (memory_check_range (buffer , len , base , limit ) == IPC_SUCCESS ) {
542
+ return IPC_SUCCESS ;
543
+ }
544
+
537
545
base = (uintptr_t )& REGION_NAME (Image$$ , ER_TFM_DATA , $$Base );
538
546
limit = (uintptr_t )& REGION_NAME (Image$$ , ER_TFM_DATA , $$Limit );
539
547
if (memory_check_range (buffer , len , base , limit ) == IPC_SUCCESS ) {
@@ -552,6 +560,12 @@ int32_t tfm_memory_check(void *buffer, size_t len, int32_t ns_caller)
552
560
if (memory_check_range (buffer , len , base , limit ) == IPC_SUCCESS ) {
553
561
return IPC_SUCCESS ;
554
562
}
563
+
564
+ base = (uintptr_t )S_CODE_START ;
565
+ limit = (uintptr_t )(S_CODE_START + S_CODE_SIZE );
566
+ if (memory_check_range (buffer , len , base , limit ) == IPC_SUCCESS ) {
567
+ return IPC_SUCCESS ;
568
+ }
555
569
}
556
570
557
571
return IPC_ERROR_MEMORY_CHECK ;
0 commit comments