示例#1
0
文件: i8259.c 项目: MatzeB/qemu-fixes
static void pic_ioport_write(void *opaque, target_phys_addr_t addr64,
                             uint64_t val64, unsigned size)
{
    PICCommonState *s = opaque;
    uint32_t addr = addr64;
    uint32_t val = val64;
    int priority, cmd, irq;

    DPRINTF("write: addr=0x%02x val=0x%02x\n", addr, val);
    if (addr == 0) {
        if (val & 0x10) {
            pic_init_reset(s);
            s->init_state = 1;
            s->init4 = val & 1;
            s->single_mode = val & 2;
            if (val & 0x08) {
                hw_error("level sensitive irq not supported");
            }
        } else if (val & 0x08) {
            if (val & 0x04) {
                s->poll = 1;
            }
            if (val & 0x02) {
                s->read_reg_select = val & 1;
            }
            if (val & 0x40) {
                s->special_mask = (val >> 5) & 1;
            }
        } else {
示例#2
0
文件: i8259.c 项目: BananaSlug/esesc
static void pic_reset(DeviceState *dev)
{
    PicState *s = container_of(dev, PicState, dev.qdev);

    pic_init_reset(s);
    s->elcr = 0;
}
示例#3
0
文件: i8259.c 项目: MatzeB/qemu-fixes
static void pic_reset(DeviceState *dev)
{
    PICCommonState *s = DO_UPCAST(PICCommonState, dev.qdev, dev);

    pic_init_reset(s);
    s->elcr = 0;
}
示例#4
0
文件: i8259.c 项目: 01org/qemu-lite
static void pic_reset(DeviceState *dev)
{
    PICCommonState *s = PIC_COMMON(dev);

    s->elcr = 0;
    pic_init_reset(s);
}