Lines Matching +full:ipmi +full:- +full:bt
2 * QEMU ISA IPMI BT emulation
29 #include "hw/ipmi/ipmi_bt.h"
31 #include "hw/qdev-properties.h"
34 #include "hw/acpi/ipmi.h"
36 #define TYPE_ISA_IPMI_BT "isa-ipmi-bt"
43 IPMIBT bt; member
51 ipmi_bt_get_fwinfo(&iib->bt, info); in isa_ipmi_bt_get_fwinfo()
52 info->interrupt_number = iib->isairq; in isa_ipmi_bt_get_fwinfo()
53 info->i2c_slave_address = iib->bt.bmc->slave_addr; in isa_ipmi_bt_get_fwinfo()
54 info->uuid = iib->uuid; in isa_ipmi_bt_get_fwinfo()
59 ISAIPMIBTDevice *iib = ib->opaque; in isa_ipmi_bt_raise_irq()
61 qemu_irq_raise(iib->irq); in isa_ipmi_bt_raise_irq()
66 ISAIPMIBTDevice *iib = ib->opaque; in isa_ipmi_bt_lower_irq()
68 qemu_irq_lower(iib->irq); in isa_ipmi_bt_lower_irq()
72 .name = TYPE_IPMI_INTERFACE_PREFIX "isa-bt",
81 VMSTATE_STRUCT(bt, ISAIPMIBTDevice, 1, vmstate_IPMIBT, IPMIBT),
94 if (!iib->bt.bmc) { in isa_ipmi_bt_realize()
95 error_setg(errp, "IPMI device requires a bmc attribute to be set"); in isa_ipmi_bt_realize()
99 iib->uuid = ipmi_next_uuid(); in isa_ipmi_bt_realize()
101 iib->bt.bmc->intf = ii; in isa_ipmi_bt_realize()
102 iib->bt.opaque = iib; in isa_ipmi_bt_realize()
104 iic->init(ii, 0, &err); in isa_ipmi_bt_realize()
110 if (iib->isairq > 0) { in isa_ipmi_bt_realize()
111 iib->irq = isa_get_irq(isadev, iib->isairq); in isa_ipmi_bt_realize()
112 iib->bt.use_irq = 1; in isa_ipmi_bt_realize()
113 iib->bt.raise_irq = isa_ipmi_bt_raise_irq; in isa_ipmi_bt_realize()
114 iib->bt.lower_irq = isa_ipmi_bt_lower_irq; in isa_ipmi_bt_realize()
117 qdev_set_legacy_instance_id(dev, iib->bt.io_base, iib->bt.io_length); in isa_ipmi_bt_realize()
119 isa_register_ioport(isadev, &iib->bt.io, iib->bt.io_base); in isa_ipmi_bt_realize()
128 ipmi_bmc_find_and_link(obj, (Object **) &iib->bt.bmc); in isa_ipmi_bt_init()
135 return &iib->bt; in isa_ipmi_bt_get_backend_data()
139 DEFINE_PROP_UINT32("ioport", ISAIPMIBTDevice, bt.io_base, 0xe4),
150 dc->realize = isa_ipmi_bt_realize; in isa_ipmi_bt_class_init()
153 iic->get_backend_data = isa_ipmi_bt_get_backend_data; in isa_ipmi_bt_class_init()
155 iic->get_fwinfo = isa_ipmi_bt_get_fwinfo; in isa_ipmi_bt_class_init()
156 adevc->build_dev_aml = build_ipmi_dev_aml; in isa_ipmi_bt_class_init()