arm64: Add arch_program_segment_loaded call to arm64
arch_program_segment_loaded ensures that the program segment loaded is synced back from the cache to PoC. dcache_flush_all on arm64 does not guarantee PoC in case of MP systems. Thus, it is important to track and sync back all the required segments using arch_program_segment_loaded. BUG=chrome-os-partner:38231 BRANCH=None TEST=Compiles successfully and boots to kernel prompt on smaug Change-Id: Ic6fcc7e5e0cccbab317950f8abab0c494041d19a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 284e3784854f764159b64286cea366c66b6bce2c Original-Change-Id: I5c35b9aa2ae9b5c1f2fcdef40ffb1cde7f49cc1a Original-Signed-off-by: Furquan Shaikh <furquan@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/263327 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Commit-Queue: Furquan Shaikh <furquan@chromium.org> Original-Trybot-Ready: Furquan Shaikh <furquan@chromium.org> Original-Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: http://review.coreboot.org/9904 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
		
				
					committed by
					
						
						Patrick Georgi
					
				
			
			
				
	
			
			
			
						parent
						
							fc45f0ba97
						
					
				
				
					commit
					4b14076fd5
				
			@@ -122,3 +122,9 @@ void cache_sync_instructions(void)
 | 
			
		||||
	dcache_clean_all();	/* includes trailing DSB (in assembly) */
 | 
			
		||||
	icache_invalidate_all(); /* includes leading DSB and trailing ISB */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void arch_program_segment_loaded(void const *addr, size_t len)
 | 
			
		||||
{
 | 
			
		||||
	dcache_clean_invalidate_by_mva(addr, len);
 | 
			
		||||
	icache_invalidate_all();
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -100,6 +100,9 @@ void dcache_mmu_enable(void);
 | 
			
		||||
/* perform all icache/dcache maintenance needed after loading new code */
 | 
			
		||||
void cache_sync_instructions(void);
 | 
			
		||||
 | 
			
		||||
/* Ensure that loaded program segment is synced back from cache to PoC */
 | 
			
		||||
void arch_program_segment_loaded(void const *addr, size_t len);
 | 
			
		||||
 | 
			
		||||
/* tlb invalidate all */
 | 
			
		||||
void tlb_invalidate_all(void);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user