• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ qemu_get_be32s函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中qemu_get_be32s函数的典型用法代码示例。如果您正苦于以下问题:C++ qemu_get_be32s函数的具体用法?C++ qemu_get_be32s怎么用?C++ qemu_get_be32s使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了qemu_get_be32s函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: tcx_load

static int tcx_load(QEMUFile *f, void *opaque, int version_id)
{
    TCXState *s = opaque;
    uint32_t dummy;

    if (version_id != 3 && version_id != 4)
        return -EINVAL;

    if (version_id == 3) {
        qemu_get_be32s(f, &dummy);
        qemu_get_be32s(f, &dummy);
        qemu_get_be32s(f, &dummy);
    }
    qemu_get_be16s(f, &s->height);
    qemu_get_be16s(f, &s->width);
    qemu_get_be16s(f, &s->depth);
    qemu_get_buffer(f, s->r, 256);
    qemu_get_buffer(f, s->g, 256);
    qemu_get_buffer(f, s->b, 256);
    qemu_get_8s(f, &s->dac_index);
    qemu_get_8s(f, &s->dac_state);
    update_palette_entries(s, 0, 256);
    if (s->depth == 24)
        tcx24_invalidate_display(s);
    else
        tcx_invalidate_display(s);

    return 0;
}
开发者ID:BackupTheBerlios,项目名称:ar7-firmware-svn,代码行数:29,代码来源:tcx.c


示例2: ps2_common_load

static void ps2_common_load (QEMUFile *f, PS2State *s)
{
    qemu_get_be32s (f, &s->write_cmd);
    qemu_get_be32s (f, &s->queue.rptr);
    qemu_get_be32s (f, &s->queue.wptr);
    qemu_get_be32s (f, &s->queue.count);
    qemu_get_buffer (f, s->queue.data, sizeof (s->queue.data));
}
开发者ID:hackndev,项目名称:qemu,代码行数:8,代码来源:ps2.c


示例3: get_cpudouble

static int get_cpudouble(QEMUFile *f, void *pv, size_t size,
                         VMStateField *field)
{
    CPU_DoubleU *v = pv;
    qemu_get_be32s(f, &v->l.upper);
    qemu_get_be32s(f, &v->l.lower);
    return 0;
}
开发者ID:mmuman,项目名称:qemu,代码行数:8,代码来源:vmstate.c


示例4: cpu_get_timer

void cpu_get_timer(QEMUFile *f, CPUTimer *s)
{
    qemu_get_be32s(f, &s->frequency);
    qemu_get_be32s(f, &s->disabled);
    qemu_get_be64s(f, &s->disabled_mask);
    qemu_get_sbe64s(f, &s->clock_offset);

    qemu_get_timer(f, s->qtimer);
}
开发者ID:nvgreensocs,项目名称:qemu-arm-mmio,代码行数:9,代码来源:sun4u.c


示例5: ps2_kbd_load

static int ps2_kbd_load(QEMUFile* f, void* opaque, int version_id)
{
    PS2KbdState *s = (PS2KbdState*)opaque;

    if (version_id != 2)
        return -EINVAL;

    ps2_common_load (f, &s->common);
    qemu_get_be32s(f, &s->scan_enabled);
    qemu_get_be32s(f, &s->translate);
    return 0;
}
开发者ID:hackndev,项目名称:qemu,代码行数:12,代码来源:ps2.c


示例6: load_fpu

static void load_fpu(QEMUFile *f, CPUMIPSFPUContext *fpu)
{
    int i;

    for(i = 0; i < 32; i++)
        qemu_get_be64s(f, &fpu->fpr[i].d);
    qemu_get_s8s(f, &fpu->fp_status.float_detect_tininess);
    qemu_get_s8s(f, &fpu->fp_status.float_rounding_mode);
    qemu_get_s8s(f, &fpu->fp_status.float_exception_flags);
    qemu_get_be32s(f, &fpu->fcr0);
    qemu_get_be32s(f, &fpu->fcr31);
}
开发者ID:CriGio,项目名称:platform_external_qemu,代码行数:12,代码来源:machine.c


示例7: get_tlb

