Browse Source

fix(plat/rcar): change process that copy code to system ram

Change processing of invalidate instruction cache to after changing
the RAM attribute.

Signed-off-by: Koichi Yamaguchi <koichi.yamaguchi.zb@hitachi.com>
Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> # squash with rcar_gen3: drivers: Disable data cache while Suspend To RAM
Change-Id: I61339fc5415b26074b1e0753da4c4a432e8f83d9
pull/1981/head
Toshiyuki Ogasahara 3 years ago
committed by Marek Vasut
parent
commit
49593cc1ce
  1. 8
      drivers/renesas/common/pwrc/pwrc.c

8
drivers/renesas/common/pwrc/pwrc.c

@ -776,14 +776,14 @@ void rcar_pwrc_code_copy_to_system_ram(void)
memcpy((void *)sram.base, code.base, code.len);
flush_dcache_range((uint64_t) sram.base, code.len);
attr = MT_MEMORY | MT_RO | MT_SECURE | MT_EXECUTE;
ret = xlat_change_mem_attributes(sram.base, sram.len, attr);
assert(ret == 0);
/* Invalidate instruction cache */
plat_invalidate_icache();
dsb();
isb();
attr = MT_MEMORY | MT_RO | MT_SECURE | MT_EXECUTE;
ret = xlat_change_mem_attributes(sram.base, sram.len, attr);
assert(ret == 0);
}
uint32_t rcar_pwrc_get_cluster(void)

Loading…
Cancel
Save