Home
last modified time | relevance | path

Searched refs:counter (Results 1 – 25 of 65) sorted by relevance

123

/qemu/hw/timer/
A Dnrf51_timer.c47 s->counter = (s->counter + ticks) % BIT(bitwidths[s->bitmode]); in update_counter()
70 if (s->cc[i] <= s->counter) { in rearm_timer()
108 if (s->cc[i] > s->counter) { in timer_expire()
125 s->counter = 0; in timer_expire()
144 uint32_t counter = s->counter; in counter_compare() local
148 if (counter == s->cc[i]) { in counter_compare()
152 s->counter = 0; in counter_compare()
226 s->counter = (s->counter + 1) % BIT(bitwidths[s->bitmode]); in nrf51_timer_write()
234 s->counter = 0; in nrf51_timer_write()
247 s->cc[idx] = s->counter; in nrf51_timer_write()
[all …]
A Dtrace-events13 slavio_timer_mem_writel_mode_user(unsigned int timer_index) "processor %d changed from counter to u…
14 …mem_writel_mode_counter(unsigned int timer_index) "processor %d changed from user timer to counter"
66 nrf51_timer_set_count(uint8_t timer_id, uint8_t counter_id, uint32_t value) "timer %u counter %u co…
87 sse_counter_control_read(uint64_t offset, uint64_t data, unsigned size) "SSE system counter control…
88 sse_counter_control_write(uint64_t offset, uint64_t data, unsigned size) "SSE system counter contro…
89 sse_counter_status_read(uint64_t offset, uint64_t data, unsigned size) "SSE system counter status f…
90 sse_counter_status_write(uint64_t offset, uint64_t data, unsigned size) "SSE system counter status …
91 sse_counter_reset(void) "SSE system counter: reset"
113 hpet_ram_read_reading_counter(uint8_t reg_off, uint64_t cur_tick) "reading counter + %" PRIu8 " = 0…
121 hpet_ram_write_counter_write_while_enabled(void) "Writing counter while HPET enabled!"
[all …]
A Da9gtimer.c124 s->counter = update.new; in a9_gtimer_update()
129 s->ref_counter = s->counter; in a9_gtimer_update()
204 s->counter = deposit64(s->counter, shift, 32, value); in a9_gtimer_write()
284 s->counter = 0; in a9_gtimer_reset()
362 VMSTATE_UINT64(counter, A9GTimerState),
A Dimx_epit.c162 uint64_t counter = 0; in imx_epit_update_compare_timer() local
175 counter = ptimer_get_count(s->timer_reload); in imx_epit_update_compare_timer()
183 if (counter >= s->cmp) { in imx_epit_update_compare_timer()
185 counter -= s->cmp; in imx_epit_update_compare_timer()
194 counter += limit - s->cmp; in imx_epit_update_compare_timer()
216 ptimer_set_count(s->timer_cmp, counter); in imx_epit_update_compare_timer()
A Dgrlib_gptimer.c73 uint32_t counter; member
122 trace_grlib_gptimer_enable(timer->id, timer->counter); in grlib_gptimer_enable()
124 ptimer_set_count(timer->ptimer, (uint64_t)timer->counter + 1); in grlib_gptimer_enable()
135 timer->counter = timer->reload; in grlib_gptimer_restart()
283 unit->timers[id].counter = value; in grlib_gptimer_write()
361 timer->counter = 0; in grlib_gptimer_reset()
A Di8254.c55 int counter; in pit_get_count() local
64 counter = (s->count - d) & 0xffff; in pit_get_count()
68 counter = s->count - ((2 * d) % s->count); in pit_get_count()
71 counter = s->count - (d % s->count); in pit_get_count()
74 return counter; in pit_get_count()
A Dpxa2xx_timer.c139 int counter; in pxa2xx_timer_update4() local
143 counter = n; in pxa2xx_timer_update4()
145 counter = counters[n]; in pxa2xx_timer_update4()
147 if (!s->tm4[counter].freq) { in pxa2xx_timer_update4()
152 now_vm = s->tm4[counter].clock + muldiv64(now_qemu - in pxa2xx_timer_update4()
153 s->tm4[counter].lastload, in pxa2xx_timer_update4()
154 s->tm4[counter].freq, NANOSECONDS_PER_SECOND); in pxa2xx_timer_update4()
157 NANOSECONDS_PER_SECOND, s->tm4[counter].freq); in pxa2xx_timer_update4()
A Dsse-timer.c103 return sse_counter_for_timestamp(s->counter, in sse_cntpct()
139 uint64_t expiry = sse_counter_tick_to_time(s->counter, nexttick); in sse_set_timer()
416 if (!s->counter) { in sse_timer_realize()
422 sse_counter_register_consumer(s->counter, &s->counter_notifier); in sse_timer_realize()
444 DEFINE_PROP_LINK("counter", SSETimer, counter, TYPE_SSE_COUNTER, SSECounter *),
/qemu/hw/usb/
A Du2f-emulated.c51 ++counter->value; in counter_increment()
54 if (fseek(counter->fp, 0, SEEK_SET) == -1) { in counter_increment()
57 fprintf(counter->fp, "%u\n", counter->value); in counter_increment()
63 return counter->value; in counter_read()
82 char *counter; member
229 ret = fscanf(fp, "%u", &counter->value); in u2f_emulated_setup_counter()
234 counter->fp = fp; in u2f_emulated_setup_counter()
236 counter->vdev_counter.counter_read = counter_read; in u2f_emulated_setup_counter()
304 || key->counter != NULL) { in u2f_emulated_realize()
306 && key->entropy != NULL && key->counter != NULL) { in u2f_emulated_realize()
[all …]
/qemu/target/riscv/
A Dpmu.c128 counter->mhpmcounter_val = 0; in riscv_pmu_incr_ctr_rv32()
129 counter->mhpmcounterh_val = 0; in riscv_pmu_incr_ctr_rv32()
136 counter->mhpmcounterh_val++; in riscv_pmu_incr_ctr_rv32()
139 counter->mhpmcounter_val++; in riscv_pmu_incr_ctr_rv32()
168 counter->mhpmcounter_val = 0; in riscv_pmu_incr_ctr_rv64()
175 counter->mhpmcounter_val++; in riscv_pmu_incr_ctr_rv64()
465 PMUCTRState *counter; in pmu_timer_trigger_irq() local
486 counter = &env->pmu_ctrs[ctr_idx]; in pmu_timer_trigger_irq()
487 if (counter->irq_overflow_left > 0) { in pmu_timer_trigger_irq()
491 counter->irq_overflow_left = 0; in pmu_timer_trigger_irq()
[all …]
/qemu/tests/unit/
A Dtest-aio-multithread.c205 static uint32_t counter; variable
213 counter++; in test_multi_co_mutex_entry()
231 counter = 0; in test_multi_co_mutex()
251 g_test_message("%d iterations/second", counter / seconds); in test_multi_co_mutex()
252 g_assert_cmpint(counter, ==, atomic_counter); in test_multi_co_mutex()
338 counter++; in test_multi_fair_mutex_entry()
350 counter = 0; in test_multi_fair_mutex()
371 g_assert_cmpint(counter, ==, atomic_counter); in test_multi_fair_mutex()
394 counter++; in test_multi_mutex_entry()
406 counter = 0; in test_multi_mutex()
[all …]
/qemu/include/hw/timer/
A Dsse-counter.h78 uint64_t sse_counter_for_timestamp(SSECounter *counter, uint64_t ns);
89 uint64_t sse_counter_tick_to_time(SSECounter *counter, uint64_t tick);
103 void sse_counter_register_consumer(SSECounter *counter, Notifier *notifier);
A Dsse-timer.h42 SSECounter *counter; member
/qemu/hw/core/
A Dptimer.c203 uint64_t counter; in ptimer_get_count() local
216 counter = 0; in ptimer_get_count()
260 counter = rem / div; in ptimer_get_count()
270 if (counter == s->limit + DELTA_ADJUST) { in ptimer_get_count()
273 } else if (counter == s->limit) { in ptimer_get_count()
288 counter += 1; in ptimer_get_count()
292 counter = s->delta; in ptimer_get_count()
294 return counter; in ptimer_get_count()
/qemu/hw/misc/
A Dmos6522.c155 unsigned int counter; in get_counter() local
162 counter = (ti->counter_value - d) & 0xffff; in get_counter()
165 counter = (ti->latch - counter) & 0xffff; in get_counter()
168 counter = (ti->counter_value - d) & 0xffff; in get_counter()
170 return counter; in get_counter()
189 unsigned int counter; in get_next_irq_time() local
201 counter = (ti->counter_value - d) & 0xffff; in get_next_irq_time()
204 counter = (ti->latch - counter) & 0xffff; in get_next_irq_time()
208 if (counter == 0xffff) { in get_next_irq_time()
210 } else if (counter == 0) { in get_next_irq_time()
[all …]
A Dmps2-fpgaio.c86 s->counter += ticks - s->pscntr; in resync_counter()
110 s->counter += y / (s->prescale + 1); in resync_counter()
161 r = s->counter; in mps2_fpgaio_read()
236 s->counter = value; in mps2_fpgaio_write()
267 s->counter = 0; in mps2_fpgaio_reset()
315 VMSTATE_UINT32(counter, MPS2FPGAIO),
/qemu/docs/devel/
A Dlockcnt.rst81 to increment and decrement the counter, and to take and release the
82 mutex. The counter notes how many visits to the data structures are
85 governing the counter/mutex pair then are the following:
88 counter is zero and the mutex is taken.
90 - A new visit cannot be started while the counter is zero and the
104 This could be implemented simply by protecting the counter with the
135 counter to never become zero. For this reason, this technique is
140 all modifications of the counter take the lock appropriately, and it
144 incrementing the counter while it is non-zero);
148 than simply managing a counter using atomic operations (see
[all …]
/qemu/docs/system/devices/
A Dusb-u2f.rst53 * counter (four bytes value)
78 * ``counter``: counter value
89 * ``counter``
93 …|qemu_system| -usb -device u2f-emulated,cert=$DIR1/$FILE1,priv=$DIR2/$FILE2,counter=$DIR3/$FILE3,e…
/qemu/scripts/
A Du2f-setup-gen.py25 entropy: bytes, counter: int) -> None:
145 counter = 0
148 write_setup_dir(dirpath, privkey_pem, certificate_pem, entropy, counter)
/qemu/net/
A Dl2tpv3.c94 uint32_t counter; member
184 uint32_t *counter; in l2tpv3_form_header() local
207 counter = (uint32_t *)(s->header_buf + s->counter_offset); in l2tpv3_form_header()
209 *counter = 0; in l2tpv3_form_header()
211 stl_be_p(counter, ++s->counter); in l2tpv3_form_header()
683 if (l2tpv3->has_counter && l2tpv3->counter) { in net_init_l2tpv3()
715 s->counter = 0; in net_init_l2tpv3()
/qemu/subprojects/libvduse/
A Dlibvduse.c65 uint64_t counter; member
83 uint64_t counter; member
110 uint64_t counter; member
220 if (desc1->counter > desc0->counter && in inflight_desc_compare()
221 (desc1->counter - desc0->counter) < VIRTQUEUE_MAX_SIZE * 2) { in inflight_desc_compare()
236 vq->counter = 0; in vduse_queue_check_inflights()
267 vq->resubmit_list[vq->resubmit_num].counter = in vduse_queue_check_inflights()
268 vq->log->inflight.desc[i].counter; in vduse_queue_check_inflights()
277 vq->counter = vq->resubmit_list[0].counter + 1; in vduse_queue_check_inflights()
287 vq->log->inflight.desc[desc_idx].counter = vq->counter++; in vduse_queue_inflight_get()
/qemu/hw/block/
A Dpflash_cfi01.c81 uint64_t counter; member
124 VMSTATE_UINT64(counter, PFlashCFI01),
410 trace_pflash_write_block_start(pfl->name, pfl->counter); in pflash_blk_write_start()
447 pfl->counter); in pflash_data_write()
570 pfl->counter = value; in pflash_write()
602 if (pfl->blk_offset == -1 && pfl->counter) { in pflash_write()
613 if (!pfl->counter) { in pflash_write()
619 pfl->counter--; in pflash_write()
/qemu/target/loongarch/
A Dtrace-events10 kvm_failed_get_counter(const char *msg) "Failed to get counter from KVM: %s"
11 kvm_failed_put_counter(const char *msg) "Failed to put counter into KVM: %s"
/qemu/docs/specs/
A Drapl-msr.rst31 counter to calculate the power. Those MSRs are populated once at the beginning
35 The MSR_PKG_ENERGY_STATUS is a counter; it represents the total amount of
38 counter is always increasing and it increases more or less faster depending on
39 the consumption of the package. This counter is supposed to overflow at some
57 2. Snapshot of the actual MSR_PKG_ENERGY_STATUS counter of all packages where
61 will do what they have to do and so the energy counter will increase.
/qemu/system/
A Dbootdevice.c192 uint32_t counter = 0; in get_boot_device() local
198 if (counter == position) { in get_boot_device()
202 counter++; in get_boot_device()

Completed in 65 milliseconds

123