Skip to content

Commit

Permalink
Remove the Timer Interrupt Interval because ostest will fail
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Jan 24, 2024
1 parent f00d40c commit 169dd72
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions riscv_machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1175,10 +1175,7 @@ static int riscv_machine_get_sleep_duration(VirtMachine *s1, int delay)
if (!(riscv_cpu_get_mip(s) & MIP_STIP)) {
const int64_t delay2 = m->timecmp - rtc_get_time(m);
if (delay2 <= 0) {
static uint64_t t = 0;
if (t++ % 100 == 0) {
riscv_cpu_set_mip(s, MIP_STIP);
}
riscv_cpu_set_mip(s, MIP_STIP);
}
}
//// End Test
Expand Down Expand Up @@ -1233,7 +1230,7 @@ void set_timecmp(RISCVMachine *machine0, uint64_t timecmp) {
if (machine0 != NULL) { machine = machine0; return; }
if (machine == NULL) { puts("set_timecmp: machine is null"); return; }
machine->timecmp = timecmp;
printf("set_timecmp: timecmp=%p\n", timecmp);
_info("set_timecmp: timecmp=%p\n", timecmp);
}

// Print to Console
Expand Down

0 comments on commit 169dd72

Please sign in to comment.