Пример #1
0
/* Wrapper functions to implement the "read timer/watchdog for
 * the current CPU" memory regions.
 */
static uint64_t arm_thistimer_read(void *opaque, hwaddr addr,
                                   unsigned size)
{
    ARMMPTimerState *s = (ARMMPTimerState *)opaque;
    int id = get_current_cpu(s);
    return timerblock_read(&s->timerblock[id], addr, size);
}
Пример #2
0
static uint64_t arm_thiswdog_read(void *opaque, target_phys_addr_t addr,
                                  unsigned size)
{
    arm_mptimer_state *s = (arm_mptimer_state *)opaque;
    int id = get_current_cpu(s);
    return timerblock_read(&s->timerblock[id * 2 + 1], addr, size);
}