Example #1
0
/* we had marked 'doit' as 'noreturn'.
 * There is no apparent harm in leaving it as something we can return from, and in the one
 * case where we call a payload, the payload is allowed to return.
 * Hence, leave it as something we can return from.
 */
void stage_exit(void *addr)
{
	void (*doit)(void) = addr;
	/* make sure any code we installed is written to memory. Not all ARM have
	 * unified caches.
	 */
	dcache_clean_invalidate_all();
	/* Because most stages copy code to memory, it's a safe and hygienic thing
	 * to flush the icache here.
	 */
	icache_invalidate_all();
	doit();
}
Example #2
0
void arch_program_segment_loaded(void const *addr, size_t len)
{
	dcache_clean_invalidate_by_mva(addr, len);
	icache_invalidate_all();
}
Example #3
0
void cache_sync_instructions(void)
{
	dcache_clean_all();	/* includes trailing DSB (in assembly) */
	icache_invalidate_all(); /* includes leading DSB and trailing ISB */
}