static int get_tlb(QEMUFile *f, void *pv, size_t size)
{
    r4k_tlb_t *v = pv;
    uint16_t flags;

    qemu_get_betls(f, &v->VPN);
    qemu_get_be32s(f, &v->PageMask);
    qemu_get_8s(f, &v->ASID);
    qemu_get_be16s(f, &flags);
    v->G = (flags >> 10) & 1;
    v->C0 = (flags >> 7) & 3;
    v->C1 = (flags >> 4) & 3;
    v->V0 = (flags >> 3) & 1;
    v->V1 = (flags >> 2) & 1;
    v->D0 = (flags >> 1) & 1;
    v->D1 = (flags >> 0) & 1;
    v->EHINV = (flags >> 15) & 1;
    v->RI1 = (flags >> 14) & 1;
    v->RI0 = (flags >> 13) & 1;
    v->XI1 = (flags >> 12) & 1;
    v->XI0 = (flags >> 11) & 1;
    qemu_get_betls(f, &v->PFN[0]);
    qemu_get_betls(f, &v->PFN[1]);

    return 0;
}
开发者ID:AdrianHuang,项目名称:qemu,代码行数:26,代码来源:machine.c


示例8: pxa2xx_keypad_load

static int pxa2xx_keypad_load(QEMUFile *f, void *opaque, int version_id)
{
    PXA2xxKeyPadState *s = (PXA2xxKeyPadState *) opaque;

    qemu_get_be32s(f, &s->kpc);
    qemu_get_be32s(f, &s->kpdk);
    qemu_get_be32s(f, &s->kprec);
    qemu_get_be32s(f, &s->kpmk);
    qemu_get_be32s(f, &s->kpas);
    qemu_get_be32s(f, &s->kpasmkp[0]);
    qemu_get_be32s(f, &s->kpasmkp[1]);
    qemu_get_be32s(f, &s->kpasmkp[2]);
    qemu_get_be32s(f, &s->kpasmkp[3]);
    qemu_get_be32s(f, &s->kpkdi);

    return 0;
}
开发者ID:Anastasiia-Lada,项目名称:QEMU-s5l89xx-port,代码行数:17,代码来源:pxa2xx_keypad.c


示例9: get_uint32_equal

static int get_uint32_equal(QEMUFile *f, void *pv, size_t size)
{
    uint32_t *v = pv;
    uint32_t v2;
    qemu_get_be32s(f, &v2);

    if (*v == v2) {
        return 0;
    }
    return -EINVAL;
}
开发者ID:Bludge0n,项目名称:qemu,代码行数:11,代码来源:vmstate.c


示例10: ps2_mouse_load

static int ps2_mouse_load(QEMUFile* f, void* opaque, int version_id)
{
    PS2MouseState *s = (PS2MouseState*)opaque;

    if (version_id != 2)
        return -EINVAL;

    ps2_common_load (f, &s->common);
    qemu_get_8s(f, &s->mouse_status);
    qemu_get_8s(f, &s->mouse_resolution);
    qemu_get_8s(f, &s->mouse_sample_rate);
    qemu_get_8s(f, &s->mouse_wrap);
    qemu_get_8s(f, &s->mouse_type);
    qemu_get_8s(f, &s->mouse_detect_state);
    qemu_get_be32s(f, &s->mouse_dx);
    qemu_get_be32s(f, &s->mouse_dy);
    qemu_get_be32s(f, &s->mouse_dz);
    qemu_get_8s(f, &s->mouse_buttons);
    return 0;
}
开发者ID:hackndev,项目名称:qemu,代码行数:20,代码来源:ps2.c


示例11: dma_load

static int dma_load(QEMUFile *f, void *opaque, int version_id)
{
    DMAState *s = opaque;
    unsigned int i;

    if (version_id != 1)
        return -EINVAL;
    for (i = 0; i < DMA_REGS; i++)
        qemu_get_be32s(f, &s->dmaregs[i]);

    return 0;
}
开发者ID:AmesianX,项目名称:winkvm,代码行数:12,代码来源:sparc32_dma.c


示例12: get_uint32_equal

static int get_uint32_equal(QEMUFile *f, void *pv, size_t size,
                            VMStateField *field)
{
    uint32_t *v = pv;
    uint32_t v2;
    qemu_get_be32s(f, &v2);

    if (*v == v2) {
        return 0;
    }
    error_report("%" PRIx32 " != %" PRIx32, *v, v2);
    return -EINVAL;
}
开发者ID:mmuman,项目名称:qemu,代码行数:13,代码来源:vmstate.c


示例13: pxa2xx_mmci_load

