Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 917 Bytes

ext-time.adoc

File metadata and controls

30 lines (23 loc) · 917 Bytes

Timer Extension (EID #0x54494D45 "TIME")

This replaces legacy timer extension (EID #0x00). It follows the new calling convention defined in v0.2.

Function: Set Timer (FID #0)

struct sbiret sbi_set_timer(uint64_t stime_value)

Programs the clock for next event after stime_value time. stime_value is in absolute time. This function must clear the pending timer interrupt bit as well.

If the supervisor wishes to clear the timer interrupt without scheduling the next timer event, it can either request a timer interrupt infinitely far into the future (i.e., (uint64_t)-1), or it can instead mask the timer interrupt by clearing sie.STIE CSR bit.

Function Listing

Table 1. TIME Function List
Function Name SBI Version FID EID

sbi_set_timer

0.2

0

0x54494D45