forked from Mirrors/opensbi
		
	lib: sbi: Add Zihpm as a HART ISA extension
Recently ratified Zihpm ISA extension covers all [m]hpm* CSRs so we add Zihpm as a HART ISA extension in OpenSBI. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Xiang W <wxjstz@126.com>
This commit is contained in:
		@@ -453,6 +453,9 @@ static inline char *sbi_hart_extension_id2string(int ext)
 | 
			
		||||
	case SBI_HART_EXT_SMSTATEEN:
 | 
			
		||||
		estr = "smstateen";
 | 
			
		||||
		break;
 | 
			
		||||
	case SBI_HART_EXT_ZIHPM:
 | 
			
		||||
		estr = "zihpm";
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		break;
 | 
			
		||||
	}
 | 
			
		||||
@@ -706,6 +709,11 @@ __mhpm_skip:
 | 
			
		||||
	if (rc)
 | 
			
		||||
		return rc;
 | 
			
		||||
 | 
			
		||||
	/* Extensions implied by other extensions and features */
 | 
			
		||||
	if (hfeatures->mhpm_count)
 | 
			
		||||
		__sbi_hart_update_extension(hfeatures,
 | 
			
		||||
					SBI_HART_EXT_ZIHPM, true);
 | 
			
		||||
 | 
			
		||||
	/* Mark hart feature detection done */
 | 
			
		||||
	hfeatures->detected = true;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user