static int pxa2xx_mmci_load(QEMUFile *f, void *opaque, int version_id)
{
    PXA2xxMMCIState *s = (PXA2xxMMCIState *) opaque;
    int i;

    qemu_get_be32s(f, &s->status);
    qemu_get_be32s(f, &s->clkrt);
    qemu_get_be32s(f, &s->spi);
    qemu_get_be32s(f, &s->cmdat);
    qemu_get_be32s(f, &s->resp_tout);
    qemu_get_be32s(f, &s->read_tout);
    s->blklen = qemu_get_be32(f);
    s->numblk = qemu_get_be32(f);
    qemu_get_be32s(f, &s->intmask);
    qemu_get_be32s(f, &s->intreq);
    s->cmd = qemu_get_be32(f);
    qemu_get_be32s(f, &s->arg);
    s->cmdreq = qemu_get_be32(f);
    s->active = qemu_get_be32(f);
    s->bytesleft = qemu_get_be32(f);

    s->tx_len = qemu_get_byte(f);
    s->tx_start = 0;
    if (s->tx_len >= sizeof(s->tx_fifo) || s->tx_len < 0)
        return -EINVAL;
    for (i = 0; i < s->tx_len; i ++)
        s->tx_fifo[i] = qemu_get_byte(f);

    s->rx_len = qemu_get_byte(f);
    s->rx_start = 0;
    if (s->rx_len >= sizeof(s->rx_fifo) || s->rx_len < 0)
        return -EINVAL;
    for (i = 0; i < s->rx_len; i ++)
        s->rx_fifo[i] = qemu_get_byte(f);

    s->resp_len = qemu_get_byte(f);
    if (s->resp_len > 9 || s->resp_len < 0)
        return -EINVAL;
    for (i = s->resp_len; i < 9; i ++)
         qemu_get_be16s(f, &s->resp_fifo[i]);

    return 0;
}
开发者ID:16aug,项目名称:nvmeqemu,代码行数:43,代码来源:pxa2xx_mmci.c


示例14: cs_load

static int cs_load(QEMUFile *f, void *opaque, int version_id)
{
    CSState *s = opaque;
    unsigned int i;

    if (version_id > 1)
        return -EINVAL;

    for (i = 0; i < CS_REGS; i++)
        qemu_get_be32s(f, &s->regs[i]);

    qemu_get_buffer(f, s->dregs, CS_DREGS);
    return 0;
}
开发者ID:AmesianX,项目名称:winkvm,代码行数:14,代码来源:cs4231.c


示例15: sbi_load

static int sbi_load(QEMUFile *f, void *opaque, int version_id)
{
    SBIState *s = opaque;
    unsigned int i;

    if (version_id != 1)
        return -EINVAL;

    for (i = 0; i < MAX_CPUS; i++) {
        qemu_get_be32s(f, &s->intreg_pending[i]);
    }

    return 0;
}
开发者ID:ESOS-Lab,项目名称:VSSIM,代码行数:14,代码来源:sbi.c


示例16: virtio_load

int virtio_load(VirtIODevice *vdev, QEMUFile *f)
{
    int num, i, ret;
    uint32_t features;
    uint32_t supported_features =
        vdev->binding->get_features(vdev->binding_opaque);

    if (vdev->binding->load_config) {
        ret = vdev->binding->load_config(vdev->binding_opaque, f);
        if (ret)
            return ret;
    }

    qemu_get_8s(f, &vdev->status);
    qemu_get_8s(f, &vdev->isr);
    qemu_get_be16s(f, &vdev->queue_sel);
    qemu_get_be32s(f, &features);
    if (features & ~supported_features) {
        fprintf(stderr, "Features 0x%x unsupported. Allowed features: 0x%x\n",
                features, supported_features);
        return -1;
    }
    vdev->guest_features = features;
    vdev->config_len = qemu_get_be32(f);
    qemu_get_buffer(f, vdev->config, vdev->config_len);

    num = qemu_get_be32(f);

    for (i = 0; i < num; i++) {
        vdev->vq[i].vring.num = qemu_get_be32(f);
        vdev->vq[i].pa = qemu_get_be64(f);
        qemu_get_be16s(f, &vdev->vq[i].last_avail_idx);

        if (vdev->vq[i].pa) {
            virtqueue_init(&vdev->vq[i]);
        }
        if (vdev->binding->load_queue) {
            ret = vdev->binding->load_queue(vdev->binding_opaque, i, f);
            if (ret)
                return ret;
        }
    }

    virtio_notify_vector(vdev, VIRTIO_NO_VECTOR);
    return 0;
}
开发者ID:iggy,项目名称:qemu,代码行数:46,代码来源:virtio.c


