本文整理汇总了C++中qemu_put_be32函数的典型用法代码示例。如果您正苦于以下问题:C++ qemu_put_be32函数的具体用法?C++ qemu_put_be32怎么用?C++ qemu_put_be32使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了qemu_put_be32函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pxa2xx_lcdc_save
static void pxa2xx_lcdc_save(QEMUFile *f, void *opaque)
{
PXA2xxLCDState *s = (PXA2xxLCDState *) opaque;
int i;
qemu_put_be32(f, s->irqlevel);
qemu_put_be32(f, s->transp);
for (i = 0; i < 6; i ++)
qemu_put_be32s(f, &s->control[i]);
for (i = 0; i < 2; i ++)
qemu_put_be32s(f, &s->status[i]);
for (i = 0; i < 2; i ++)
qemu_put_be32s(f, &s->ovl1c[i]);
for (i = 0; i < 2; i ++)
qemu_put_be32s(f, &s->ovl2c[i]);
qemu_put_be32s(f, &s->ccr);
qemu_put_be32s(f, &s->cmdcr);
qemu_put_be32s(f, &s->trgbr);
qemu_put_be32s(f, &s->tcr);
qemu_put_be32s(f, &s->liidr);
qemu_put_8s(f, &s->bscntr);
for (i = 0; i < 7; i ++) {
qemu_put_betl(f, s->dma_ch[i].branch);
qemu_put_byte(f, s->dma_ch[i].up);
qemu_put_buffer(f, s->dma_ch[i].pbuffer, sizeof(s->dma_ch[i].pbuffer));
qemu_put_betl(f, s->dma_ch[i].descriptor);
qemu_put_betl(f, s->dma_ch[i].source);
qemu_put_be32s(f, &s->dma_ch[i].id);
qemu_put_be32s(f, &s->dma_ch[i].command);
}
}
示例2: virtio_audio_save
static void virtio_audio_save(QEMUFile *f, void *opaque)
{
VirtIOAudio *s = opaque;
VirtIOAudioStream *stream;
int i;
int mode;
virtio_save(&s->vdev, f);
for (i = 0; i < NUM_STREAMS; i++) {
stream = &s->stream[i];
if (stream->in_voice) {
mode = 2;
if (AUD_is_active_in(stream->in_voice))
mode |= 1;
} else if (stream->out_voice) {
mode = 4;
if (AUD_is_active_out(stream->out_voice))
mode |= 1;
} else {
mode = 0;
}
qemu_put_byte(f, mode);
qemu_put_byte(f, stream->fmt.endianness);
qemu_put_be16(f, stream->fmt.nchannels);
qemu_put_be32(f, stream->fmt.fmt);
qemu_put_be32(f, stream->fmt.freq);
}
}
示例3: boot_property_save_property
static int
boot_property_save_property( QEMUFile *f, BootProperty *p )
{
char *split = strchr(p->property, '=');
if (split == NULL) {
D("%s: save failed: illegal key/value pair \"%s\" (missing '=')\n",
__FUNCTION__, p->property);
qemu_file_set_error(f);
return -1;
}
*split = '\0';
uint32_t key_buf_len = (split - p->property) + 1;
qemu_put_be32(f, key_buf_len);
qemu_put_buffer(f, (uint8_t*) p->property, key_buf_len);
uint32_t value_buf_len = p->length - key_buf_len + 1;
qemu_put_be32(f, value_buf_len);
qemu_put_buffer(f, (uint8_t*) split + 1, value_buf_len);
*split = '=';
return 0;
}
示例4: rtc_save_td
static void rtc_save_td(QEMUFile *f, void *opaque)
{
RTCState *s = opaque;
qemu_put_be32(f, s->irq_coalesced);
qemu_put_be32(f, s->period);
}
示例5: cpu_put_seg
static void cpu_put_seg(QEMUFile *f, SegmentCache *dt)
{
qemu_put_be32(f, dt->selector);
qemu_put_betl(f, dt->base);
qemu_put_be32(f, dt->limit);
qemu_put_be32(f, dt->flags);
}
示例6: virtio_balloon_save_device
static void virtio_balloon_save_device(VirtIODevice *vdev, QEMUFile *f)
{
VirtIOBalloon *s = VIRTIO_BALLOON(vdev);
qemu_put_be32(f, s->num_pages);
qemu_put_be32(f, s->actual);
}
示例7: boot_property_save_property
/* Saves a single BootProperty to file.
*/
static int
boot_property_save_property( QEMUFile *f, BootProperty *p )
{
/* split in key and value, so we can re-use boot_property_add (and its
* sanity checks) when loading
*/
char *split = strchr(p->property, '=');
if (split == NULL) {
D("%s: save failed: illegal key/value pair \"%s\" (missing '=')\n",
__FUNCTION__, p->property);
qemu_file_set_error(f, -EINVAL);
return -1;
}
*split = '\0'; /* p->property is now "<key>\0<value>\0" */
uint32_t key_buf_len = (split - p->property) + 1; // +1: '\0' terminator
qemu_put_be32(f, key_buf_len);
qemu_put_buffer(f, (uint8_t*) p->property, key_buf_len);
uint32_t value_buf_len = p->length - key_buf_len + 1; // +1: '\0' terminator
qemu_put_be32(f, value_buf_len);
qemu_put_buffer(f, (uint8_t*) split + 1, value_buf_len);
*split = '='; /* restore property to "<key>=<value>\0" */
return 0;
}
示例8: virtio_save
void virtio_save(VirtIODevice *vdev, QEMUFile *f)
{
int i;
if (vdev->binding->save_config)
vdev->binding->save_config(vdev->binding_opaque, f);
qemu_put_8s(f, &vdev->status);
qemu_put_8s(f, &vdev->isr);
qemu_put_be16s(f, &vdev->queue_sel);
qemu_put_be32s(f, &vdev->guest_features);
qemu_put_be32(f, vdev->config_len);
qemu_put_buffer(f, vdev->config, vdev->config_len);
for (i = 0; i < VIRTIO_PCI_QUEUE_MAX; i++) {
if (vdev->vq[i].vring.num == 0)
break;
}
qemu_put_be32(f, i);
for (i = 0; i < VIRTIO_PCI_QUEUE_MAX; i++) {
if (vdev->vq[i].vring.num == 0)
break;
qemu_put_be32(f, vdev->vq[i].vring.num);
qemu_put_be64(f, vdev->vq[i].pa);
qemu_put_be16s(f, &vdev->vq[i].last_avail_idx);
if (vdev->binding->save_queue)
vdev->binding->save_queue(vdev->binding_opaque, i, f);
}
}
示例9: goldfish_pipe_save
static void
goldfish_pipe_save( QEMUFile* file, void* opaque )
{
PipeDevice* dev = opaque;
Pipe* pipe;
qemu_put_be32(file, dev->address);
qemu_put_be32(file, dev->size);
qemu_put_be32(file, dev->status);
qemu_put_be32(file, dev->channel);
qemu_put_be32(file, dev->wakes);
qemu_put_be64(file, dev->params_addr);
int count = 0;
for ( pipe = dev->pipes; pipe; pipe = pipe->next )
count++;
qemu_put_sbe32(file, count);
for ( pipe = dev->pipes; pipe; pipe = pipe->next ) {
pipe_save(pipe, file);
}
}
示例10: pxa2xx_timer_save
static void pxa2xx_timer_save(QEMUFile *f, void *opaque)
{
pxa2xx_timer_info *s = (pxa2xx_timer_info *) opaque;
int i;
qemu_put_be32s(f, &s->clock);
qemu_put_be32s(f, &s->oldclock);
qemu_put_be64s(f, &s->lastload);
for (i = 0; i < 4; i ++) {
qemu_put_be32s(f, &s->timer[i].value);
qemu_put_be32(f, s->timer[i].level);
}
if (s->tm4)
for (i = 0; i < 8; i ++) {
qemu_put_be32s(f, &s->tm4[i].tm.value);
qemu_put_be32(f, s->tm4[i].tm.level);
qemu_put_be32s(f, &s->tm4[i].oldclock);
qemu_put_be32s(f, &s->tm4[i].clock);
qemu_put_be64s(f, &s->tm4[i].lastload);
qemu_put_be32s(f, &s->tm4[i].freq);
qemu_put_be32s(f, &s->tm4[i].control);
}
qemu_put_be32s(f, &s->events);
qemu_put_be32s(f, &s->irq_enabled);
qemu_put_be32s(f, &s->reset3);
qemu_put_be32s(f, &s->snapshot);
}
示例11: virtio_mmio_save_config
static void virtio_mmio_save_config(DeviceState *opaque, QEMUFile *f)
{
VirtIOMMIOProxy *proxy = VIRTIO_MMIO(opaque);
qemu_put_be32(f, proxy->host_features_sel);
qemu_put_be32(f, proxy->guest_features_sel);
qemu_put_be32(f, proxy->guest_page_shift);
}
示例12: arm_timer_save
static void arm_timer_save(QEMUFile *f, void *opaque)
{
arm_timer_state *s = (arm_timer_state *)opaque;
qemu_put_be32(f, s->control);
qemu_put_be32(f, s->limit);
qemu_put_be32(f, s->int_level);
qemu_put_ptimer(f, s->timer);
}
示例13: goldfish_audio_buff_put
static void
goldfish_audio_buff_put( struct goldfish_audio_buff* b, QEMUFile* f )
{
qemu_put_be32(f, b->address );
qemu_put_be32(f, b->length );
qemu_put_be32(f, b->offset );
qemu_put_buffer(f, b->data, b->length );
}
示例14: omap3_l4ta_save_state
static void omap3_l4ta_save_state(QEMUFile *f, void *opaque)
{
struct omap_target_agent_s *s = (struct omap_target_agent_s *)opaque;
qemu_put_be32(f, s->control);
qemu_put_be32(f, s->control_h);
qemu_put_be32(f, s->status);
}
示例15: ps2_common_save
static void ps2_common_save (QEMUFile *f, PS2State *s)
{
qemu_put_be32 (f, s->write_cmd);
qemu_put_be32 (f, s->queue.rptr);
qemu_put_be32 (f, s->queue.wptr);
qemu_put_be32 (f, s->queue.count);
qemu_put_buffer (f, s->queue.data, sizeof (s->queue.data));
}