forked from Mirrors/opensbi
		
	platform: generic: add extensions_init handler and platform-override
Init of non-standard extensions is a platform-specific thing, so allow generic platforms to do this via a platform-override. Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Guo Ren <guoren@kernel.org> Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
This commit is contained in:
		
				
					committed by
					
						
						Anup Patel
					
				
			
			
				
	
			
			
			
						parent
						
							4f2acb53e2
						
					
				
				
					commit
					2f63f2465c
				
			@@ -10,6 +10,7 @@
 | 
			
		||||
#ifndef __PLATFORM_OVERRIDE_H__
 | 
			
		||||
#define __PLATFORM_OVERRIDE_H__
 | 
			
		||||
 | 
			
		||||
#include <sbi/sbi_hart.h>
 | 
			
		||||
#include <sbi/sbi_types.h>
 | 
			
		||||
#include <sbi/sbi_trap.h>
 | 
			
		||||
 | 
			
		||||
@@ -22,6 +23,8 @@ struct platform_override {
 | 
			
		||||
	void (*early_exit)(const struct fdt_match *match);
 | 
			
		||||
	void (*final_exit)(const struct fdt_match *match);
 | 
			
		||||
	int (*fdt_fixup)(void *fdt, const struct fdt_match *match);
 | 
			
		||||
	int (*extensions_init)(const struct fdt_match *match,
 | 
			
		||||
			       struct sbi_hart_features *hfeatures);
 | 
			
		||||
	int (*vendor_ext_check)(long extid, const struct fdt_match *match);
 | 
			
		||||
	int (*vendor_ext_provider)(long extid, long funcid,
 | 
			
		||||
				   const struct sbi_trap_regs *regs,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user