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

C++ APIC_COMMON函数代码示例

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

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



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

示例1: apic_handle_tpr_access_report

void apic_handle_tpr_access_report(DeviceState *dev, target_ulong ip,
                                   TPRAccess access)
{
    APICCommonState *s = APIC_COMMON(dev);

    vapic_report_tpr_access(s->vapic, CPU(s->cpu), ip, access);
}
开发者ID:32bitmicro,项目名称:riscv-qemu,代码行数:7,代码来源:apic_common.c


示例2: apic_init_reset

void apic_init_reset(DeviceState *dev)
{
    APICCommonState *s = APIC_COMMON(dev);
    int i;

    if (!s) {
        return;
    }
    s->tpr = 0;
    s->spurious_vec = 0xff;
    s->log_dest = 0;
    s->dest_mode = 0xf;
    memset(s->isr, 0, sizeof(s->isr));
    memset(s->tmr, 0, sizeof(s->tmr));
    memset(s->irr, 0, sizeof(s->irr));
    for (i = 0; i < APIC_LVT_NB; i++) {
        s->lvt[i] = APIC_LVT_MASKED;
    }
    s->esr = 0;
    memset(s->icr, 0, sizeof(s->icr));
    s->divide_conf = 0;
    s->count_shift = 0;
    s->initial_count = 0;
    s->initial_count_load_time = 0;
    s->next_time = 0;
    s->wait_for_sipi = !cpu_is_bsp(s->cpu);

    if (s->timer) {
        timer_del(s->timer);
    }
    s->timer_expiry = -1;
}
开发者ID:android-energy,项目名称:platform_external_qemu-android,代码行数:32,代码来源:apic_common.c


示例3: apic_common_realize

static void apic_common_realize(struct uc_struct *uc, DeviceState *dev, Error **errp)
{
    APICCommonState *s = APIC_COMMON(uc, dev);
    APICCommonClass *info;

    if (uc->apic_no >= MAX_APICS) {
        error_setg(errp, "%s initialization failed.",
                   object_get_typename(OBJECT(dev)));
        return;
    }
    s->idx = uc->apic_no++;

    info = APIC_COMMON_GET_CLASS(uc, s);
    info->realize(uc, dev, errp);
    if (!uc->mmio_registered) {
        ICCBus *b = ICC_BUS(uc, qdev_get_parent_bus(dev));
        memory_region_add_subregion(b->apic_address_space, 0, &s->io_memory);
        uc->mmio_registered = true;
    }

    /* Note: We need at least 1M to map the VAPIC option ROM */
    if (!uc->vapic && s->vapic_control & VAPIC_ENABLE_MASK) {
        // ram_size >= 1024 * 1024) {	// FIXME
        uc->vapic = NULL;
    }
    s->vapic = uc->vapic;
    if (uc->apic_report_tpr_access && info->enable_tpr_reporting) {
        info->enable_tpr_reporting(s, true);
    }
}
开发者ID:Jonnyliu,项目名称:unicorn,代码行数:30,代码来源:apic_common.c


示例4: apic_common_realize

static void apic_common_realize(DeviceState *dev, Error **errp)
{
    APICCommonState *s = APIC_COMMON(dev);
    APICCommonClass *info;
    static DeviceState *vapic;
    int instance_id = s->id;

    info = APIC_COMMON_GET_CLASS(s);
    info->realize(dev, errp);

    /* Note: We need at least 1M to map the VAPIC option ROM */
    if (!vapic && s->vapic_control & VAPIC_ENABLE_MASK &&
        ram_size >= 1024 * 1024) {
        vapic = sysbus_create_simple("kvmvapic", -1, NULL);
    }
    s->vapic = vapic;
    if (apic_report_tpr_access && info->enable_tpr_reporting) {
        info->enable_tpr_reporting(s, true);
    }

    if (s->legacy_instance_id) {
        instance_id = -1;
    }
    vmstate_register_with_alias_id(NULL, instance_id, &vmstate_apic_common,
                                   s, -1, 0);
}
开发者ID:AppliedMicro,项目名称:qemu,代码行数:26,代码来源:apic_common.c


示例5: apic_common_realize

