Skip to content

Commit 641a2dc

Browse files
committed
Enable caches to improve performance
1 parent 2586a69 commit 641a2dc

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

libraries/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/MBRZA1H.h

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -747,21 +747,6 @@ typedef enum IRQn
747747

748748
//Sect_Normal_RW. Sect_Normal_Cod, but writeable and not executable
749749
#define section_normal_rw(descriptor_l1, region) region.rg_t = SECTION; \
750-
region.domain = 0x0; \
751-
region.e_t = ECC_DISABLED; \
752-
region.g_t = GLOBAL; \
753-
region.inner_norm_t = WB_WA; \
754-
region.outer_norm_t = WB_WA; \
755-
region.mem_t = NORMAL; \
756-
region.sec_t = NON_SECURE; \
757-
region.xn_t = NON_EXECUTE; \
758-
region.priv_t = RW; \
759-
region.user_t = RW; \
760-
region.sh_t = NON_SHARED; \
761-
__get_section_descriptor(&descriptor_l1, region);
762-
763-
//Sect_Normal_SH. Sect_Normal_Cod, but writeable and shareable
764-
#define section_normal_sh(descriptor_l1, region) region.rg_t = SECTION; \
765750
region.domain = 0x0; \
766751
region.e_t = ECC_DISABLED; \
767752
region.g_t = GLOBAL; \
@@ -772,7 +757,7 @@ typedef enum IRQn
772757
region.xn_t = EXECUTE; \
773758
region.priv_t = RW; \
774759
region.user_t = RW; \
775-
region.sh_t = SHARED; \
760+
region.sh_t = NON_SHARED; \
776761
__get_section_descriptor(&descriptor_l1, region);
777762

778763
//Sect_SO. Strongly-ordered (therefore shareable), not executable, rw, domain 0, base addr 0

libraries/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/mmu_Renesas_RZ_A1.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ static uint32_t Sect_Normal_NC; //non-shareable, non-executable, rw, domain 0,
115115
static uint32_t Sect_Normal_Cod; //outer & inner wb/wa, non-shareable, executable, ro, domain 0, base addr 0
116116
static uint32_t Sect_Normal_RO; //as Sect_Normal_Cod, but not executable
117117
static uint32_t Sect_Normal_RW; //as Sect_Normal_Cod, but writeable and not executable
118-
static uint32_t Sect_Normal_SH; //as Sect_Normal_Cod, but writeable and shareable
119118
static uint32_t Sect_Device_RO; //device, non-shareable, non-executable, ro, domain 0, base addr 0
120119
static uint32_t Sect_Device_RW; //as Sect_Device_RO, but writeable
121120

@@ -169,7 +168,6 @@ void create_translation_table(void)
169168
section_device_ro(Sect_Device_RO, region);
170169
section_device_rw(Sect_Device_RW, region);
171170
section_normal_nc(Sect_Normal_NC, region);
172-
section_normal_sh(Sect_Normal_SH, region);
173171
//Create descriptors for 64k pages
174172
page64k_device_rw(Page_L1_64k, Page_64k_Device_RW, region);
175173
//Create descriptors for 4k pages
@@ -192,7 +190,7 @@ void create_translation_table(void)
192190
__TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_USER_AREA1 , 64, Sect_Normal_RW);
193191
__TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_SPI_IO0 , 64, Sect_Normal_RO);
194192
__TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_SPI_IO1 , 64, Sect_Normal_RO);
195-
__TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_ONCHIP_SRAM_BASE , 10, Sect_Normal_SH);
193+
__TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_ONCHIP_SRAM_BASE , 10, Sect_Normal_RW);
196194
__TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_SPI_MIO_BASE , 1, Sect_Device_RW);
197195
__TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_BSC_BASE , 1, Sect_Device_RW);
198196
__TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_PERIPH_BASE0 , 3, Sect_Device_RW);
@@ -203,13 +201,13 @@ void create_translation_table(void)
203201
__TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)Image$$RO_DATA$$Base, RO_DATA_SIZE, Sect_Normal_RO);
204202
__TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)Image$$VECTORS$$Base, VECTORS_SIZE, Sect_Normal_Cod);
205203
__TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)Image$$RW_DATA$$Base, RW_DATA_SIZE, Sect_Normal_RW);
206-
__TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)Image$$ZI_DATA$$Base, ZI_DATA_SIZE, Sect_Normal_SH);
204+
__TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)Image$$ZI_DATA$$Base, ZI_DATA_SIZE, Sect_Normal_RW);
207205
#else
208206
//Define Image
209207
__TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)&Image$$RO_DATA$$Base, RO_DATA_SIZE, Sect_Normal_RO);
210208
__TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)&Image$$VECTORS$$Base, VECTORS_SIZE, Sect_Normal_Cod);
211209
__TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)&Image$$RW_DATA$$Base, RW_DATA_SIZE, Sect_Normal_RW);
212-
__TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)&Image$$ZI_DATA$$Base, ZI_DATA_SIZE, Sect_Normal_SH);
210+
__TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)&Image$$ZI_DATA$$Base, ZI_DATA_SIZE, Sect_Normal_RW);
213211
#endif
214212

215213
#if defined( __CC_ARM )

0 commit comments

Comments
 (0)