PERFORCE change 192619 for review
John Baldwin
jhb at FreeBSD.org
Wed May 4 21:51:52 UTC 2011
http://p4web.freebsd.org/@@192619?ac=10
Change 192619 by jhb at jhb_jhbbsd on 2011/05/04 21:51:21
Hacking on mptable host res support.
Affected files ...
.. //depot/projects/pci/sys/x86/include/mptable.h#3 edit
.. //depot/projects/pci/sys/x86/x86/mptable.c#3 edit
.. //depot/projects/pci/sys/x86/x86/mptable_pci.c#6 edit
Differences ...
==== //depot/projects/pci/sys/x86/include/mptable.h#3 (text+ko) ====
@@ -187,6 +187,15 @@
} basetable_entry;
#ifdef _KERNEL
+#ifdef NEW_PCIB
+struct mptable_hostb_softc {
+ struct pcib_host_resources sc_host_res;
+ int sc_decodes_vga_io;
+ int sc_decodes_isa_io;
+};
+
+void mptable_pci_host_res_init(device_t pcib);
+#endif
int mptable_pci_probe_table(int bus);
int mptable_pci_route_interrupt(device_t pcib, device_t dev, int pin);
#endif
==== //depot/projects/pci/sys/x86/x86/mptable.c#3 (text+ko) ====
@@ -1081,3 +1081,18 @@
'A' + pin, args.vector);
return (args.vector);
}
+
+#ifdef NEW_PCIB
+/*
+ * Initialize a Host-PCI bridge so it can restrict resource allocation
+ * requests to the resources it actually decodes according to MP
+ * config table extended entries.
+ */
+void
+mptable_pci_host_res_init(device_t pcib)
+{
+ struct mptable_hostb_softc *sc;
+
+ sc = device_get_softc(dev);
+}
+#endif
==== //depot/projects/pci/sys/x86/x86/mptable_pci.c#6 (text+ko) ====
@@ -68,7 +68,11 @@
static int
mptable_hostb_attach(device_t dev)
{
+ struct mptable_hostb_softc *sc;
+#ifdef NEW_PCIB
+ mptable_pci_host_res_init(dev);
+#endif
device_add_child(dev, "pci", pcib_get_bus(dev));
return (bus_generic_attach(dev));
}
@@ -104,6 +108,20 @@
return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data));
}
+#ifdef NEW_PCIB
+static struct resource *
+mptable_hostb_alloc_resource(device_t dev, device_t child, int type, int *rid,
+ u_long start, u_long end, u_long count, u_int flags)
+{
+ struct mptable_hostb_softc *sc;
+
+ sc = device_get_softc(dev);
+ /* XXX: Special handling for VGA and ISA I/O ranges. */
+ return (pcib_host_res_alloc(&sc->sc_host_res, child, type, rid, start,
+ end, count, flags));
+}
+#endif
+
static device_method_t mptable_hostb_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, mptable_hostb_probe),
More information about the p4-projects
mailing list