static void apic_common_realize(DeviceState *dev, Error **errp)
{
    APICCommonState *s = APIC_COMMON(dev);
    APICCommonClass *info;
    static DeviceState *vapic;
    static int apic_no;
    static bool mmio_registered;

    if (apic_no >= MAX_APICS) {
        error_setg(errp, "%s initialization failed.",
                   object_get_typename(OBJECT(dev)));
        return;
    }
    s->idx = apic_no++;

    info = APIC_COMMON_GET_CLASS(s);
    info->realize(dev, errp);
    if (!mmio_registered) {
        ICCBus *b = ICC_BUS(qdev_get_parent_bus(dev));
        memory_region_add_subregion(b->apic_address_space, 0, &s->io_memory);
        mmio_registered = true;
    }

    /* Note: We need at least 1M to map the VAPIC option ROM */
    if (!vapic && s->vapic_control & VAPIC_ENABLE_MASK &&
        ram_size >= 1024 * 1024) {
        vapic = sysbus_create_simple("kvmvapic", -1, NULL);
    }
    s->vapic = vapic;
    if (apic_report_tpr_access && info->enable_tpr_reporting) {
        info->enable_tpr_reporting(s, true);
    }

}
开发者ID:C2Devel,项目名称:qemu-kvm,代码行数:34,代码来源:apic_common.c


示例6: apic_common_realize

static void apic_common_realize(DeviceState *dev, Error **errp)
{
    APICCommonState *s = APIC_COMMON(dev);
    APICCommonClass *info;
    static DeviceState *vapic;
    static int apic_no;

    if (apic_no >= MAX_APICS) {
        error_setg(errp, "%s initialization failed.",
                   object_get_typename(OBJECT(dev)));
        return;
    }
    s->idx = apic_no++;

    info = APIC_COMMON_GET_CLASS(s);
    info->realize(dev, errp);

    /* Note: We need at least 1M to map the VAPIC option ROM */
    if (!vapic && s->vapic_control & VAPIC_ENABLE_MASK &&
        ram_size >= 1024 * 1024) {
        vapic = sysbus_create_simple("kvmvapic", -1, NULL);
    }
    s->vapic = vapic;
    if (apic_report_tpr_access && info->enable_tpr_reporting) {
        info->enable_tpr_reporting(s, true);
    }

}
开发者ID:32bitmicro,项目名称:riscv-qemu,代码行数:28,代码来源:apic_common.c


示例7: apic_init_common

static int apic_init_common(SysBusDevice *dev)
{
    APICCommonState *s = APIC_COMMON(dev);
    APICCommonClass *info;
    static DeviceState *vapic;
    static int apic_no;

    if (apic_no >= MAX_APICS) {
        return -1;
    }
    s->idx = apic_no++;

    info = APIC_COMMON_GET_CLASS(s);
    info->init(s);

    sysbus_init_mmio(dev, &s->io_memory);

    /* Note: We need at least 1M to map the VAPIC option ROM */
    if (!vapic && s->vapic_control & VAPIC_ENABLE_MASK &&
        ram_size >= 1024 * 1024) {
        vapic = sysbus_create_simple("kvmvapic", -1, NULL);
    }
    s->vapic = vapic;
    if (apic_report_tpr_access && info->enable_tpr_reporting) {
        info->enable_tpr_reporting(s, true);
    }

    return 0;
}
开发者ID:BreakawayConsulting,项目名称:QEMU,代码行数:29,代码来源:apic_common.c


示例8: apic_deliver_nmi

void apic_deliver_nmi(DeviceState *dev)
{
    APICCommonState *s = APIC_COMMON(dev);
    APICCommonClass *info = APIC_COMMON_GET_CLASS(s);

    info->external_nmi(s);
}
开发者ID:32bitmicro,项目名称:riscv-qemu,代码行数:7,代码来源:apic_common.c


示例9: apic_enable_vapic

void apic_enable_vapic(DeviceState *dev, hwaddr paddr)
{
    APICCommonState *s = APIC_COMMON(dev);
    APICCommonClass *info = APIC_COMMON_GET_CLASS(s);

    s->vapic_paddr = paddr;
    info->vapic_base_update(s);
}
开发者ID:32bitmicro,项目名称:riscv-qemu,代码行数:8,代码来源:apic_common.c


示例10: cpu_set_apic_base

void cpu_set_apic_base(struct uc_struct *uc, DeviceState *dev, uint64_t val)
{
    if (dev) {
        APICCommonState *s = APIC_COMMON(uc, dev);
        APICCommonClass *info = APIC_COMMON_GET_CLASS(uc, s);
        info->set_base(s, val);
    }
}
开发者ID:Jonnyliu,项目名称:unicorn,代码行数:8,代码来源:apic_common.c


示例11: apic_common_get_id

