diff options
Diffstat (limited to 'machine/mtrap.h')
-rw-r--r-- | machine/mtrap.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/machine/mtrap.h b/machine/mtrap.h index 6defd67..514df98 100644 --- a/machine/mtrap.h +++ b/machine/mtrap.h @@ -31,11 +31,10 @@ static inline int xlen() extern uintptr_t first_free_paddr; extern uintptr_t mem_size; extern uintptr_t num_harts; - -typedef uintptr_t csr_t; // TODO this might become uint128_t for RV128 +extern volatile uint64_t* mtime; typedef struct { - volatile csr_t* csrs; + uint64_t* timecmp; volatile int mipi_pending; volatile int sipi_pending; int console_ibuf; @@ -60,7 +59,7 @@ typedef struct { #define HLS() ((hls_t*)(MACHINE_STACK_TOP() - HLS_SIZE)) #define OTHER_HLS(id) ((hls_t*)((void*)HLS() + RISCV_PGSIZE * ((id) - read_const_csr(mhartid)))) -void hls_init(uintptr_t hart_id, csr_t* csrs); +hls_t* hls_init(uintptr_t hart_id); void parse_config_string(); void poweroff(void) __attribute((noreturn)); void printm(const char* s, ...); |