forked from Mirrors/opensbi
		
	lib: sbi_init: Remove obsolete hartid check
This check has been obsolete since commit c51f02cf14 ("include:
sbi_platform: Introduce HART index to HART id table"). It originally
filtered out harts that were disabled in the FDT, but those harts are
omitted from the hart_index2id table, so they will hang in fw_base.S
after the "Find HART index" loop and never enter sbi_init().
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
			
			
This commit is contained in:
		
				
					committed by
					
						
						Anup Patel
					
				
			
			
				
	
			
			
			
						parent
						
							7c40909159
						
					
				
				
					commit
					4ac1818197
				
			@@ -500,21 +500,11 @@ static atomic_t coldboot_lottery = ATOMIC_INITIALIZER(0);
 | 
			
		||||
 */
 | 
			
		||||
void __noreturn sbi_init(struct sbi_scratch *scratch)
 | 
			
		||||
{
 | 
			
		||||
	u32 i, h;
 | 
			
		||||
	bool hartid_valid		= false;
 | 
			
		||||
	bool next_mode_supported	= false;
 | 
			
		||||
	bool coldboot			= false;
 | 
			
		||||
	u32 hartid			= current_hartid();
 | 
			
		||||
	const struct sbi_platform *plat = sbi_platform_ptr(scratch);
 | 
			
		||||
 | 
			
		||||
	for (i = 0; i < plat->hart_count; i++) {
 | 
			
		||||
		h = (plat->hart_index2id) ? plat->hart_index2id[i] : i;
 | 
			
		||||
		if (h == hartid)
 | 
			
		||||
			hartid_valid = true;
 | 
			
		||||
	}
 | 
			
		||||
	if (!hartid_valid)
 | 
			
		||||
		sbi_hart_hang();
 | 
			
		||||
 | 
			
		||||
	switch (scratch->next_mode) {
 | 
			
		||||
	case PRV_M:
 | 
			
		||||
		next_mode_supported = true;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user