forked from Mirrors/opensbi
		
	lib: sbi: Fix writes to emulated 32-bit htimedelta CSR
Writes to the low half CSR should not affect the high half of the value.
Make this separation explicit by writing to the delta in memory as two
adjacent XLEN-sized values.
Fixes: 1e9f88889f ("lib: Emulate HTIMEDELTA CSR for platforms not having TIME CSR")
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
						
							65f04badf7
						
					
				
				
					commit
					ebfaf1974e
				
			@@ -78,8 +78,10 @@ u64 sbi_timer_get_delta(void);
 | 
			
		||||
/** Set timer delta value for current HART */
 | 
			
		||||
void sbi_timer_set_delta(ulong delta);
 | 
			
		||||
 | 
			
		||||
#if __riscv_xlen == 32
 | 
			
		||||
/** Set upper 32-bits of timer delta value for current HART */
 | 
			
		||||
void sbi_timer_set_delta_upper(ulong delta_upper);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/** Start timer event for current HART */
 | 
			
		||||
void sbi_timer_event_start(u64 next_event);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user