riscv64-noop: let timer adapt to standard CLINT register offset
This commit is contained in:
parent
1d087f674f
commit
17dfbc5745
|
@ -30,7 +30,7 @@
|
|||
# define FB_ADDR 0x40000000
|
||||
#elif defined(__ARCH_RISCV64_NOOP)
|
||||
# define KBD_ADDR 0x40900000
|
||||
# define RTC_ADDR 0x40700000
|
||||
# define RTC_ADDR 0x4070bff8
|
||||
# define SCREEN_ADDR 0x40800000
|
||||
# define SYNC_ADDR 0x40800004
|
||||
# define FB_ADDR 0x40000000
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include <klib.h>
|
||||
|
||||
#define CLINT_MMIO 0x40700000
|
||||
#define CLINT_MTIME (CLINT_MMIO + 0)
|
||||
#define CLINT_MTIMECMP (CLINT_MMIO + 8)
|
||||
#define CLINT_MTIME (CLINT_MMIO + 0xbff8)
|
||||
#define CLINT_MTIMECMP (CLINT_MMIO + 0x4000)
|
||||
#define TIME_INC 10
|
||||
static inline void inc_mtimecmp(uint64_t this) {
|
||||
outd(CLINT_MTIMECMP, this + TIME_INC);
|
||||
|
|
Loading…
Reference in New Issue