forked from Mirrors/opensbi
		
	platform: andes: Add Andes custom PMU support
Before the ratification of Sscofpmf, the Andes PMU extension was designed to support the sampling and filtering with hardware performance counters (zihpm), it works with the current SBI PMU extension and Linux SBI PMU driver. We implement 1) the PMU device callbacks that update the corresponding bits on custom CSRs, 2) extentions_init() to detect the hardware support of Andes PMU and initialize the per-hart PMU related CSR, and 3) pmu_init() to register PMU device and populate event mappings. Also define a andes_pmu_setup() function which is in preparation for adding default PMU mappings in andes_hpm.h Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
		
				
					committed by
					
						
						Anup Patel
					
				
			
			
				
	
			
			
			
						parent
						
							effd89aa05
						
					
				
				
					commit
					1b9e743c3d
				
			@@ -7,3 +7,11 @@ config ANDES45_PMA
 | 
			
		||||
config ANDES_SBI
 | 
			
		||||
	bool "Andes SBI support"
 | 
			
		||||
	default n
 | 
			
		||||
 | 
			
		||||
config ANDES_PMU
 | 
			
		||||
	bool "Andes PMU extension (XAndesPMU) support"
 | 
			
		||||
	default n
 | 
			
		||||
	help
 | 
			
		||||
	  Andes PMU extension supports the event counter overflow
 | 
			
		||||
	  interrupt and mode filtering, similar to the standard
 | 
			
		||||
	  Sscofpmf and Smcntrpmf.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user