forked from xuos/xiuos
Add board k210-emulator
This commit is contained in:
@@ -49,7 +49,9 @@ _begin:
|
||||
li t0, MSTATUS_FS
|
||||
csrs mstatus, t0
|
||||
|
||||
#ifndef BSP_USING_QEMU
|
||||
ZERO_F_REGISTERS
|
||||
#endif
|
||||
|
||||
.option push
|
||||
.option norelax
|
||||
|
||||
@@ -42,10 +42,15 @@ int InitHwTick(void)
|
||||
|
||||
CLEAR_CSR(mie, MIP_MTIP);
|
||||
|
||||
#ifdef BSP_USING_QEMU
|
||||
tick_cycles = (10000000 / TICK_PER_SECOND);
|
||||
#else
|
||||
tick_cycles = interval * SysctlClockGetFreq(SYSCTL_CLOCK_CPU) / CLINT_CLOCK_DIV / 1000ULL - 1;
|
||||
#endif
|
||||
|
||||
clint->mtimecmp[core_id] = clint->mtime + tick_cycles;
|
||||
|
||||
SET_CSR(mie, MIP_MTIP);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user