q35: two little patches
PATCH 1/2 q35: add ich9 intel hda controller
In reply to Gerd HoffmannSigned-off-by Gerd Hoffmann <[email protected]>
--- hw/intel-hda.c | 41 ++++++++++++++++++++++++++++++++++------- 1 files changed, 34 insertions(+), 7 deletions(-)
hw/intel-hda.c +34 -7
@@ -1232,7 +1232,7 @@ static Property intel_hda_properties[] = { DEFINE_PROP_END_OF_LIST(), }; -static void intel_hda_class_init (ObjectClass *klass,void *data) +static void intel_hda_class_init_common (ObjectClass *klass) {DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass);
@@ -1240,20 +1240,46 @@ static void intel_hda_class_init(ObjectClass *klass, void *data) k->init = intel_hda_init; k->exit = intel_hda_exit; k->vendor_id =PCI_VENDOR_ID_INTEL ; - k->device_id =0x2668 ; - k->revision =1 ; k->class_id =PCI_CLASS_MULTIMEDIA_HD_AUDIO ; - dc->desc ="Intel HD Audio Controller" ; dc->reset = intel_hda_reset; dc->vmsd = &vmstate_intel_hda; dc->props = intel_hda_properties; } -static TypeInfo intel_hda_info = { +static void intel_hda_class_init_ich6 (ObjectClass *klass,void *data) +{ +DeviceClass *dc =DEVICE_CLASS (klass); +PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); + +intel_hda_class_init_common (klass); + k->device_id =0x2668 ; + k->revision =1 ; + dc->desc ="Intel HD Audio Controller (ich6)" ; +} + +static void intel_hda_class_init_ich9 (ObjectClass *klass,void *data) +{ +DeviceClass *dc =DEVICE_CLASS (klass); +PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); + +intel_hda_class_init_common (klass); + k->device_id =0x293e ; + k->revision =3 ; + dc->desc ="Intel HD Audio Controller (ich9)" ; +} + +static TypeInfo intel_hda_info_ich6 = { .name ="intel-hda" , .parent =TYPE_PCI_DEVICE , .instance_size =sizeof (IntelHDAState), - .class_init = intel_hda_class_init, + .class_init = intel_hda_class_init_ich6, +}; + +static TypeInfo intel_hda_info_ich9 = { + .name ="ich9-intel-hda" , + .parent =TYPE_PCI_DEVICE , + .instance_size =sizeof (IntelHDAState), + .class_init = intel_hda_class_init_ich9, };static void hda_codec_device_class_init (ObjectClass *klass,void *data)
@@ -1277,7 +1303,8 @@ static TypeInfo hda_codec_device_type_info = {static void intel_hda_register_types (void ) {type_register_static (&hda_codec_bus_info); -type_register_static (&intel_hda_info); +type_register_static (&intel_hda_info_ich6); +type_register_static (&intel_hda_info_ich9);type_register_static (&hda_codec_device_type_info); }
Signature · 1 line
1.7.1
cover q35: two little patches
Hi,
Patch 1 adds a intel HD Audio controller with the ich9 PCI IDs (otherwise identical to the existing ich6 one).
Patch 2 documents the q35 chipset devices.
cheers,
Gerd
Gerd Hoffmann (2):
q35: add ich9 intel hda controller
q35: document chipset devices
docs/q35-chipset.cfg | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++ hw/intel-hda.c | 41 +++++++++++++--- 2 files changed, 163 insertions(+), 7 deletions(-) create mode 100644 docs/q35-chipset.cfg
PATCH 2/2 q35: document chipset devices
Signed-off-by Gerd Hoffmann <[email protected]>
--- docs/q35-chipset.cfg | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 129 insertions(+), 0 deletions(-) create mode 100644 docs/q35-chipset.cfg
docs/q35-chipset.cfg new file +129 -0
@@ -0,0 +1,129 @@ +################################################################ +# +# qemu -M q35 creates a bare machine with just the very essential +# chipset devices being present: +# +# 00.0 - Host bridge +# 1f.0 - ISA bridge / LPC +# 1f.2 - SATA (AHCI) controller +# 1f.3 - SMBus controller +# +# This config file documents the other devices and how they are +# created. You can simply use "-readconfig $thisfile" to create +# them all. Here is a overview: +# +# 19.0 - Ethernet controller (not created, our e1000 emulation +# doesn't emulate the ich9 device). +# 1a.* - USB Controller #2 (ehci + uhci companions) +# 1b.0 - HD Audio Controller +# 1c.* - PCI Express Ports +# 1d.* - USB Controller #1 (ehci + uhci companions, +# "qemu -M q35 -usb" creates these too) +# 1e.0 - PCI Bridge +# + +[device "ich9-ehci-2"] + driver = "ich9-usb-ehci2" + multifunction = "on" + bus = "pcie.0" + addr = "1a.7" + +[device "ich9-uhci-4"] + driver = "ich9-usb-uhci4" + multifunction = "on" + bus = "pcie.0" + addr = "1a.0" + masterbus = "ich9-ehci-2.0" + firstport = "0" + +[device "ich9-uhci-5"] + driver = "ich9-usb-uhci5" + multifunction = "on" + bus = "pcie.0" + addr = "1a.1" + masterbus = "ich9-ehci-2.0" + firstport = "2" + +[device "ich9-uhci-6"] + driver = "ich9-usb-uhci6" + multifunction = "on" + bus = "pcie.0" + addr = "1a.2" + masterbus = "ich9-ehci-2.0" + firstport = "4" + + +[device "ich9-hda-audio"] + driver = "ich9-intel-hda" + bus = "pcie.0" + addr = "1b.0" + + +[device "ich9-pcie-port-1"] + driver = "ioh3420" + multifunction = "on" + bus = "pcie.0" + addr = "1c.0" + port = "1" + chassis = "1" + +[device "ich9-pcie-port-2"] + driver = "ioh3420" + multifunction = "on" + bus = "pcie.0" + addr = "1c.1" + port = "2" + chassis = "2" + +[device "ich9-pcie-port-3"] + driver = "ioh3420" + multifunction = "on" + bus = "pcie.0" + addr = "1c.2" + port = "3" + chassis = "3" + +[device "ich9-pcie-port-4"] + driver = "ioh3420" + multifunction = "on" + bus = "pcie.0" + addr = "1c.3" + port = "4" + chassis = "4" + + +[device "ich9-ehci-1"] + driver = "ich9-usb-ehci1" + multifunction = "on" + bus = "pcie.0" + addr = "1d.7" + +[device "ich9-uhci-1"] + driver = "ich9-usb-uhci1" + multifunction = "on" + bus = "pcie.0" + addr = "1d.0" + masterbus = "ich9-ehci-1.0" + firstport = "0" + +[device "ich9-uhci-2"] + driver = "ich9-usb-uhci2" + multifunction = "on" + bus = "pcie.0" + addr = "1d.1" + masterbus = "ich9-ehci-1.0" + firstport = "2" + +[device "ich9-uhci-3"] + driver = "ich9-usb-uhci3" + multifunction = "on" + bus = "pcie.0" + addr = "1d.2" + masterbus = "ich9-ehci-1.0" + firstport = "4" + + +[device "ich9-pci-bridge"] + driver = "i82801b11-bridge" + bus = "pcie.0" + addr = "1e.0"
Signature · 1 line
1.7.1