Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/x86/pci/pci_machdep.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/x86/pci/pci_machdep.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.74 retrieving revision 1.74.2.1 diff -u -p -r1.74 -r1.74.2.1 --- src/sys/arch/x86/pci/pci_machdep.c 2016/06/10 23:07:52 1.74 +++ src/sys/arch/x86/pci/pci_machdep.c 2017/03/20 06:57:22 1.74.2.1 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.74 2016/06/10 23:07:52 jakllsch Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.74.2.1 2017/03/20 06:57:22 pgoyette Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.74 2016/06/10 23:07:52 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.74.2.1 2017/03/20 06:57:22 pgoyette Exp $"); #include #include @@ -483,7 +483,12 @@ pci_attach_hook(device_t parent, device_ PCI_SUBCLASS(class) != PCI_SUBCLASS_BRIDGE_HOST) return; - if (pci_has_msi_quirk(id, PCI_QUIRK_DISABLE_MSI)) { + /* VMware and KVM use old chipset, but they can use MSI/MSI-X */ + if ((cpu_feature[1] & CPUID2_RAZ) + && (pci_has_msi_quirk(id, PCI_QUIRK_ENABLE_MSI_VM))) { + pba->pba_flags |= PCI_FLAGS_MSI_OKAY; + pba->pba_flags |= PCI_FLAGS_MSIX_OKAY; + } else if (pci_has_msi_quirk(id, PCI_QUIRK_DISABLE_MSI)) { pba->pba_flags &= ~PCI_FLAGS_MSI_OKAY; pba->pba_flags &= ~PCI_FLAGS_MSIX_OKAY; aprint_verbose_dev(self, "This pci host supports neither MSI nor MSI-X.\n"); @@ -496,14 +501,6 @@ pci_attach_hook(device_t parent, device_ pba->pba_flags |= PCI_FLAGS_MSIX_OKAY; } - /* VMware and KVM use old chipset, but they can use MSI/MSI-X */ - if (cpu_feature[1] & CPUID2_RAZ) { - if (pci_has_msi_quirk(id, PCI_QUIRK_ENABLE_MSI_VM)) { - pba->pba_flags |= PCI_FLAGS_MSI_OKAY; - pba->pba_flags |= PCI_FLAGS_MSIX_OKAY; - } - } - /* * Don't enable MSI on a HyperTransport bus. In order to * determine that bus 0 is a HyperTransport bus, we look at @@ -1094,6 +1091,8 @@ device_pci_register(device_t dev, void * if (ri->ri_bits != NULL) { prop_dictionary_set_uint64(dict, "virtual_address", + ri->ri_hwbits != NULL ? + (vaddr_t)ri->ri_hworigbits : (vaddr_t)ri->ri_origbits); } #endif @@ -1120,6 +1119,11 @@ device_pci_register(device_t dev, void * #if NWSDISPLAY > 0 && NGENFB > 0 if (device_is_a(dev, "genfb")) { + prop_dictionary_set_bool(dict, + "enable_shadowfb", + ri->ri_hwbits != NULL ? + true : false); + x86_genfb_set_console_dev(dev); #ifdef DDB db_trap_callback =