static void apic_common_get_id(Object *obj, Visitor *v, const char *name,
                               void *opaque, Error **errp)
{
    APICCommonState *s = APIC_COMMON(obj);
    uint32_t value;

    value = s->apicbase & MSR_IA32_APICBASE_EXTD ? s->initial_apic_id : s->id;
    visit_type_uint32(v, name, &value, errp);
}
开发者ID:8tab,项目名称:qemu,代码行数:9,代码来源:apic_common.c


示例12: apic_designate_bsp

void apic_designate_bsp(DeviceState *d)
{
    if (d == NULL) {
        return;
    }

    APICCommonState *s = APIC_COMMON(d);
    s->apicbase |= MSR_IA32_APICBASE_BSP;
}
开发者ID:BreakawayConsulting,项目名称:QEMU,代码行数:9,代码来源:apic_common.c


示例13: apic_designate_bsp

void apic_designate_bsp(struct uc_struct *uc, DeviceState *dev)
{
    if (dev == NULL) {
        return;
    }

    APICCommonState *s = APIC_COMMON(uc, dev);
    s->apicbase |= MSR_IA32_APICBASE_BSP;
}
开发者ID:Jonnyliu,项目名称:unicorn,代码行数:9,代码来源:apic_common.c


示例14: cpu_get_apic_base

uint64_t cpu_get_apic_base(struct uc_struct *uc, DeviceState *dev)
{
    if (dev) {
        APICCommonState *s = APIC_COMMON(uc, dev);
        return s->apicbase;
    } else {
        return MSR_IA32_APICBASE_BSP;
    }
}
开发者ID:Jonnyliu,项目名称:unicorn,代码行数:9,代码来源:apic_common.c


示例15: apic_dispatch_pre_save

static void apic_dispatch_pre_save(void *opaque)
{
    APICCommonState *s = APIC_COMMON(opaque);
    APICCommonClass *info = APIC_COMMON_GET_CLASS(s);

    if (info->pre_save) {
        info->pre_save(s);
    }
}
开发者ID:32bitmicro,项目名称:riscv-qemu,代码行数:9,代码来源:apic_common.c


示例16: apic_common_initfn

static void apic_common_initfn(Object *obj)
{
    APICCommonState *s = APIC_COMMON(obj);

    s->id = s->initial_apic_id = -1;
    object_property_add(obj, "id", "uint32",
                        apic_common_get_id,
                        apic_common_set_id, NULL, NULL, NULL);
}
开发者ID:8tab,项目名称:qemu,代码行数:9,代码来源:apic_common.c


示例17: apic_dispatch_post_load

static int apic_dispatch_post_load(void *opaque, int version_id)
{
    APICCommonState *s = APIC_COMMON(opaque);
    APICCommonClass *info = APIC_COMMON_GET_CLASS(s);

    if (info->post_load) {
        info->post_load(s);
    }
    return 0;
}
开发者ID:32bitmicro,项目名称:riscv-qemu,代码行数:10,代码来源:apic_common.c


示例18: apic_enable_tpr_access_reporting

void apic_enable_tpr_access_reporting(DeviceState *dev, bool enable)
{
    APICCommonState *s = APIC_COMMON(dev);
    APICCommonClass *info = APIC_COMMON_GET_CLASS(s);

    apic_report_tpr_access = enable;
    if (info->enable_tpr_reporting) {
        info->enable_tpr_reporting(s, enable);
    }
}
开发者ID:32bitmicro,项目名称:riscv-qemu,代码行数:10,代码来源:apic_common.c


示例19: cpu_set_apic_base

void cpu_set_apic_base(DeviceState *dev, uint64_t val)
{
    trace_cpu_set_apic_base(val);

    if (dev) {
        APICCommonState *s = APIC_COMMON(dev);
        APICCommonClass *info = APIC_COMMON_GET_CLASS(s);
        info->set_base(s, val);
    }
}
开发者ID:32bitmicro,项目名称:riscv-qemu,代码行数:10,代码来源:apic_common.c


示例20: cpu_get_apic_base

uint64_t cpu_get_apic_base(DeviceState *dev)
{
    if (dev) {
        APICCommonState *s = APIC_COMMON(dev);
        trace_cpu_get_apic_base((uint64_t)s->apicbase);
        return s->apicbase;
    } else {
        trace_cpu_get_apic_base(MSR_IA32_APICBASE_BSP);
        return MSR_IA32_APICBASE_BSP;
    }
}
开发者ID:32bitmicro,项目名称:riscv-qemu,代码行数:11,代码来源:apic_common.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ APIFunctionError函数代码示例发布时间:2022-05-30
下一篇:
C++ AP4_SUCCEEDED函数代码示例发布时间: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