7.1. Timer Extension (EID #0x54494D45 "TIME")

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

7.1.1. 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.

If the supervisor wishes to clear the timer interrupt without scheduling the next timer event, it may request a timer interrupt infinitely far into the future (i.e., (uint64_t)-1). Alternatively, to not receive timer interrupts, it may mask timer interrupts by clearing the sie.STIE CSR bit.

This function must clear the pending timer interrupt bit when stime_value is set to some time in the future, regardless of whether timer interrupts are masked or not.

This function always returns SBI_SUCCESS in sbiret.error.

7.1.2. Function Listing

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

sbi_set_timer

0.2

0

0x54494D45