diff --git a/src/system/libroot/os/arch/riscv64/syscalls.inc b/src/system/libroot/os/arch/riscv64/syscalls.inc index 76bee643a3..bcebdae486 100644 --- a/src/system/libroot/os/arch/riscv64/syscalls.inc +++ b/src/system/libroot/os/arch/riscv64/syscalls.inc @@ -10,7 +10,8 @@ name: \ li t0, n; \ ecall; \ - ret + ret; \ +.size name, .-name #define SYSCALL0(name, n) _SYSCALL(name, n) #define SYSCALL1(name, n) _SYSCALL(name, n) diff --git a/src/system/libroot/os/arch/riscv64/time.cpp b/src/system/libroot/os/arch/riscv64/time.cpp index 82c8518371..a6ef4e7f55 100644 --- a/src/system/libroot/os/arch/riscv64/time.cpp +++ b/src/system/libroot/os/arch/riscv64/time.cpp @@ -12,6 +12,7 @@ static struct arch_real_time_data *sRealTimeData; + void __arch_init_time(struct real_time_data *data, bool setDefaults) { @@ -27,5 +28,7 @@ __arch_init_time(struct real_time_data *data, bool setDefaults) bigtime_t __arch_get_system_time_offset(struct real_time_data *data) { - return 0; + // we don't use atomic_get64 because memory is read-only, maybe + // find another way to lock + return data->arch_data.system_time_offset; }