示例17: vmmouse_load

static int vmmouse_load(QEMUFile *f, void *opaque, int version_id)
{
    VMMouseState *s = (VMMouseState *)opaque;
    int i;

    if (version_id != 0)
        return -EINVAL;

    if (qemu_get_be32(f) != VMMOUSE_QUEUE_SIZE)
        return -EINVAL;
    for (i = 0; i < VMMOUSE_QUEUE_SIZE; i++)
        qemu_get_be32s(f, &s->queue[i]);
    qemu_get_be16s(f, &s->nb_queue);
    qemu_get_be16s(f, &s->status);
    qemu_get_8s(f, &s->absolute);

    vmmouse_update_handler(s);

    return 0;
}
开发者ID:doniexun,项目名称:MemCheck,代码行数:20,代码来源:vmmouse.c


示例18: s3c_rtc_load

static int s3c_rtc_load(QEMUFile *f, void *opaque, int version_id)
{
    struct s3c_rtc_state_s *s = (struct s3c_rtc_state_s *) opaque;
    qemu_get_sbe64s(f, &s->next);
    qemu_get_8s(f, &s->control);
    qemu_get_8s(f, &s->tick);
    qemu_get_8s(f, &s->alarm);
    qemu_get_8s(f, &s->almsec);
    qemu_get_8s(f, &s->almmin);
    qemu_get_8s(f, &s->almday);
    qemu_get_8s(f, &s->almhour);
    qemu_get_8s(f, &s->almmon);
    qemu_get_8s(f, &s->almyear);
    qemu_get_8s(f, &s->reset);
    qemu_get_be32s(f, &s->sec);

    s->enable = (s->control == 0x1);
    s3c_rtc_tick_mod(s);

    return 0;
}
开发者ID:polachok,项目名称:qemu-n311,代码行数:21,代码来源:s3c24xx_rtc.c


示例19: mipsnet_load

static int mipsnet_load(QEMUFile *f, void *opaque, int version_id)
{
    MIPSnetState *s = opaque;

    if (version_id > 0)
        return -EINVAL;

    qemu_get_be32s(f, &s->busy);
    qemu_get_be32s(f, &s->rx_count);
    qemu_get_be32s(f, &s->rx_read);
    qemu_get_be32s(f, &s->tx_count);
    qemu_get_be32s(f, &s->tx_written);
    qemu_get_be32s(f, &s->intctl);
    qemu_get_buffer(f, s->rx_buffer, MAX_ETH_FRAME_SIZE);
    qemu_get_buffer(f, s->tx_buffer, MAX_ETH_FRAME_SIZE);

    return 0;
}
开发者ID:SymbianSource,项目名称:oss.FCL.interim.QEMU,代码行数:18,代码来源:mipsnet.c


示例20: esp_load

static int esp_load(QEMUFile *f, void *opaque, int version_id)
{
    ESPState *s = opaque;

    if (version_id != 3)
        return -EINVAL; // Cannot emulate 2

    qemu_get_buffer(f, s->rregs, ESP_REGS);
    qemu_get_buffer(f, s->wregs, ESP_REGS);
    qemu_get_sbe32s(f, &s->ti_size);
    qemu_get_be32s(f, &s->ti_rptr);
    qemu_get_be32s(f, &s->ti_wptr);
    qemu_get_buffer(f, s->ti_buf, TI_BUFSZ);
    qemu_get_be32s(f, &s->sense);
    qemu_get_be32s(f, &s->dma);
    qemu_get_buffer(f, s->cmdbuf, TI_BUFSZ);
    qemu_get_be32s(f, &s->cmdlen);
    qemu_get_be32s(f, &s->do_cmd);
    qemu_get_be32s(f, &s->dma_left);

    return 0;
}
开发者ID:SymbianSource,项目名称:oss.FCL.interim.QEMU,代码行数:22,代码来源:esp.c



注:本文中的qemu_get_be32s函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ qemu_get_be64函数代码示例发布时间:2022-05-30
下一篇:
C++ qemu_free函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap