Add board k210-emulator

This commit is contained in:
Zhao_Jiasheng
2021-05-10 21:08:25 +08:00
parent 0602e09627
commit 6f7cf059ec
106 changed files with 28284 additions and 3 deletions

View File

@@ -49,7 +49,9 @@ _begin:
li t0, MSTATUS_FS
csrs mstatus, t0
#ifndef BSP_USING_QEMU
ZERO_F_REGISTERS
#endif
.option push
.option norelax

View File

@@ -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;
}
}