forked from Mirrors/opensbi
		
	lib: Fix the SBI_HART_HAS_MCOUNTEREN feature check
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
		
				
					committed by
					
						
						Anup Patel
					
				
			
			
				
	
			
			
			
						parent
						
							d5725c24c6
						
					
				
				
					commit
					637b348224
				
			@@ -49,7 +49,7 @@ static void mstatus_init(struct sbi_scratch *scratch, u32 hartid)
 | 
			
		||||
	if (misa_extension('S') &&
 | 
			
		||||
	    sbi_hart_has_feature(scratch, SBI_HART_HAS_SCOUNTEREN))
 | 
			
		||||
		csr_write(CSR_SCOUNTEREN, -1);
 | 
			
		||||
	if (!sbi_hart_has_feature(scratch, SBI_HART_HAS_MCOUNTEREN))
 | 
			
		||||
	if (sbi_hart_has_feature(scratch, SBI_HART_HAS_MCOUNTEREN))
 | 
			
		||||
		csr_write(CSR_MCOUNTEREN, -1);
 | 
			
		||||
 | 
			
		||||
	/* Disable all interrupts */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user