CVS log for src/sys/dev/pci/pci.c
Up to [FreeBSD] / src / sys / dev / pci
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.426: download - view: text, markup, annotated - select for diffs
Thu Jan 19 21:38:19 2012 UTC (2 weeks, 6 days ago) by jhb
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.425: preferred, colored
Changes since revision 1.425: +1 -3 lines
SVN rev 230340 on 2012-01-19 21:38:19Z by jhb Properly return success once a matching VPD entry is found in pci_get_vpd_readonly_method(). Previously the loop was always running to completion and falling through to failing with ENXIO. PR: kern/164313 Submitted by: Chuck Tuffli chuck tuffli net MFC after: 1 week
Revision 1.425.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.425.2.1: preferred, colored; next MAIN 1.426: preferred, colored
Changes since revision 1.425.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.425.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.425: preferred, colored; next MAIN 1.426: preferred, colored
Changes since revision 1.425: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith Copy head to stable/9 as part of 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.386.2.17: download - view: text, markup, annotated - select for diffs
Mon Jul 25 19:11:29 2011 UTC (6 months, 2 weeks ago) by marius
Branches: RELENG_8
Diff to: previous 1.386.2.16: preferred, colored; branchpoint 1.386: preferred, colored; next MAIN 1.387: preferred, colored
Changes since revision 1.386.2.16: +4 -1 lines
SVN rev 224394 on 2011-07-25 19:11:29Z by marius MFC: r223984 PCIB_ALLOC_MSIX() may already fail on the first pass, f.e. when the PCI-PCI bridge is blacklisted. In that case just return from pci_alloc_msix_method(), otherwise we continue without a single MSI-X resource, causing subsequent attempts to use the seemingly available resource to fail or when booting verbose to NULL-dereference rle->start when trying to print the IRQ in pci_alloc_msix_method(). Reviewed by: jhb
Revision 1.355.2.19: download - view: text, markup, annotated - select for diffs
Mon Jul 25 19:11:29 2011 UTC (6 months, 2 weeks ago) by marius
Branches: RELENG_7
Diff to: previous 1.355.2.18: preferred, colored; branchpoint 1.355: preferred, colored; next MAIN 1.356: preferred, colored
Changes since revision 1.355.2.18: +4 -1 lines
SVN rev 224395 on 2011-07-25 19:11:29Z by marius MFC: r223984 PCIB_ALLOC_MSIX() may already fail on the first pass, f.e. when the PCI-PCI bridge is blacklisted. In that case just return from pci_alloc_msix_method(), otherwise we continue without a single MSI-X resource, causing subsequent attempts to use the seemingly available resource to fail or when booting verbose to NULL-dereference rle->start when trying to print the IRQ in pci_alloc_msix_method(). Reviewed by: jhb
Revision 1.425: download - view: text, markup, annotated - select for diffs
Fri Jul 22 15:37:23 2011 UTC (6 months, 2 weeks ago) by hselasky
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.424: preferred, colored
Changes since revision 1.424: +66 -1 lines
SVN rev 224269 on 2011-07-22 15:37:23Z by hselasky Add missing XHCI early takeover code. The XHCI takeover code is supposed to disable the BIOS from using the XHCI controller after bootup. Approved by: re (kib) Reported by: Mike Tancsa MFC after: 1 week
Revision 1.386.2.16: download - view: text, markup, annotated - select for diffs
Sat Jul 16 19:38:08 2011 UTC (6 months, 3 weeks ago) by kib
Branches: RELENG_8
Diff to: previous 1.386.2.15: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.15: +15 -0 lines
SVN rev 224111 on 2011-07-16 19:38:08Z by kib MFC r223885: Implement pci_find_class(9), the function to find a pci device by its class. Sponsored by: The FreeBSD Foundation
Revision 1.424: download - view: text, markup, annotated - select for diffs
Wed Jul 13 18:35:47 2011 UTC (6 months, 4 weeks ago) by marius
Branches: MAIN
Diff to: previous 1.423: preferred, colored
Changes since revision 1.423: +4 -1 lines
SVN rev 223984 on 2011-07-13 18:35:47Z by marius PCIB_ALLOC_MSIX() may already fail on the first pass, f.e. when the PCI-PCI bridge is blacklisted. In that case just return from pci_alloc_msix_method(), otherwise we continue without a single MSI-X resource, causing subsequent attempts to use the seemingly available resource to fail or when booting verbose a NULL-pointer dereference of rle->start when trying to print the IRQ in pci_alloc_msix_method(). Reviewed by: jhb MFC after: 1 week
Revision 1.423: download - view: text, markup, annotated - select for diffs
Sat Jul 9 14:30:13 2011 UTC (7 months ago) by kib
Branches: MAIN
Diff to: previous 1.422: preferred, colored
Changes since revision 1.422: +15 -0 lines
SVN rev 223885 on 2011-07-09 14:30:13Z by kib Implement pci_find_class(9), the function to find a pci device by its class. Sponsored by: The FreeBSD Foundation Reviewed by: jhb MFC after: 1 week
Revision 1.386.2.15: download - view: text, markup, annotated - select for diffs
Wed Jun 29 15:58:26 2011 UTC (7 months, 1 week ago) by jhb
Branches: RELENG_8
Diff to: previous 1.386.2.14: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.14: +20 -0 lines
SVN rev 223674 on 2011-06-29 15:58:26Z by jhb MFC 221393,222930: Reimplement how PCI-PCI bridges manage their I/O windows. Previously the driver would verify that requests for child devices were confined to any existing I/O windows, but the driver relied on the firmware to initialize the windows and would never grow the windows for new requests. Now the driver actively manages the I/O windows. This is implemented by allocating a bus resource for each I/O window from the parent PCI bus and suballocating that resource to child devices. The suballocations are managed by creating an rman for each I/O window. The suballocated resources are mapped by passing the bus_activate_resource() call up to the parent PCI bus. Windows are grown when needed by using bus_adjust_resource() to adjust the resource allocated from the parent PCI bus. If the adjust request succeeds, the window is adjusted and the suballocation request for the child device is retried. When growing a window, the rman_first_free_region() and rman_last_free_region() routines are used to determine if the front or end of the existing I/O window is free. From using that, the smallest ranges that need to be added to either the front or back of the window are computed. The driver will first try to grow the window in whichever direction requires the smallest growth first followed by the other direction if that fails. Subtractive bridges will first attempt to satisfy requests for child resources from I/O windows (including attempts to grow the windows). If that fails, the request is passed up to the parent PCI bus directly however. The PCI-PCI bridge driver will try to use firmware-assigned ranges for child BARs first and only allocate a "fresh" range if that specific range cannot be accommodated in the I/O window. This allows systems where the firmware assigns resources during boot but later wipes the I/O windows (some ACPI BIOSen are known to do this) to "rediscover" the original I/O window ranges. The ACPI Host-PCI bridge driver has been adjusted to correctly honor hw.acpi.host_mem_start and the I/O port equivalent when a PCI-PCI bridge makes a wildcard request for an I/O window range. The new PCI-PCI bridge driver is only enabled if the NEW_PCIB kernel option is enabled.
Revision 1.386.2.14: download - view: text, markup, annotated - select for diffs
Fri Jun 24 17:29:41 2011 UTC (7 months, 2 weeks ago) by jhb
Branches: RELENG_8
Diff to: previous 1.386.2.13: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.13: +1 -0 lines
SVN rev 223509 on 2011-06-24 17:29:41Z by jhb MFC 221324,221324: Add implementations of BUS_ADJUST_RESOURCE() to the PCI bus driver, generic PCI-PCI bridge driver, x86 nexus driver, x86 Host to PCI bridge drivers, and the drivers that sit between the x86 Host-PCI bridge drivers and nexus.
Revision 1.422: download - view: text, markup, annotated - select for diffs
Tue Jun 21 19:31:31 2011 UTC (7 months, 2 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.421: preferred, colored
Changes since revision 1.421: +4 -3 lines
SVN rev 223371 on 2011-06-21 19:31:31Z by jhb Minor whitespace and style fixes.
Revision 1.355.2.18: download - view: text, markup, annotated - select for diffs
Tue Jun 7 21:16:02 2011 UTC (8 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.355.2.17: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.17: +1 -1 lines
SVN rev 222838 on 2011-06-07 21:16:02Z by jhb MFC 221138: Only align MSI message groups based on the number of messages being allocated, not the maximum number of messages the device supports. The spec only requires the former, and I believe I implemented the latter due to misunderstanding an e-mail. In particular, this fixes an issue where having several devices that all support 16 messages can run out of IDT vectors on x86 even though the driver only uses a single message.
Revision 1.386.2.13: download - view: text, markup, annotated - select for diffs
Tue Jun 7 21:15:43 2011 UTC (8 months ago) by jhb
Branches: RELENG_8
Diff to: previous 1.386.2.12: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.12: +1 -1 lines
SVN rev 222837 on 2011-06-07 21:15:43Z by jhb MFC 221138: Only align MSI message groups based on the number of messages being allocated, not the maximum number of messages the device supports. The spec only requires the former, and I believe I implemented the latter due to misunderstanding an e-mail. In particular, this fixes an issue where having several devices that all support 16 messages can run out of IDT vectors on x86 even though the driver only uses a single message.
Revision 1.421: download - view: text, markup, annotated - select for diffs
Mon Jun 6 13:21:11 2011 UTC (8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.420: preferred, colored
Changes since revision 1.420: +11 -0 lines
SVN rev 222753 on 2011-06-06 13:21:11Z by jhb More properly handle Cardbus cards that that store their CIS in a BAR after the recent changes to track BAR state explicitly. The code would now attempt to add the same BAR twice in this case. Instead, change this so that it recognizes this case and only adds it once and do not delete the BAR outright after parsing the CIS. Tested by: bschmidt
Revision 1.420: download - view: text, markup, annotated - select for diffs
Tue May 3 17:37:24 2011 UTC (9 months, 1 week ago) by jhb
Branches: MAIN
Diff to: previous 1.419: preferred, colored
Changes since revision 1.419: +20 -0 lines
SVN rev 221393 on 2011-05-03 17:37:24Z by jhb Reimplement how PCI-PCI bridges manage their I/O windows. Previously the driver would verify that requests for child devices were confined to any existing I/O windows, but the driver relied on the firmware to initialize the windows and would never grow the windows for new requests. Now the driver actively manages the I/O windows. This is implemented by allocating a bus resource for each I/O window from the parent PCI bus and suballocating that resource to child devices. The suballocations are managed by creating an rman for each I/O window. The suballocated resources are mapped by passing the bus_activate_resource() call up to the parent PCI bus. Windows are grown when needed by using bus_adjust_resource() to adjust the resource allocated from the parent PCI bus. If the adjust request succeeds, the window is adjusted and the suballocation request for the child device is retried. When growing a window, the rman_first_free_region() and rman_last_free_region() routines are used to determine if the front or end of the existing I/O window is free. From using that, the smallest ranges that need to be added to either the front or back of the window are computed. The driver will first try to grow the window in whichever direction requires the smallest growth first followed by the other direction if that fails. Subtractive bridges will first attempt to satisfy requests for child resources from I/O windows (including attempts to grow the windows). If that fails, the request is passed up to the parent PCI bus directly however. The PCI-PCI bridge driver will try to use firmware-assigned ranges for child BARs first and only allocate a "fresh" range if that specific range cannot be accommodated in the I/O window. This allows systems where the firmware assigns resources during boot but later wipes the I/O windows (some ACPI BIOSen are known to do this) to "rediscover" the original I/O window ranges. The ACPI Host-PCI bridge driver has been adjusted to correctly honor hw.acpi.host_mem_start and the I/O port equivalent when a PCI-PCI bridge makes a wildcard request for an I/O window range. The new PCI-PCI bridge driver is only enabled if the NEW_PCIB kernel option is enabled. This is a transition aide to allow platforms that do not yet support bus_activate_resource() and bus_adjust_resource() in their Host-PCI bridge drivers (and possibly other drivers as needed) to use the old driver for now. Once all platforms support the new driver, the kernel option and old driver will be removed. PR: kern/143874 kern/149306 Tested by: mav
Revision 1.419: download - view: text, markup, annotated - select for diffs
Mon May 2 14:13:12 2011 UTC (9 months, 1 week ago) by jhb
Branches: MAIN
Diff to: previous 1.418: preferred, colored
Changes since revision 1.418: +1 -0 lines
SVN rev 221324 on 2011-05-02 14:13:12Z by jhb Add implementations of BUS_ADJUST_RESOURCE() to the PCI bus driver, generic PCI-PCI bridge driver, x86 nexus driver, and x86 Host to PCI bridge drivers.
Revision 1.418: download - view: text, markup, annotated - select for diffs
Wed Apr 27 20:08:44 2011 UTC (9 months, 1 week ago) by jhb
Branches: MAIN
Diff to: previous 1.417: preferred, colored
Changes since revision 1.417: +1 -1 lines
SVN rev 221138 on 2011-04-27 20:08:44Z by jhb Only align MSI message groups based on the number of messages being allocated, not the maximum number of messages the device supports. The spec only requires the former, and I believe I implemented the latter due to misunderstanding an e-mail. In particular, this fixes an issue where having several devices that all support 16 messages can run out of IDT vectors on x86 even though the driver only uses a single message. Submitted by: Bret Ketchum bcketchum of gmail MFC after: 1 week
Revision 1.355.2.17: download - view: text, markup, annotated - select for diffs
Fri Apr 15 20:20:11 2011 UTC (9 months, 3 weeks ago) by jhb
Branches: RELENG_7
Diff to: previous 1.355.2.16: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.16: +5 -5 lines
SVN rev 220670 on 2011-04-15 20:20:11Z by jhb MFC 219865: Add pci_find_cap() as an alias for pci_find_extcap() to ease driver portability with 9+ where pci_find_extcap() has been renamed to pci_find_cap().
Revision 1.386.2.12: download - view: text, markup, annotated - select for diffs
Fri Apr 15 20:19:50 2011 UTC (9 months, 3 weeks ago) by jhb
Branches: RELENG_8
Diff to: previous 1.386.2.11: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.11: +5 -5 lines
SVN rev 220669 on 2011-04-15 20:19:50Z by jhb MFC 219865: Add pci_find_cap() as an alias for pci_find_extcap() to ease driver portability with 9+ where pci_find_extcap() has been renamed to pci_find_cap().
Revision 1.417: download - view: text, markup, annotated - select for diffs
Thu Mar 31 13:22:12 2011 UTC (10 months, 1 week ago) by jhb
Branches: MAIN
Diff to: previous 1.416: preferred, colored
Changes since revision 1.416: +153 -49 lines
SVN rev 220195 on 2011-03-31 13:22:12Z by jhb Explicitly track the state of all known BARs for each PCI device. The PCI bus driver will now remember the size of a BAR obtained during the initial bus scan and use that size when doing lazy resource allocation rather than resizing the BAR. The bus driver will now also report unallocated BARs to userland for display by 'pciconf -lb'. Psuedo-resources that are not BARs (such as the implicit I/O port resources for master/slave ATA controllers) will no longer be listed as BARs in 'pciconf -lb'. During resume, BARs are restored from their new saved state instead of having the raw registers saved and restored across resume. This also fixes restoring BARs at unusual loactions if said BAR has been allocated by a driver. Add a constant for the offset of the ROM BIOS BAR in PCI-PCI bridges and properly handle ROM BIOS BARs in PCI-PCI bridges. The PCI bus now also properly handles the lack of a ROM BIOS BAR in a PCI-Cardbus bridge. Tested by: jkim
Revision 1.416: download - view: text, markup, annotated - select for diffs
Tue Mar 22 12:05:49 2011 UTC (10 months, 2 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.415: preferred, colored
Changes since revision 1.415: +5 -5 lines
SVN rev 219865 on 2011-03-22 12:05:49Z by jhb Rename pci_find_extcap() to pci_find_cap(). PCI now uses the term "extended capabilities" to refer to the new set of capability structures starting at offset 0x100 in config space for PCI-express devices. For now both function names will still work. I will merge this to older branches to ease driver portability, but 9.0 will ship with a new pci_find_extcap() function that locates extended capabilities instead. Reviewed by: imp MFC after: 1 week
Revision 1.415: download - view: text, markup, annotated - select for diffs
Fri Mar 18 14:06:12 2011 UTC (10 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.414: preferred, colored
Changes since revision 1.414: +2 -19 lines
SVN rev 219740 on 2011-03-18 14:06:12Z by jhb Partially revert previous change. Drop the quirk to disable MSI for HT chipsets that do not have an HT slave at 0:0:0:0. The Linux quirk is actually specific to Nvidia chipsets and the check I had added was in the wrong place. Prodded by: nathanw
Revision 1.414: download - view: text, markup, annotated - select for diffs
Fri Mar 18 12:13:04 2011 UTC (10 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.413: preferred, colored
Changes since revision 1.413: +43 -4 lines
SVN rev 219737 on 2011-03-18 12:13:04Z by jhb Fix a few issues with HyperTransport devices and MSI interrupts: - Always enable the HyperTransport MSI mapping window for HyperTransport to PCI bridges (these show up as HyperTransport slave devices). The mapping windows in PCI-PCI bridges are enabled by existing code in the PCI-PCI bridge driver as MSI requests propagate up the device tree, but Host-PCI bridges don't really show up in that tree. - If the PCI device at domain 0 bus 0 slot 0 function 0 is not a HyperTransport device, then blacklist MSI on any other HT devices in the system. Linux has a similar quirk. PR: kern/155442 Tested by: Zack Dannar zdannar of gmail MFC after: 1 week
Revision 1.355.2.16: download - view: text, markup, annotated - select for diffs
Thu Mar 3 20:14:00 2011 UTC (11 months, 1 week ago) by jhb
Branches: RELENG_7
Diff to: previous 1.355.2.15: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.15: +3 -3 lines
SVN rev 219251 on 2011-03-03 20:14:00Z by jhb MFC 218968: Properly handle BARs bigger than 4G. The '1' was treated as an int causing the size calculation to be truncated to the size of an int (32-bits on all current architectures).
Revision 1.386.2.11: download - view: text, markup, annotated - select for diffs
Thu Mar 3 20:13:44 2011 UTC (11 months, 1 week ago) by jhb
Branches: RELENG_8
Diff to: previous 1.386.2.10: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.10: +3 -3 lines
SVN rev 219250 on 2011-03-03 20:13:44Z by jhb MFC 218968: Properly handle BARs bigger than 4G. The '1' was treated as an int causing the size calculation to be truncated to the size of an int (32-bits on all current architectures).
Revision 1.413: download - view: text, markup, annotated - select for diffs
Wed Feb 23 12:58:50 2011 UTC (11 months, 2 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.412: preferred, colored
Changes since revision 1.412: +3 -3 lines
SVN rev 218968 on 2011-02-23 12:58:50Z by jhb Properly handle BARs bigger than 4G. The '1' was treated as an int causing the size calculation to be truncated to the size of an int (32-bits on all current architectures). Submitted by: Anish akgupt3 of gmail MFC after: 1 week
Revision 1.412: download - view: text, markup, annotated - select for diffs
Sun Feb 13 19:26:51 2011 UTC (11 months, 3 weeks ago) by marcel
Branches: MAIN
Diff to: previous 1.411: preferred, colored
Changes since revision 1.411: +14 -9 lines
SVN rev 218662 on 2011-02-13 19:26:51Z by marcel Use the preload_fetch_addr() and preload_fetch_size() convenience functions to obtain the address and size of the PCI vendor data. Sponsored by: Juniper Networks.
Revision 1.355.2.15.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.355.2.15: preferred, colored; next MAIN 1.355.2.16: preferred, colored
Changes since revision 1.355.2.15: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release. Approved by: re (implicit)
Revision 1.386.2.10.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.386.2.10: preferred, colored; next MAIN 1.386.2.11: preferred, colored
Changes since revision 1.386.2.10: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release. Approved by: re (implicit)
Revision 1.411: download - view: text, markup, annotated - select for diffs
Mon Nov 22 21:58:00 2010 UTC (14 months, 2 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.410: preferred, colored
Changes since revision 1.410: +28 -1 lines
SVN rev 215719 on 2010-11-22 21:58:00Z by jkim Resume critical PCI devices (and their children) first, then everything else later. This give us better chance to catch device driver problems.
Revision 1.386.2.10: download - view: text, markup, annotated - select for diffs
Tue Nov 9 22:18:20 2010 UTC (15 months ago) by mav
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.386.2.9: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.9: +5 -5 lines
SVN rev 215064 on 2010-11-09 22:18:20Z by mav MFC r209154: Virtualize pci_remap_msi_irq() call from general MSI code. It allows MSI (FSB interrupts) to be used by non-PCI devices, such as HPET.
Revision 1.355.2.15: download - view: text, markup, annotated - select for diffs
Thu Nov 4 17:13:30 2010 UTC (15 months ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_4_BP
Branch point for: RELENG_7_4
Diff to: previous 1.355.2.14: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.14: +31 -1 lines
SVN rev 214787 on 2010-11-04 17:13:30Z by jhb MFC 214203: - Add a new PCI quirk to whitelist an old chipset that doesn't support PCI-express or PCI-X capabilities if we are running in a virtual machine. - Whitelist the Intel 82440 chipset used by QEMU.
Revision 1.386.2.9: download - view: text, markup, annotated - select for diffs
Thu Nov 4 17:12:29 2010 UTC (15 months ago) by jhb
Branches: RELENG_8
Diff to: previous 1.386.2.8: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.8: +31 -1 lines
SVN rev 214786 on 2010-11-04 17:12:29Z by jhb MFC 214203: - Add a new PCI quirk to whitelist an old chipset that doesn't support PCI-express or PCI-X capabilities if we are running in a virtual machine. - Whitelist the Intel 82440 chipset used by QEMU.
Revision 1.386.2.8: download - view: text, markup, annotated - select for diffs
Wed Nov 3 15:31:37 2010 UTC (15 months ago) by nwhitehorn
Branches: RELENG_8
Diff to: previous 1.386.2.7: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.7: +1 -1 lines
SVN rev 214745 on 2010-11-03 15:31:37Z by nwhitehorn MFC r214349: The EHCI_CAPLENGTH and EHCI_HCIVERSION registers are actually sub-registers within the first 4 bytes of the EHCI memory space. For controllers that use big-endian MMIO, reading them with 1- and 2-byte reads would then return the wrong values. Instead, read the combined register with a 4-byte read and mask out the interesting quantities. Requested by: marius
Revision 1.410: download - view: text, markup, annotated - select for diffs
Mon Oct 25 15:51:43 2010 UTC (15 months, 2 weeks ago) by nwhitehorn
Branches: MAIN
Diff to: previous 1.409: preferred, colored
Changes since revision 1.409: +1 -1 lines
SVN rev 214349 on 2010-10-25 15:51:43Z by nwhitehorn The EHCI_CAPLENGTH and EHCI_HCIVERSION registers are actually sub-registers within the first 4 bytes of the EHCI memory space. For controllers that use big-endian MMIO, reading them with 1- and 2-byte reads would then return the wrong values. Instead, read the combined register with a 4-byte read and mask out the interesting quantities.
Revision 1.409: download - view: text, markup, annotated - select for diffs
Fri Oct 22 11:42:02 2010 UTC (15 months, 2 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.408: preferred, colored
Changes since revision 1.408: +31 -1 lines
SVN rev 214203 on 2010-10-22 11:42:02Z by jhb - Add a new PCI quirk to whitelist an old chipset that doesn't support PCI-express or PCI-X capabilities if we are running in a virtual machine. - Whitelist the Intel 82440 chipset used by QEMU. Tested by: jfv MFC after: 1 week
Revision 1.408: download - view: text, markup, annotated - select for diffs
Thu Oct 21 17:46:23 2010 UTC (15 months, 2 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.407: preferred, colored
Changes since revision 1.407: +9 -9 lines
SVN rev 214146 on 2010-10-21 17:46:23Z by jhb Clarify a misleading comment. The test in pci_reserve_map() was meant to ignore BARs that are invalid due to having a size of zero, not to ignore BARs with an existing base of zero. While here, reorganize the code slightly to make the intent clearer. Reported by: avg MFC after: 1 week
Revision 1.407: download - view: text, markup, annotated - select for diffs
Wed Oct 20 23:41:16 2010 UTC (15 months, 2 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.406: preferred, colored
Changes since revision 1.406: +1 -1 lines
SVN rev 214122 on 2010-10-20 23:41:16Z by jkim Update PCI power management registers per PCI Bus Power Management Interface Specification Rev. 1.2. Rename pp_pcmcsr field of PM capabilities to pp_bse to avoid further confusions and adjust some comments accordingly. The real PMCSR (Power Management Control/Status Register) is PCIR_POWER_STATUS and it is actually BSE (PCI-to-PCI Bridge Support Extensions) register.
Revision 1.406: download - view: text, markup, annotated - select for diffs
Wed Oct 20 16:47:09 2010 UTC (15 months, 2 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.405: preferred, colored
Changes since revision 1.405: +9 -1 lines
SVN rev 214110 on 2010-10-20 16:47:09Z by jkim Introduce a new tunable 'hw.pci.do_power_suspend'. This tunable lets you avoid PCI power state transition from D0 to D3 for suspending case. Default is 1 or enabled.
Revision 1.405: download - view: text, markup, annotated - select for diffs
Tue Oct 19 17:15:22 2010 UTC (15 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.404: preferred, colored
Changes since revision 1.404: +1 -3 lines
SVN rev 214065 on 2010-10-19 17:15:22Z by jkim Remove PCI header type 0 restriction from power state changes. PCI config. registers for bridges are saved and restored since r200341. OK'ed by: imp, jhb
Revision 1.404: download - view: text, markup, annotated - select for diffs
Tue Oct 19 17:05:51 2010 UTC (15 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.403: preferred, colored
Changes since revision 1.403: +3 -4 lines
SVN rev 214064 on 2010-10-19 17:05:51Z by jkim Do not apply do_power_resume for suspending case. When do_powerstate was splitted into do_power_resume and do_power_nodriver, it became stale.
Revision 1.403: download - view: text, markup, annotated - select for diffs
Fri Oct 15 21:41:59 2010 UTC (15 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.402: preferred, colored
Changes since revision 1.402: +3 -4 lines
SVN rev 213907 on 2010-10-15 21:41:59Z by jkim Remove unnecessary castings and fix couple of style(9) nits.
Revision 1.402: download - view: text, markup, annotated - select for diffs
Fri Oct 15 21:39:51 2010 UTC (15 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.401: preferred, colored
Changes since revision 1.401: +40 -38 lines
SVN rev 213905 on 2010-10-15 21:39:51Z by jkim Move setting power state for children into a separate function as they were essentially the same. This also restores hw.pci.do_power_resume tunable, which was broken since r211430. Reviewed by: jhb
Revision 1.401: download - view: text, markup, annotated - select for diffs
Tue Aug 17 15:44:52 2010 UTC (17 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.400: preferred, colored
Changes since revision 1.400: +21 -32 lines
SVN rev 211430 on 2010-08-17 15:44:52Z by jhb Add a new method to the PCI bridge interface, PCIB_POWER_FOR_SLEEP(). This method is used by the PCI bus driver to query the power management system to determine the proper device state to be used for a device during suspend and resume. For the ACPI PCI bridge drivers this calls acpi_device_pwr_for_sleep(). This removes ACPI-specific knowledge from the PCI and PCI-PCI bridge drivers. Reviewed by: jkim
Revision 1.400: download - view: text, markup, annotated - select for diffs
Thu Jul 29 20:42:38 2010 UTC (18 months, 1 week ago) by yongari
Branches: MAIN
Diff to: previous 1.399: preferred, colored
Changes since revision 1.399: +23 -18 lines
SVN rev 210632 on 2010-07-29 20:42:38Z by yongari Consistently check header type after reading PCIR_HDRTYPE register. While I'm here use defined macro instead of using magic numbers for header type. Reviewed by: jhb
Revision 1.399: download - view: text, markup, annotated - select for diffs
Mon Jun 14 07:10:37 2010 UTC (19 months, 3 weeks ago) by mav
Branches: MAIN
Diff to: previous 1.398: preferred, colored
Changes since revision 1.398: +5 -5 lines
SVN rev 209154 on 2010-06-14 07:10:37Z by mav Virtualize pci_remap_msi_irq() call from general MSI code. It allows MSI (FSB interrupts) to be used by non-PCI devices, such as HPET.
Revision 1.386.2.7.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.386.2.7: preferred, colored; next MAIN 1.386.2.8: preferred, colored
Changes since revision 1.386.2.7: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith Copy stable/8 to releng/8.1 in preparation for 8.1-RC1. Approved by: re (implicit)
Revision 1.386.2.7: download - view: text, markup, annotated - select for diffs
Sun May 23 02:15:31 2010 UTC (20 months, 2 weeks ago) by nwhitehorn
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.386.2.6: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.6: +3 -3 lines
SVN rev 208425 on 2010-05-23 02:15:31Z by nwhitehorn MFC r208149,208285: Add support for the U4 PCI-Express bridge chipset used in late-generation Powermac G5 systems. MSI and several other things are not presently supported. The U3/U4 internal device support portions of this change were contributed by Andreas Tobler.
Revision 1.398: download - view: text, markup, annotated - select for diffs
Sat May 22 03:19:30 2010 UTC (20 months, 2 weeks ago) by mav
Branches: MAIN
Diff to: previous 1.397: preferred, colored
Changes since revision 1.397: +2 -0 lines
SVN rev 208409 on 2010-05-22 03:19:30Z by mav Honor hw.pci.do_power_nodriver on resume. Power-down devices without driver attached.
Revision 1.397: download - view: text, markup, annotated - select for diffs
Sun May 16 15:18:25 2010 UTC (20 months, 3 weeks ago) by nwhitehorn
Branches: MAIN
Diff to: previous 1.396: preferred, colored
Changes since revision 1.396: +3 -3 lines
SVN rev 208149 on 2010-05-16 15:18:25Z by nwhitehorn Add support for the U4 PCI-Express bridge chipset used in late-generation Powermac G5 systems. MSI and several other things are not presently supported. The U3/U4 internal device support portions of this change were contributed by Andreas Tobler. MFC after: 1 week
Revision 1.386.2.6: download - view: text, markup, annotated - select for diffs
Wed Mar 31 03:14:40 2010 UTC (22 months, 1 week ago) by marcel
Branches: RELENG_8
Diff to: previous 1.386.2.5: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.5: +4 -0 lines
SVN rev 205957 on 2010-03-31 03:14:40Z by marcel MFC rev 198431: Have the early USB takeover only enabled for i386 and amd64 by default. This also avoids a panic on PowerPC.
Revision 1.355.2.14: download - view: text, markup, annotated - select for diffs
Mon Mar 22 23:15:19 2010 UTC (22 months, 2 weeks ago) by yongari
Branches: RELENG_7
Diff to: previous 1.355.2.13: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.13: +34 -0 lines
SVN rev 205489 on 2010-03-22 23:15:19Z by yongari MFC r203528: Add pci_get|set_max_read_req() helper functions to control maximum PCIe read request size.
Revision 1.386.2.5: download - view: text, markup, annotated - select for diffs
Fri Feb 19 18:07:51 2010 UTC (23 months, 2 weeks ago) by mav
Branches: RELENG_8
Diff to: previous 1.386.2.4: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.4: +34 -0 lines
SVN rev 204098 on 2010-02-19 18:07:51Z by mav MFC r203528: Add pci_get|set_max_read_req() helper functions to control maximum PCIe read request size.
Revision 1.355.2.13.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (23 months, 4 weeks ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.355.2.13: preferred, colored; next MAIN 1.355.2.14: preferred, colored
Changes since revision 1.355.2.13: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process. Approved by: re (implicit)
Revision 1.396: download - view: text, markup, annotated - select for diffs
Fri Feb 5 17:18:48 2010 UTC (2 years ago) by mav
Branches: MAIN
Diff to: previous 1.395: preferred, colored
Changes since revision 1.395: +34 -0 lines
SVN rev 203528 on 2010-02-05 17:18:48Z by mav Add pci_get|set_max_read_req() helper functions to control maximum PCIe read request size. Reviewed by: jhb@
Revision 1.395: download - view: text, markup, annotated - select for diffs
Tue Jan 5 20:42:25 2010 UTC (2 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.394: preferred, colored
Changes since revision 1.394: +40 -0 lines
SVN rev 201609 on 2010-01-05 20:42:25Z by jhb Move the PCI-specific logic of removing a cardbus device into a pci_delete_child() function called by the cardbus driver. The new function uses resource_list_unreserve() to release the BARs decoded by the device being removed. Reviewed by: imp Tested by: brooks
Revision 1.394: download - view: text, markup, annotated - select for diffs
Wed Dec 30 20:47:14 2009 UTC (2 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.393: preferred, colored
Changes since revision 1.393: +79 -4 lines
SVN rev 201279 on 2009-12-30 20:47:14Z by jhb Teach the PCI bus driver to handle PCIR_BIOS BARs properly and remove special handling for the PCIR_BIOS decoding enable bit from the cardbus driver. The PCIR_BIOS BAR does include type bits like other BARs. Instead, it is always a 32-bit non-prefetchable memory BAR where the low bit is used as a flag to enable decoding. Reviewed by: imp
Revision 1.393: download - view: text, markup, annotated - select for diffs
Wed Dec 30 19:46:09 2009 UTC (2 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.392: preferred, colored
Changes since revision 1.392: +0 -19 lines
SVN rev 201277 on 2009-12-30 19:46:09Z by jhb Remove no longer used pci_release_resource().
Revision 1.392: download - view: text, markup, annotated - select for diffs
Thu Dec 10 01:01:53 2009 UTC (2 years, 2 months ago) by jkim
Branches: MAIN
Diff to: previous 1.391: preferred, colored
Changes since revision 1.391: +1 -1 lines
SVN rev 200341 on 2009-12-10 01:01:53Z by jkim Implement a rudimentary suspend/resume methods for PCI P2P bridge. Reviewed by: jhb, imp
Revision 1.386.2.4: download - view: text, markup, annotated - select for diffs
Wed Dec 9 22:41:50 2009 UTC (2 years, 2 months ago) by thompsa
Branches: RELENG_8
Diff to: previous 1.386.2.3: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.3: +17 -0 lines
SVN rev 200333 on 2009-12-09 22:41:50Z by thompsa MFC r199814 Disable interrupts after doing early takeover of the usb controller in case usb isnt actually compiled in (or kldloaded) as the controller could cause spurious interrupts.
Revision 1.391: download - view: text, markup, annotated - select for diffs
Wed Dec 9 21:52:53 2009 UTC (2 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.390: preferred, colored
Changes since revision 1.390: +22 -62 lines
SVN rev 200315 on 2009-12-09 21:52:53Z by jhb For some buses, devices may have active resources assigned even though they are not allocated by the device driver. These resources should still appear allocated from the system's perspective so that their assigned ranges are not reused by other resource requests. The PCI bus driver has used a hack to effect this for a while now where it uses rman_set_device() to assign devices to the PCI bus when they are first encountered and later assigns them to the actual device when a driver allocates a BAR. A few downsides of this approach is that it results in somewhat confusing devinfo -r output as well as not being very easily portable to other bus drivers. This commit adds generic support for "reserved" resources to the resource list API used by many bus drivers to manage the resources of child devices. A resource may be reserved via resource_list_reserve(). This will allocate the resource from the bus' parent without activating it. resource_list_alloc() recognizes an attempt to allocate a reserved resource. When this happens it activates the resource (if requested) and then returns the reserved resource. Similarly, when a reserved resource is released via resource_list_release(), it is deactivated (if it is active) and the resource is then marked reserved again, but is left allocated from the bus' parent. To completely remove a reserved resource, a bus driver may use resource_list_unreserve(). A bus driver may use resource_list_busy() to determine if a reserved resource is allocated by a child device or if it can be unreserved. The PCI bus driver has been changed to use this framework instead of abusing rman_set_device() to keep track of reserved vs allocated resources. Submitted by: imp (an older version many moons ago) MFC after: 1 month
Revision 1.390: download - view: text, markup, annotated - select for diffs
Wed Nov 25 20:50:43 2009 UTC (2 years, 2 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.389: preferred, colored
Changes since revision 1.389: +17 -0 lines
SVN rev 199814 on 2009-11-25 20:50:43Z by thompsa Disable interrupts after doing early takeover of the usb controller in case usb isnt actually compiled in (or kldloaded) as the controller could cause spurious interrupts. Tested by: Florian Smeets
Revision 1.386.2.3: download - view: text, markup, annotated - select for diffs
Thu Oct 29 23:25:52 2009 UTC (2 years, 3 months ago) by thompsa
Branches: RELENG_8
Diff to: previous 1.386.2.2: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.2: +121 -0 lines
SVN rev 198659 on 2009-10-29 23:25:52Z by thompsa MFC r198151 Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover for all host controllers at the same time, we avoid problems where the BIOS will actually write to the USB registers of all the USB host controllers every time we handover one of them, and consequently reset the OS programmed values.
Revision 1.386.2.2.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.386.2.2: preferred, colored; next MAIN 1.386.2.3: preferred, colored
Changes since revision 1.386.2.2: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure. Approved by: re (implicit)
Revision 1.389: download - view: text, markup, annotated - select for diffs
Fri Oct 23 22:53:01 2009 UTC (2 years, 3 months ago) by marcel
Branches: MAIN
Diff to: previous 1.388: preferred, colored
Changes since revision 1.388: +4 -0 lines
SVN rev 198431 on 2009-10-23 22:53:01Z by marcel BIOSes, buggy or otherwise, are i386 or amd64 specific. Have the early USB takeover enabled for i386 and amd64 by default. This also avoids a panic on PowerPC where the resource isn't released properly and we find a busy resource when the USB host controller wants to allocate it...
Revision 1.388: download - view: text, markup, annotated - select for diffs
Thu Oct 15 20:07:08 2009 UTC (2 years, 3 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.387: preferred, colored
Changes since revision 1.387: +121 -0 lines
SVN rev 198151 on 2009-10-15 20:07:08Z by thompsa Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover for all host controllers at the same time, we avoid problems where the BIOS will actually write to the USB registers of all the USB host controllers every time we handover one of them, and consequently reset the OS programmed values. Submitted by: avg Reviewed by: jhb
Revision 1.355.2.13: download - view: text, markup, annotated - select for diffs
Fri Sep 25 14:58:30 2009 UTC (2 years, 4 months ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_3_BP
Branch point for: RELENG_7_3
Diff to: previous 1.355.2.12: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.12: +1 -25 lines
SVN rev 197483 on 2009-09-25 14:58:30Z by jhb MFC 197406: Don't reread the command register to see if enabling I/O or memory decoding "took". Other OS's that I checked do not do this and it breaks some amdpm(4) devices. Prior to 7.2 we did not honor the error returned when this failed anyway, so this in effect restores previous behavior.
Revision 1.386.2.2: download - view: text, markup, annotated - select for diffs
Fri Sep 25 14:58:00 2009 UTC (2 years, 4 months ago) by jhb
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.386.2.1: preferred, colored; branchpoint 1.386: preferred, colored
Changes since revision 1.386.2.1: +1 -25 lines
SVN rev 197482 on 2009-09-25 14:58:00Z by jhb MFC 197406: Don't reread the command register to see if enabling I/O or memory decoding "took". Other OS's that I checked do not do this and it breaks some amdpm(4) devices. Prior to 7.2 we did not honor the error returned when this failed anyway, so this in effect restores previous behavior. Approved by: re (kib)
Revision 1.387: download - view: text, markup, annotated - select for diffs
Tue Sep 22 15:43:03 2009 UTC (2 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.386: preferred, colored
Changes since revision 1.386: +1 -25 lines
SVN rev 197406 on 2009-09-22 15:43:03Z by jhb Don't reread the command register to see if enabling I/O or memory decoding "took". Other OS's that I checked do not do this and it breaks some amdpm(4) devices. Prior to 7.2 we did not honor the error returned when this failed anyway, so this in effect restores previous behavior. PR: kern/137668 Tested by: Aurelien Mere aurelien.mere amc-os.com MFC after: 3 days
Revision 1.355.2.12: download - view: text, markup, annotated - select for diffs
Sun Sep 20 18:59:30 2009 UTC (2 years, 4 months ago) by marius
Branches: RELENG_7
Diff to: previous 1.355.2.11: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.11: +15 -8 lines
SVN rev 197367 on 2009-09-20 18:59:30Z by marius MFC: r195808 Add a MD __PCI_BAR_ZERO_VALID which denotes that BARs containing 0 actually specify valid bases that should be treated just as normal. The PCI specifications have no indication that 0 would be a magic value indicating a disabled BAR as commonly used on at least amd64 and i386 but not sparc64. It's unclear what to do in pci_delete_resource() instead of writing 0 to a BAR though as there's no (other) way do disable individual BARs so its decoding is left enabled in case of __PCI_BAR_ZERO_VALID for now. Approved by: jhb
Revision 1.386.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
Diff to: previous 1.386: preferred, colored
Changes since revision 1.386: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith Copy head to stable/8 as part of 8.0 Release cycle. Approved by: re (Implicit)
Revision 1.386: download - view: text, markup, annotated - select for diffs
Tue Jul 21 19:06:39 2009 UTC (2 years, 6 months ago) by marius
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.385: preferred, colored
Changes since revision 1.385: +15 -8 lines
SVN rev 195808 on 2009-07-21 19:06:39Z by marius Add a MD __PCI_BAR_ZERO_VALID which denotes that BARs containing 0 actually specify valid bases that should be treated just as normal. The PCI specifications have no indication that 0 would be a magic value indicating a disabled BAR as commonly used on at least amd64 and i386 but not sparc64. It's unclear what to do in pci_delete_resource() instead of writing 0 to a BAR though as there's no (other) way do disable individual BARs so its decoding is left enabled in case of __PCI_BAR_ZERO_VALID for now. Approved by: re (kib), jhb MFC after: 1 week
Revision 1.292.2.30: download - view: text, markup, annotated - select for diffs
Tue Jul 14 15:06:58 2009 UTC (2 years, 6 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.29: preferred, colored; branchpoint 1.292: preferred, colored; next MAIN 1.293: preferred, colored
Changes since revision 1.292.2.29: +3 -1 lines
SVN rev 195680 on 2009-07-14 15:06:58Z by jhb MFC: Enable MSI in the MSI capability registers any time that the first message in an MSI group is enabled, not just if the address/data pair are not initialized.
Revision 1.355.2.11: download - view: text, markup, annotated - select for diffs
Tue Jul 14 14:56:01 2009 UTC (2 years, 6 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.355.2.10: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.10: +3 -1 lines
SVN rev 195679 on 2009-07-14 14:56:01Z by jhb MFC: Enable MSI in the MSI capability registers any time that the first message in an MSI group is enabled, not just if the address/data pair are not initialized.
Revision 1.385: download - view: text, markup, annotated - select for diffs
Mon Jun 22 20:08:06 2009 UTC (2 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.384: preferred, colored
Changes since revision 1.384: +3 -1 lines
SVN rev 194644 on 2009-06-22 20:08:06Z by jhb Enable MSI in the MSI capability registers any time that the first message in an MSI group is enabled, not just if the address/data pair are not initialized. Reported by: rnoland MFC after: 1 week
Revision 1.384: download - view: text, markup, annotated - select for diffs
Fri Jun 5 18:44:36 2009 UTC (2 years, 8 months ago) by jkim
Branches: MAIN
Diff to: previous 1.383: preferred, colored
Changes since revision 1.383: +1 -1 lines
SVN rev 193530 on 2009-06-05 18:44:36Z by jkim Import ACPICA 20090521.
Revision 1.383: download - view: text, markup, annotated - select for diffs
Tue Jun 2 12:35:04 2009 UTC (2 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.382: preferred, colored
Changes since revision 1.382: +1 -0 lines
SVN rev 193306 on 2009-06-02 12:35:04Z by jhb Include <machine/stdarg.h> for va_*(). I'm not sure how this compiled on amd64 without this.
Revision 1.382: download - view: text, markup, annotated - select for diffs
Mon Jun 1 20:30:00 2009 UTC (2 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.381: preferred, colored
Changes since revision 1.381: +18 -7 lines
SVN rev 193257 on 2009-06-01 20:30:00Z by jhb Add an internal pci_printf() routine similar to device_printf() except that it prefixes the output with 'pci<domain>:<bus>:<device>:<function>: '.
Revision 1.381: download - view: text, markup, annotated - select for diffs
Wed May 20 22:00:39 2009 UTC (2 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.380: preferred, colored
Changes since revision 1.380: +0 -87 lines
SVN rev 192481 on 2009-05-20 22:00:39Z by imp Revert junk from last commit. These are WIP and not ready (and don't match the description of the last commit).
Revision 1.380: download - view: text, markup, annotated - select for diffs
Wed May 20 17:29:21 2009 UTC (2 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.379: preferred, colored
Changes since revision 1.379: +87 -0 lines
SVN rev 192450 on 2009-05-20 17:29:21Z by imp We no longer need to use d_thread_t, migrate to struct thread *.
Revision 1.355.2.10: download - view: text, markup, annotated - select for diffs
Mon May 4 20:35:59 2009 UTC (2 years, 9 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.355.2.9: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.9: +258 -171 lines
SVN rev 191795 on 2009-05-04 20:35:59Z by jhb MFC: Various fixes to the PCI resource allocation code: - Disabling decoding of BARs via the PCI command register before writing to the BARs to size them. - Don't free resources decoded by a BAR when the device driver releases a BAR. Instead, the PCI bus now owns unclaimed BARs and gives them to drivers on demand. When a driver releases a BAR, the PCI bus reclaims it and leaves the resource range allocated. This also prevents drivers from allocating the same resource multiple times. - Move the activation of BARs by enabling decoding in the PCI command register into bus_activate_resource() so that it always happens after the BAR is fully programmed. - Always read/write the full 64-bit value of 64-bit BARs. - Consolidate duplicated code for reading and sizing BARs and writing base address to BARs.
Revision 1.355.2.9.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.355.2.9: preferred, colored; next MAIN 1.355.2.10: preferred, colored
Changes since revision 1.355.2.9: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE. Approved by: re (implicit)
Revision 1.379: download - view: text, markup, annotated - select for diffs
Tue Apr 14 18:32:37 2009 UTC (2 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.378: preferred, colored
Changes since revision 1.378: +98 -121 lines
SVN rev 191069 on 2009-04-14 18:32:37Z by jhb - Consolidate duplicated code for reading and sizing BARs and writing base addresses to BARs into new pci_read_bar() and pci_write_bar() routines. pci_add_map(), pci_alloc_map(), and pci_delete_resource() now use these routines to work with BARs. - Just pass the device_t for the new PCI device to various routines instead of passing the device, bus, slot, and function. Reviewed by: imp
Revision 1.378: download - view: text, markup, annotated - select for diffs
Fri Apr 3 13:35:54 2009 UTC (2 years, 10 months ago) by stas
Branches: MAIN
Diff to: previous 1.377: preferred, colored
Changes since revision 1.377: +1 -1 lines
SVN rev 190670 on 2009-04-03 13:35:54Z by stas - Fix spacing in the comment. Reported by: jhb
Revision 1.377: download - view: text, markup, annotated - select for diffs
Fri Apr 3 10:15:00 2009 UTC (2 years, 10 months ago) by stas
Branches: MAIN
Diff to: previous 1.376: preferred, colored
Changes since revision 1.376: +4 -3 lines
SVN rev 190668 on 2009-04-03 10:15:00Z by stas - Correct the comment. MFC after: 3 days
Revision 1.292.2.29: download - view: text, markup, annotated - select for diffs
Thu Mar 19 19:22:11 2009 UTC (2 years, 10 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.28: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.28: +7 -3 lines
SVN rev 190095 on 2009-03-19 19:22:11Z by jhb MFC: Honor the prefetchable flag in memory BARs.
Revision 1.355.2.9: download - view: text, markup, annotated - select for diffs
Thu Mar 19 18:04:37 2009 UTC (2 years, 10 months ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_2_BP
Branch point for: RELENG_7_2
Diff to: previous 1.355.2.8: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.8: +6 -2 lines
SVN rev 190092 on 2009-03-19 18:04:37Z by jhb MFC: Honor the prefetchable flag in memory BARs.
Revision 1.376: download - view: text, markup, annotated - select for diffs
Tue Mar 10 06:21:52 2009 UTC (2 years, 11 months ago) by marcel
Branches: MAIN
Diff to: previous 1.375: preferred, colored
Changes since revision 1.375: +1 -1 lines
SVN rev 189611 on 2009-03-10 06:21:52Z by marcel Fix a buglet in revision 189401: when restoring a 64-bit BAR, write the upper 32-bits in the adjacent bar. The consequences of the buglet were severe enough though: a machine check.
Revision 1.355.2.8: download - view: text, markup, annotated - select for diffs
Mon Mar 9 08:25:05 2009 UTC (2 years, 11 months ago) by rnoland
Branches: RELENG_7
Diff to: previous 1.355.2.7: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.7: +35 -18 lines
SVN rev 189569 on 2009-03-09 08:25:05Z by rnoland Merge r189367,189447 Extend the management of PCIM_CMD_INTxDIS. We now explicitly enable INTx during bus_setup_intr() if it is needed. Several of the ata drivers were managing this bit internally. This is better handled in pci and it should work for all drivers now. We also mask INTx during bus_teardown_intr() by setting this bit.
Revision 1.355.2.7: download - view: text, markup, annotated - select for diffs
Mon Mar 9 08:18:40 2009 UTC (2 years, 11 months ago) by rnoland
Branches: RELENG_7
Diff to: previous 1.355.2.6: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.6: +4 -0 lines
SVN rev 189568 on 2009-03-09 08:18:40Z by rnoland Merge r189285 Disable INTx when enabling MSI/MSIX This addresses interrupt storms that were noticed after enabling MSI in drm. I think this is due to a loose interpretation of the PCI 2.3 spec, which states that a function using MSI is prohibitted from using INTx. It appears that some vendors interpretted that to mean that they should handle it in hardware, while others felt it was the drivers responsibility. This fix will also likely resolve interrupt storm related issues with devices other than drm.
Revision 1.375: download - view: text, markup, annotated - select for diffs
Fri Mar 6 11:24:42 2009 UTC (2 years, 11 months ago) by rnoland
Branches: MAIN
Diff to: previous 1.374: preferred, colored
Changes since revision 1.374: +1 -1 lines
SVN rev 189447 on 2009-03-06 11:24:42Z by rnoland Invert the logic error for the MSI/MSIX vs INTx case. Pointyhat to: me MFC after: 3 days
Revision 1.292.2.28: download - view: text, markup, annotated - select for diffs
Thu Mar 5 15:50:39 2009 UTC (2 years, 11 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.27: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.27: +1 -1 lines
SVN rev 189403 on 2009-03-05 15:50:39Z by jhb MFC: Don't throw away the upper 32-bits of the HT MSI address window.
Revision 1.355.2.6: download - view: text, markup, annotated - select for diffs
Thu Mar 5 15:46:41 2009 UTC (2 years, 11 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.355.2.5: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.5: +1 -1 lines
SVN rev 189402 on 2009-03-05 15:46:41Z by jhb MFC: Don't throw away the upper 32-bits of the HT MSI address window.
Revision 1.374: download - view: text, markup, annotated - select for diffs
Thu Mar 5 15:33:04 2009 UTC (2 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.373: preferred, colored
Changes since revision 1.373: +33 -22 lines
SVN rev 189401 on 2009-03-05 15:33:04Z by jhb Always read/write the full 64-bit value of 64-bit BARs. Specifically, when determining the size of a BAR by writing all 1's to the BAR and reading back the result, always operate on the full 64-bit size. Reviewed by: imp MFC after: 1 month
Revision 1.373: download - view: text, markup, annotated - select for diffs
Thu Mar 5 15:28:46 2009 UTC (2 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.372: preferred, colored
Changes since revision 1.372: +6 -2 lines
SVN rev 189400 on 2009-03-05 15:28:46Z by jhb Honor the prefetchable flag in memory BARs by setting the RF_PREFETCHABLE flag when calling bus_alloc_resource() to allocate resources from a parent PCI bridge. For PCI-PCI bridges this asks the bridge to satisfy the request using the prefetchable memory range rather than the normal memory range. Reviewed by: imp Reported by: scottl MFC after: 1 week
Revision 1.372: download - view: text, markup, annotated - select for diffs
Wed Mar 4 18:23:48 2009 UTC (2 years, 11 months ago) by rnoland
Branches: MAIN
Diff to: previous 1.371: preferred, colored
Changes since revision 1.371: +35 -18 lines
SVN rev 189367 on 2009-03-04 18:23:48Z by rnoland Extend the management of PCIM_CMD_INTxDIS. We now explicitly enable INTx during bus_setup_intr() if it is needed. Several of the ata drivers were managing this bit internally. This is better handled in pci and it should work for all drivers now. We also mask INTx during bus_teardown_intr() by setting this bit. Reviewed by: jhb MFC after: 3 days
Revision 1.371: download - view: text, markup, annotated - select for diffs
Tue Mar 3 16:38:59 2009 UTC (2 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.370: preferred, colored
Changes since revision 1.370: +163 -82 lines
SVN rev 189306 on 2009-03-03 16:38:59Z by jhb Further refine the handling of resources for BARs in the PCI bus driver. A while back, Warner changed the PCI bus code to reserve resources when enumerating devices and simply give devices the previously allocated resources when they call bus_alloc_resource(). This ensures that address ranges being decoded by a BAR are always allocated in the nexus0 device (or whatever device the PCI bus gets its address space from) even if a device driver is not attached to the device. This patch extends this behavior further: - To let the PCI bus distinguish between a resource being allocated by a device driver vs. merely being allocated by the bus, use rman_set_device() to assign the device to the bus when it is owned by the bus and to the child device when it is allocated by the child device's driver. We can now prevent a device driver from allocating the same device twice. Doing so could result in odd things like allocating duplicate virtual memory to map the resource on some archs and leaking the original mapping. - When a PCI device driver releases a resource, don't pass the request all the way up the tree and release it in the nexus (or similar device) since the BAR is still active and decoding. Otherwise, another device could later allocate the same range even though it is still in use. Instead, deactivate the resource and assign it back to the PCI bus using rman_set_device(). - pci_delete_resource() will actually completely free a BAR including attemping to disable it. - Disable BAR decoding via the command register when sizing a BAR in pci_alloc_map() which is used to allocate resources for a BAR when the BIOS/firmware did not assign a usable resource range during boot. This mirrors an earlier fix to pci_add_map() which is used when to size BARs during boot. - Move the activation of I/O decoding in the PCI command register into pci_activate_resource() instead of doing it in pci_alloc_resource(). Previously we could actually enable decoding before a BAR was initialized via pci_alloc_map(). Glanced at by: bsdimp
Revision 1.370: download - view: text, markup, annotated - select for diffs
Mon Mar 2 19:00:41 2009 UTC (2 years, 11 months ago) by rnoland
Branches: MAIN
Diff to: previous 1.369: preferred, colored
Changes since revision 1.369: +4 -0 lines
SVN rev 189285 on 2009-03-02 19:00:41Z by rnoland Disable INTx when enabling MSI/MSIX This addresses interrupt storms that were noticed after enabling MSI in drm. I think this is due to a loose interpretation of the PCI 2.3 spec, which states that a function using MSI is prohibitted from using INTx. It appears that some vendors interpretted that to mean that they should handle it in hardware, while others felt it was the drivers responsibility. This fix will also likely resolve interrupt storm related issues with devices other than drm. Reviewed by: jhb@ MFC after: 3 days
Revision 1.369: download - view: text, markup, annotated - select for diffs
Thu Feb 26 14:32:14 2009 UTC (2 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.368: preferred, colored
Changes since revision 1.368: +1 -1 lines
SVN rev 189073 on 2009-02-26 14:32:14Z by jhb Don't throw away upper 32-bits of the HT MSI address window. In practice this is harmless since the address window for MSI on x86 is in the lower 4 GB. Submitted by: mav MFC after: 1 week
Revision 1.368: download - view: text, markup, annotated - select for diffs
Tue Jan 20 00:05:43 2009 UTC (3 years ago) by nwhitehorn
Branches: MAIN
Diff to: previous 1.367: preferred, colored
Changes since revision 1.367: +1 -1 lines
SVN rev 187457 on 2009-01-20 00:05:43Z by nwhitehorn Change the probe priority for PCI and I2C generic bus modules from numerical constants to BUS_PROBE_GENERIC. Suggested by: jhb
Revision 1.367: download - view: text, markup, annotated - select for diffs
Fri Jan 16 22:22:30 2009 UTC (3 years ago) by jhb
Branches: MAIN
Diff to: previous 1.366: preferred, colored
Changes since revision 1.366: +18 -0 lines
SVN rev 187348 on 2009-01-16 22:22:30Z by jhb Disable decoding of BARs by devices before we trash the value in the BAR by writing all 1's to it to determine its length. This fixes issues with MCFG on at least some machines where a trashed BAR claimed subsequent attempts at PCI config transactions because the addresses in the MCFG window fell in the decoding range of the BAR. In general it is a bad idea to leave the BARs enabled while we are frobbing with them in this manner. Sleuthing by: tegge MFC after: 1 week
Revision 1.355.2.5: download - view: text, markup, annotated - select for diffs
Fri Jan 9 20:33:07 2009 UTC (3 years, 1 month ago) by mav
Branches: RELENG_7
Diff to: previous 1.355.2.4: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.4: +5 -0 lines
SVN rev 186967 on 2009-01-09 20:33:07Z by mav MFC rev. 184139, 184141, 184937 Add "SD host controller" subclass. Add HDA multimedia subclass. Add ADMA, SATA and SAS mass storage subclasses.
Revision 1.355.2.4.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.355.2.4: preferred, colored; next MAIN 1.355.2.5: preferred, colored
Changes since revision 1.355.2.4: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith Create releng/7.1 in preparation for moving into RC phase of 7.1 release cycle. Approved by: re (implicit)
Revision 1.366: download - view: text, markup, annotated - select for diffs
Thu Nov 13 19:57:33 2008 UTC (3 years, 2 months ago) by mav
Branches: MAIN
Diff to: previous 1.365: preferred, colored
Changes since revision 1.365: +3 -0 lines
SVN rev 184937 on 2008-11-13 19:57:33Z by mav Add ADMA, SATA and SAS mass storage subclasses reporting.
Revision 1.365: download - view: text, markup, annotated - select for diffs
Tue Oct 21 21:53:55 2008 UTC (3 years, 3 months ago) by mav
Branches: MAIN
Diff to: previous 1.364: preferred, colored
Changes since revision 1.364: +1 -0 lines
SVN rev 184141 on 2008-10-21 21:53:55Z by mav Add HDA multimedia subclass.
Revision 1.364: download - view: text, markup, annotated - select for diffs
Tue Oct 21 20:55:41 2008 UTC (3 years, 3 months ago) by mav
Branches: MAIN
Diff to: previous 1.363: preferred, colored
Changes since revision 1.363: +1 -0 lines
SVN rev 184139 on 2008-10-21 20:55:41Z by mav Add "SD host controller" subclass name.
Revision 1.292.2.27.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.292.2.27: preferred, colored; next MAIN 1.292.2.28: preferred, colored
Changes since revision 1.292.2.27: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith Create releng/6.4 from stable/6 in preparation for 6.4-RC1. Approved by: re (implicit)
Revision 1.363: download - view: text, markup, annotated - select for diffs
Sat Aug 23 07:23:52 2008 UTC (3 years, 5 months ago) by imp
Branches: MAIN
Diff to: previous 1.362: preferred, colored
Changes since revision 1.362: +7 -4 lines
SVN rev 182033 on 2008-08-23 07:23:52Z by imp Cope with errors from device_get_children(). These errors can happen only in low memory situations, so the error fork of these fixes is lightly tested, but they should do the least-wrong thing... Submitted by: Hans Petter Selasky
Revision 1.362: download - view: text, markup, annotated - select for diffs
Sat Aug 23 07:18:30 2008 UTC (3 years, 5 months ago) by imp
Branches: MAIN
Diff to: previous 1.361: preferred, colored
Changes since revision 1.361: +0 -2 lines
SVN rev 182032 on 2008-08-23 07:18:30Z by imp Cosmetic nit.
Revision 1.292.2.27: download - view: text, markup, annotated - select for diffs
Sat Aug 23 03:43:38 2008 UTC (3 years, 5 months ago) by mlaier
Branches: RELENG_6
CVS tags: RELENG_6_4_BP
Branch point for: RELENG_6_4
Diff to: previous 1.292.2.26: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.26: +42 -4 lines
SVN rev 182030 on 2008-08-23 03:43:38Z by mlaier MFC r180753 by luoqi@: Only enable MSI mappings for devices that use MSI. Fixes interrupt loss on some nForce based boards. PR: kern/118842
Revision 1.355.2.4: download - view: text, markup, annotated - select for diffs
Sat Aug 23 03:40:49 2008 UTC (3 years, 5 months ago) by mlaier
Branches: RELENG_7
CVS tags: RELENG_7_1_BP
Branch point for: RELENG_7_1
Diff to: previous 1.355.2.3: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.3: +42 -4 lines
SVN rev 182029 on 2008-08-23 03:40:49Z by mlaier MFC r180753 by luoqi@: Only enable MSI mappings for devices that use MSI. Fixes interrupt loss on some nForce based boards. PR: kern/118842
Revision 1.292.2.26: download - view: text, markup, annotated - select for diffs
Fri Aug 15 20:17:08 2008 UTC (3 years, 5 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.25: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.25: +19 -5 lines
SVN rev 181772 on 2008-08-15 20:17:08Z by jhb MFC: If the kernel fails to allocate resources for the initial value of a PCI BAR, then zero the BAR and clear the resource list entry so that a new resource will be allocated by the device driver.
Revision 1.355.2.3: download - view: text, markup, annotated - select for diffs
Fri Aug 15 20:16:21 2008 UTC (3 years, 5 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.355.2.2: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.2: +16 -14 lines
SVN rev 181771 on 2008-08-15 20:16:21Z by jhb MFC: If the kernel fails to allocate resources for the initial value of a PCI BAR, then zero the BAR and clear the resource list entry so that a new resource will be allocated by the device driver.
Revision 1.361: download - view: text, markup, annotated - select for diffs
Sat Aug 9 03:54:12 2008 UTC (3 years, 6 months ago) by imp
Branches: MAIN
Diff to: previous 1.360: preferred, colored
Changes since revision 1.360: +1 -1 lines
SVN rev 181452 on 2008-08-09 03:54:12Z by imp Change -1 to 0xfffffffful since the interface returns uint32_t.
Revision 1.360: download - view: text, markup, annotated - select for diffs
Tue Aug 5 21:04:00 2008 UTC (3 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.359: preferred, colored
Changes since revision 1.359: +1 -19 lines
SVN rev 181336 on 2008-08-05 21:04:00Z by jhb Remove the second check for a 64-bit BAR value on a 32-bit system in pci_add_map(). First, this condition is already handled earlier in the function. Second, as written the check would never fire as the 'start' value was overwritten with a long value (rman_get_start() returns long) before the comparison was done. Discussed with: imp MFC after: 2 weeks
Revision 1.359: download - view: text, markup, annotated - select for diffs
Tue Aug 5 18:24:41 2008 UTC (3 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.358: preferred, colored
Changes since revision 1.358: +33 -13 lines
SVN rev 181333 on 2008-08-05 18:24:41Z by jhb If the kernel fails to allocate resources for the initial value of a BAR for a PCI device during the boot-time probe of the parent PCI bus, then zero the BAR and clear the resource list entry for that BAR. This forces the PCI bus driver to request a valid resource range from the parent bridge driver when the device driver tries to allocate the BAR. Similarly, if the initial value of a BAR is a valid range but it is > 4GB and the current OS only has 32-bit longs, then do a full teardown of the initial value of the BAR to force a reallocation. Reviewed by: imp MFC after: 1 week
Revision 1.358: download - view: text, markup, annotated - select for diffs
Wed Jul 23 09:44:36 2008 UTC (3 years, 6 months ago) by luoqi
Branches: MAIN
Diff to: previous 1.357: preferred, colored
Changes since revision 1.357: +42 -4 lines
SVN rev 180753 on 2008-07-23 09:44:36Z by luoqi SATA device on some nForce based boards could get confused if MSI is not used but MSI to HyperTransport IRQ mapping is enabled, and would act as if MSI is turned on, resulting in interrupt loss. This commit will, 1. enable MSI mapping on a device only when MSI is enabled for that device and the MSI address matches the HT mapping window. 2. enable MSI mapping on a bridge only when a downstream device is allocated an MSI address in the mapping window PR: kern/118842 Reviewed by: jhb MFC after: 1 week
Revision 1.292.2.25: download - view: text, markup, annotated - select for diffs
Tue Feb 12 20:21:35 2008 UTC (3 years, 11 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.24: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.24: +2 -5 lines
MFC: Relax the check for a PCI-express chipset.
Revision 1.355.2.2: download - view: text, markup, annotated - select for diffs
Tue Feb 12 20:20:56 2008 UTC (3 years, 11 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.355.2.1: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.2.1: +2 -5 lines
MFC: Relax the check for a PCI-express chipset.
Revision 1.357: download - view: text, markup, annotated - select for diffs
Fri Feb 1 20:31:09 2008 UTC (4 years ago) by jhb
Branches: MAIN
Diff to: previous 1.356: preferred, colored
Changes since revision 1.356: +2 -5 lines
Relax the check for a PCI-express chipset by assuming the system is a PCI-express chipset (and thus has functional MSI) if there are any PCI-express devices in the system, not requiring a root port device. With PCI-X the chipset detection has to be very conservative because there are known systems with PCI-X devices that do not appear to have PCI-X chipsets. However, with PCI-express I'm not sure it is possible to have a PCI-express device in a system with a non-PCI-express chipset. If we assume that is the case then this change is valid. It is also required for at least some PCI-express systems that don't have any devices with a root port capability (some ICH9 systems). MFC after: 1 week Reported by: jfv
Revision 1.292.2.24: download - view: text, markup, annotated - select for diffs
Sat Jan 26 17:09:46 2008 UTC (4 years ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.23: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.23: +3 -1 lines
MFC 1.343: Add support for ATA chipsets that have NULL'd BAR's for legacy ports.
Revision 1.292.2.23: download - view: text, markup, annotated - select for diffs
Thu Jan 10 21:17:12 2008 UTC (4 years, 1 month ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.22: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.22: +2 -2 lines
Flip the switch to enable MSI by default on 6.x. This will not be MFC'd into 6.3.
Revision 1.355.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 26 17:37:24 2007 UTC (4 years, 2 months ago) by jkim
Branches: RELENG_7
CVS tags: RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Diff to: previous 1.355: preferred, colored
Changes since revision 1.355: +121 -69 lines
MFC: 1.356 Make VPD register access more robust: - Implement timing out of VPD register access. - Fix an off-by-one error of freeing malloc'd space when checksum is invalid. - Fix style(9) bugs, i.e., sizeof cannot be followed by space. - Retire now obsolete 'hw.pci.enable_vpd' tunable. Approved by: re (kensmith)
Revision 1.356: download - view: text, markup, annotated - select for diffs
Fri Nov 16 20:49:34 2007 UTC (4 years, 2 months ago) by jkim
Branches: MAIN
Diff to: previous 1.355: preferred, colored
Changes since revision 1.355: +121 -69 lines
Make VPD register access more robust: - Implement timing out of VPD register access.[1] - Fix an off-by-one error of freeing malloc'd space when checksum is invalid. - Fix style(9) bugs, i.e., sizeof cannot be followed by space. - Retire now obsolete 'hw.pci.enable_vpd' tunable. Submitted by: cokane (initial revision)[1] Reviewed by: marius (intermediate revision) Silence from: jhb, jmg, rwatson Tested by: cokane, jkim MFC after: 3 days
Revision 1.355: download - view: text, markup, annotated - select for diffs
Sun Sep 30 11:05:15 2007 UTC (4 years, 4 months ago) by marius
Branches: MAIN
CVS tags: RELENG_7_BP
Branch point for: RELENG_7
Diff to: previous 1.354: preferred, colored
Changes since revision 1.354: +62 -36 lines
Make the PCI code aware of PCI domains (aka PCI segments) so we can support machines having multiple independently numbered PCI domains and don't support reenumeration without ambiguity amongst the devices as seen by the OS and represented by PCI location strings. This includes introducing a function pci_find_dbsf(9) which works like pci_find_bsf(9) but additionally takes a domain number argument and limiting pci_find_bsf(9) to only search devices in domain 0 (the only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order to no longer report false positives when searching for siblings and dupe devices in the same domain respectively. Along with this change the sole host-PCI bridge driver converted to actually make use of PCI domain support is uninorth(4), the others continue to use domain 0 only for now and need to be converted as appropriate later on. Note that this means that the format of the location strings as used by pciconf(8) has been changed and that consumers of <sys/pciio.h> potentially need to be recompiled. Suggested by: jhb Reviewed by: grehan, jhb, marcel Approved by: re (kensmith), jhb (PCI maintainer hat)
Revision 1.292.2.22: download - view: text, markup, annotated - select for diffs
Wed Aug 15 20:56:09 2007 UTC (4 years, 5 months ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3
Diff to: previous 1.292.2.21: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.21: +306 -29 lines
MFC: Revamp the MSI/MSI-X code a bit to achieve two main goals: - Simplify the amount of work that has be done for each architecture by pushing more of the truly MI code down into the PCI bus driver. - Don't bind MSI-X indicies to IRQs so that we can allow a driver to map multiple MSI-X messages into a single IRQ when handling a message shortage. Note that as with the previous MSI MFC, this does not yet include the 'pci_remap_msix()' function.
Revision 1.354: download - view: text, markup, annotated - select for diffs
Sun Jul 29 02:44:41 2007 UTC (4 years, 6 months ago) by marcel
Branches: MAIN
Diff to: previous 1.353: preferred, colored
Changes since revision 1.353: +8 -0 lines
In pci_alloc_map(), restore the original value of the BAR for the duration of the function. The device we would otherwise have left in an useless state may just as well be the low-level console. When booting verbose, we do need it addressable if we want to avoid a MCA. Approved by: re (kensmith)
Revision 1.292.2.21: download - view: text, markup, annotated - select for diffs
Wed May 23 18:12:00 2007 UTC (4 years, 8 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.20: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.20: +1 -1 lines
MFC 1.352: Fix a typo in a bootverbose printf.
Revision 1.292.2.20: download - view: text, markup, annotated - select for diffs
Wed May 23 18:11:30 2007 UTC (4 years, 8 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.19: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.19: +72 -73 lines
MFC 1.350: Use more specific local variable pointers to narrow some expressions.
Revision 1.353: download - view: text, markup, annotated - select for diffs
Wed May 16 23:42:04 2007 UTC (4 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.352: preferred, colored
Changes since revision 1.352: +1 -3 lines
Don't completely skip pci_cfg_save() in the PCI nomatch routine if the power_nodriver tunable is off. pci_cfg_save() already checks the tunable internally, and no other callers of pci_cfg_save() check the tunable. Reviewed by: imp
Revision 1.352: download - view: text, markup, annotated - select for diffs
Mon May 7 18:29:37 2007 UTC (4 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.351: preferred, colored
Changes since revision 1.351: +1 -1 lines
Fix a typo in a bootverbose printf. MFC after: 3 days Submitted by: yongari
Revision 1.351: download - view: text, markup, annotated - select for diffs
Wed May 2 17:50:35 2007 UTC (4 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.350: preferred, colored
Changes since revision 1.350: +437 -90 lines
Revamp the MSI/MSI-X code a bit to achieve two main goals: - Simplify the amount of work that has be done for each architecture by pushing more of the truly MI code down into the PCI bus driver. - Don't bind MSI-X indicies to IRQs so that we can allow a driver to map multiple MSI-X messages into a single IRQ when handling a message shortage. The changes include: - Add a new pcib_if method: PCIB_MAP_MSI() which is called by the PCI bus to calculate the address and data values for a given MSI/MSI-X IRQ. The x86 nexus drivers map this into a call to a new 'msi_map()' function in msi.c that does the mapping. - Retire the pcib_if method PCIB_REMAP_MSIX() and remove the 'index' parameter from PCIB_ALLOC_MSIX(). MD code no longer has any knowledge of the MSI-X index for a given MSI-X IRQ. - The PCI bus driver now stores more MSI-X state in a child's ivars. Specifically, it now stores an array of IRQs (called "message vectors" in the code) that have associated address and data values, and a small virtual version of the MSI-X table that specifies the message vector that a given MSI-X table entry uses. Sparse mappings are permitted in the virtual table. - The PCI bus driver now configures the MSI and MSI-X address/data registers directly via custom bus_setup_intr() and bus_teardown_intr() methods. pci_setup_intr() invokes PCIB_MAP_MSI() to determine the address and data values for a given message as needed. The MD code no longer has to call back down into the PCI bus code to set these values from the nexus' bus_setup_intr() handler. - The PCI bus code provides a callout (pci_remap_msi_irq()) that the MD code can call to force the PCI bus to re-invoke PCIB_MAP_MSI() to get new values of the address and data fields for a given IRQ. The x86 MSI code uses this when an MSI IRQ is moved to a different CPU, requiring a new value of the 'address' field. - The x86 MSI psuedo-driver loses a lot of code, and in fact the separate MSI/MSI-X pseudo-PICs are collapsed down into a single MSI PIC driver since the only remaining diff between the two is a substring in a bootverbose printf. - The PCI bus driver will now restore MSI-X state (including programming entries in the MSI-X table) on device resume. - The interface for pci_remap_msix() has changed. Instead of accepting indices for the allocated vectors, it accepts a mini-virtual table (with a new length parameter). This table is an array of u_ints, where each value specifies which allocated message vector to use for the corresponding MSI-X message. A vector of 0 forces a message to not have an associated IRQ. The device may choose to only use some of the IRQs assigned, in which case the unused IRQs must be at the "end" and will be released back to the system. This allows a driver to use the same remap table for different shortage values. For example, if a driver wants 4 messages, it can use the same remap table (which only uses the first two messages) for the cases when it only gets 2 or 3 messages and in the latter case the PCI bus will release the 3rd IRQ back to the system. MFC after: 1 month
Revision 1.350: download - view: text, markup, annotated - select for diffs
Wed May 2 16:21:18 2007 UTC (4 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.349: preferred, colored
Changes since revision 1.349: +72 -73 lines
Use more specific local variable pointers to narrow some expressions. MFC after: 1 week
Revision 1.292.2.19: download - view: text, markup, annotated - select for diffs
Mon Apr 30 17:58:22 2007 UTC (4 years, 9 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.18: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.18: +12 -8 lines
MFC: Handle HyperTransport MSI mapping window fixed-window flag.
Revision 1.349: download - view: text, markup, annotated - select for diffs
Wed Apr 25 14:45:46 2007 UTC (4 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.348: preferred, colored
Changes since revision 1.348: +12 -8 lines
- HT 2.00b added a new flag to the MSI mapping HT capability to indicate that the MSI mapping window is fixed at 0xfee00000 and the capability does not include two more dwords used to program the address. Supporting this mostly results in quieting spurious warnings during boot about non-default MSI mapping windows. - HT 2.00b also added a new HT capability type, so support that in pciconf. MFC after: 3 days Tested by: jmg
Revision 1.292.2.18: download - view: text, markup, annotated - select for diffs
Mon Apr 23 18:03:57 2007 UTC (4 years, 9 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.17: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.17: +1 -1 lines
MFC: Correct word index calculation in pci_pending_msix().
Revision 1.348: download - view: text, markup, annotated - select for diffs
Sat Mar 31 21:39:02 2007 UTC (4 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.347: preferred, colored
Changes since revision 1.347: +30 -34 lines
Add constants for the fields in a BAR. Also, add two new macros PCI_BAR_(IO|MEM)() that return true if the passed in value from a BAR is for an IO or memory BAR, respectively. Reviewed by: imp
Revision 1.347: download - view: text, markup, annotated - select for diffs
Sat Mar 31 20:59:11 2007 UTC (4 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.346: preferred, colored
Changes since revision 1.346: +0 -0 lines
Forced commit to note that the previous commit log was wrong for this file. The previous commit fixed a bug in pci_pending_msix() where it mis-calculated the word in the PBA to read to see if a message was pending. Nothing actually uses pci_pending_msix() yet though, so this didn't result in any visible problems. MFC after: 1 week
Revision 1.346: download - view: text, markup, annotated - select for diffs
Sat Mar 31 20:41:00 2007 UTC (4 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.345: preferred, colored
Changes since revision 1.345: +1 -1 lines
- Add missing constants for subclasses. - Add a few progif constants as well.
Revision 1.292.2.17: download - view: text, markup, annotated - select for diffs
Sat Mar 31 15:23:20 2007 UTC (4 years, 10 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.16: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.16: +30 -0 lines
MFC: PCI MSI support for amd64 and i386.
Revision 1.292.2.16: download - view: text, markup, annotated - select for diffs
Sat Mar 31 14:50:51 2007 UTC (4 years, 10 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.15: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.15: +652 -7 lines
MFC: MI support for PCI Message Signalled Interrupts (MSI). For more details see the relevant commit logs in HEAD. The notable differences between this patch and what is in HEAD now are that pci_remap_msix() is not currently implemented in this patch (I need to change the API in HEAD, so I'm not going to MFC it until its API is stable) and MSI and MSI-X are not enabled by default. To enable MSI and MSI-X support, one must set the 'hw.pci.msi_enable' and/or 'hw.pci.msix_enable' loader tunables.
Revision 1.345: download - view: text, markup, annotated - select for diffs
Mon Mar 26 20:18:52 2007 UTC (4 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.344: preferred, colored
Changes since revision 1.344: +13 -30 lines
Change the VPD code to read the VPD data on-demand when a driver asks for it via pci_get_vpd_*() rather than always reading it for each device during boot. I've left the tunable so that it can still be turned off if a device driver causes a lockup via a query to a broken device, but devices whose drivers do not use VPD (the vast majority) should no longer result in lockups during boot, and most folks should not need to tweak the tunable now. Tested on: bge(4) Silence from: jmg
Revision 1.344: download - view: text, markup, annotated - select for diffs
Mon Mar 5 16:21:59 2007 UTC (4 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.343: preferred, colored
Changes since revision 1.343: +13 -13 lines
- Use constants for VPD capability register offsets. - Add missing ()'s around return values.
Revision 1.343: download - view: text, markup, annotated - select for diffs
Sat Feb 17 16:56:39 2007 UTC (4 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.342: preferred, colored
Changes since revision 1.342: +3 -1 lines
Add support for chipsets that has NULL'd BAR's for legacy ports. This allows DMA to be used on a fine little geode system I got here and most like on lots of older systems like that. HW donated by: Paul Ghering
Revision 1.342: download - view: text, markup, annotated - select for diffs
Wed Feb 14 22:36:27 2007 UTC (4 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.341: preferred, colored
Changes since revision 1.341: +26 -0 lines
Adjust the global MSI blacklisting strategy so we don't have to explicitly blacklist a bunch of old chipsets. If a system contains a PCI-PCI bridge that supports PCI-X, assume the chipset supports PCI-X. If a system contains a PCI-express root port, assume the chipset supports PCI-express. If the chipset doesn't support either PCI-X or PCI-express, then blacklist it by default. We should now only need to explicitly blacklist PCI-X or PCI-express chipsets that don't properly handle MSI.
Revision 1.341: download - view: text, markup, annotated - select for diffs
Wed Feb 14 22:32:55 2007 UTC (4 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.340: preferred, colored
Changes since revision 1.340: +10 -2 lines
- Fix an off by one error in pci_remap_msix_method() that effectively broke the method as all the MSI-X table indices were off by one in the backend MD code. - Fix a cosmetic nit in the bootverbose printf in pci_alloc_msix_method().
Revision 1.292.2.15: download - view: text, markup, annotated - select for diffs
Wed Feb 14 17:04:05 2007 UTC (4 years, 11 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.14: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.14: +2 -0 lines
Add a couple of missing breaks that are harmless, though the first one missing meant that a PCI-PCI bridge that supported MSI but didn't support PCIY_SUBVENDOR (or the MSI capability came after the subvendor cap) would have garbage in its subvendor ID.
Revision 1.340: download - view: text, markup, annotated - select for diffs
Wed Feb 14 17:02:15 2007 UTC (4 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.339: preferred, colored
Changes since revision 1.339: +1 -0 lines
Add missing 'break' that in this case is harmless.
Revision 1.292.2.14: download - view: text, markup, annotated - select for diffs
Fri Feb 9 14:23:01 2007 UTC (5 years ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.13: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.13: +8 -2 lines
MFC: Fix the subvendor ID for PCI-PCI bridges.
Revision 1.292.2.13: download - view: text, markup, annotated - select for diffs
Fri Feb 9 14:16:30 2007 UTC (5 years ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.12: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.12: +9 -9 lines
MFC: Style fix: s/#define<space>/#define<tab>/.
Revision 1.339: download - view: text, markup, annotated - select for diffs
Thu Feb 8 14:33:07 2007 UTC (5 years ago) by rwatson
Branches: MAIN
Diff to: previous 1.338: preferred, colored
Changes since revision 1.338: +9 -2 lines
As VPD support still causes hard hangs on boot with some hardware, add a tunable allowing automatic parsing of VPD data to be disabled. The default is left as-is; if you are having problems with hard hangs at boot due to VPD, try setting hw.pci.enable_vpd=0. A proper architectural solution has been under discussion for some time, but this allows me to boot my test machines in the mean time. Submitted by: bz Head nod: jmg
Revision 1.338: download - view: text, markup, annotated - select for diffs
Mon Jan 22 21:48:43 2007 UTC (5 years ago) by jhb
Branches: MAIN
Diff to: previous 1.337: preferred, colored
Changes since revision 1.337: +143 -27 lines
Expand the MSI/MSI-X API to address some deficiencies in the MSI-X support.
- First off, device drivers really do need to know if they are allocating
MSI or MSI-X messages. MSI requires allocating powerof2() messages for
example where MSI-X does not. To address this, split out the MSI-X
support from pci_msi_count() and pci_alloc_msi() into new driver-visible
functions pci_msix_count() and pci_alloc_msix(). As a result,
pci_msi_count() now just returns a count of the max supported MSI
messages for the device, and pci_alloc_msi() only tries to allocate MSI
messages. To get a count of the max supported MSI-X messages, use
pci_msix_count(). To allocate MSI-X messages, use pci_alloc_msix().
pci_release_msi() still handles both MSI and MSI-X messages, however.
As a result of this change, drivers using the existing API will only
use MSI messages and will no longer try to use MSI-X messages.
- Because MSI-X allows for each message to have its own data and address
values (and thus does not require all of the messages to have their
MD vectors allocated as a group), some devices allow for "sparse" use
of MSI-X message slots. For example, if a device supports 8 messages
but the OS is only able to allocate 2 messages, the device may make the
best use of 2 IRQs if it enables the messages at slots 1 and 4 rather
than default of using the first N slots (or indicies) at 1 and 2. To
support this, add a new pci_remap_msix() function that a driver may call
after a successful pci_alloc_msix() (but before allocating any of the
SYS_RES_IRQ resources) to allow the allocated IRQ resources to be
assigned to different message indices. For example, from the earlier
example, after pci_alloc_msix() returned a value of 2, the driver would
call pci_remap_msix() passing in array of integers { 1, 4 } as the
new message indices to use. The rid's for the SYS_RES_IRQ resources
will always match the message indices. Thus, after the call to
pci_remap_msix() the driver would be able to access the first message
in slot 1 at SYS_RES_IRQ rid 1, and the second message at slot 4 at
SYS_RES_IRQ rid 4. Note that the message slots/indices are 1-based
rather than 0-based so that they will always correspond to the rid
values (SYS_RES_IRQ rid 0 is reserved for the legacy INTx interrupt).
To support this API, a new PCIB_REMAP_MSIX() method was added to the
pcib interface to change the message index for a single IRQ.
Tested by: scottl
Revision 1.337: download - view: text, markup, annotated - select for diffs
Tue Jan 16 19:44:45 2007 UTC (5 years ago) by jhb
Branches: MAIN
Diff to: previous 1.336: preferred, colored
Changes since revision 1.336: +3 -1 lines
Disable MSI for the Intel 845 and 865 chipsets and update comment for E7210 to note it is the same devid as the 875 chipset.
Revision 1.336: download - view: text, markup, annotated - select for diffs
Tue Jan 16 17:04:42 2007 UTC (5 years ago) by jhb
Branches: MAIN
Diff to: previous 1.335: preferred, colored
Changes since revision 1.335: +7 -2 lines
Fix the subvendor ID for PCI-PCI bridges. - Retire the PCI_SUB*_1 constants and don't try to read a subvendor ID out of them. There isn't a standard subvendor ID field for PCI-PCI bridges. Instead, the dword at offset 0x34 is actually mostly reserved except for the LSB which is the capabilities pointer. - Add support for the PCI-PCI bridge subvendor ID capability (13) and use it to set the subvendor ID for PCI-PCI bridges. MFC after: 1 month
Revision 1.335: download - view: text, markup, annotated - select for diffs
Sat Jan 13 04:57:37 2007 UTC (5 years ago) by jhb
Branches: MAIN
Diff to: previous 1.334: preferred, colored
Changes since revision 1.334: +6 -0 lines
- Add a new flag to the PCI-PCI driver to disable MSI on devices behind the bridge if it doesn't pass MSI messages up correctly. We set the flag in pcib_attach() if the device ID is disabled via a PCI quirk. - Disable MSI for devices behind the AMD 8131 HT-PCIX bridge. Linux has the same quirk. Tested by: no one despite repeated calls for testers
Revision 1.334: download - view: text, markup, annotated - select for diffs
Fri Jan 12 21:37:51 2007 UTC (5 years ago) by jhb
Branches: MAIN
Diff to: previous 1.333: preferred, colored
Changes since revision 1.333: +7 -0 lines
Disable MSI for two ServerWorks chipsets. The first is based on a user report. The second is blacklisted in Linux.
Revision 1.333: download - view: text, markup, annotated - select for diffs
Fri Jan 12 21:30:25 2007 UTC (5 years ago) by jhb
Branches: MAIN
Diff to: previous 1.332: preferred, colored
Changes since revision 1.332: +4 -2 lines
Blacklist a few more Intel chipsets re: MSI based on user reports: E7500 and 855.
Revision 1.332: download - view: text, markup, annotated - select for diffs
Fri Jan 12 13:33:56 2007 UTC (5 years ago) by jhb
Branches: MAIN
Diff to: previous 1.331: preferred, colored
Changes since revision 1.331: +3 -7 lines
- Condense the comment for Intel chipset MSI blacklist entries. - Blacklist the E7210. PR: kern/105768 (2) Reported by: marcus (2)
Revision 1.292.2.12: download - view: text, markup, annotated - select for diffs
Thu Dec 28 22:20:40 2006 UTC (5 years, 1 month ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.11: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.11: +1 -1 lines
MFC: Make the ACPI and OpenFirmware PCI bus drivers subclasses of the generic PCI bus driver.
Revision 1.292.2.11: download - view: text, markup, annotated - select for diffs
Thu Dec 28 21:40:54 2006 UTC (5 years, 1 month ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.10: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.10: +56 -3 lines
MFC: Add the PCI_FIND_EXTCAP() method to the PCI bus interface to lookup specific extended capability registers by capability ID. Requested by: scottl
Revision 1.331: download - view: text, markup, annotated - select for diffs
Thu Dec 28 06:14:42 2006 UTC (5 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.330: preferred, colored
Changes since revision 1.330: +6 -0 lines
Disable MSI on the Intel E7505 chipset. It is reported broken on a Tyan S2665ANF motherboard. Reported by: "Eugene M. Kim" <blue at white lv>
Revision 1.330: download - view: text, markup, annotated - select for diffs
Thu Dec 14 19:59:29 2006 UTC (5 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.329: preferred, colored
Changes since revision 1.329: +6 -0 lines
Disable MSI for the Intel E7501 chipset. Reported by: jdp
Revision 1.329: download - view: text, markup, annotated - select for diffs
Thu Dec 14 19:57:06 2006 UTC (5 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.328: preferred, colored
Changes since revision 1.328: +51 -0 lines
Add a first pass at a way to blacklist MSI on systems where it doesn't work: - A new PCI quirk (PCI_QUIRK_DISABLE_MSI) is added to the quirk table. - A new pci_msi_device_blacklisted() determines if a passed in device matches an MSI quirk in the quirk table. This can be overridden (all quirks ignored) by setting the hw.pci.honor_msi_blacklist to 0. - A global blacklist check is performed in the MI PCI bus code by checking to see if the device at 0:0:0 is blacklisted. Tested by: jdp
Revision 1.328: download - view: text, markup, annotated - select for diffs
Thu Dec 14 16:53:48 2006 UTC (5 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.327: preferred, colored
Changes since revision 1.327: +10 -10 lines
Replace #define<space> with #define<tab> so the code is consistent with style(9) and avoids mixing the two formats.
Revision 1.327: download - view: text, markup, annotated - select for diffs
Tue Dec 12 19:33:25 2006 UTC (5 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.326: preferred, colored
Changes since revision 1.326: +30 -0 lines
- Add constants for HT PCI capability registers including the various subtypes of HT capabilities. - Add constants for the MSI mapping window HT PCI capability. - On i386 and amd64, enable the MSI mapping window on any HT bridges we encounter and report any non-standard mapping window addresses.
Revision 1.326: download - view: text, markup, annotated - select for diffs
Tue Dec 12 19:30:40 2006 UTC (5 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.325: preferred, colored
Changes since revision 1.325: +3 -3 lines
Give the WREG() macro the same lifetime as the REG() macro.
Revision 1.325: download - view: text, markup, annotated - select for diffs
Tue Dec 12 19:29:01 2006 UTC (5 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.324: preferred, colored
Changes since revision 1.324: +92 -0 lines
Add some bootverbose printf's to detail how many MSI messages are allocated and to which IRQs. Requested by: scottl
Revision 1.292.2.10: download - view: text, markup, annotated - select for diffs
Fri Dec 1 16:55:14 2006 UTC (5 years, 2 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.292.2.9: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.9: +1 -0 lines
MFC: Look for capabilities in PCI-PCI bidges using the same CAP PTR register as for type 0 devices.
Revision 1.324: download - view: text, markup, annotated - select for diffs
Tue Nov 21 05:46:09 2006 UTC (5 years, 2 months ago) by jmg
Branches: MAIN
Diff to: previous 1.323: preferred, colored
Changes since revision 1.323: +0 -1 lines
don't mark the cksum as invalid here... off is incorrect when we get here, it's either unset, or it's valid, so we don't need to do anything different... Reported by: Neterion (via rwatson)
Revision 1.323: download - view: text, markup, annotated - select for diffs
Thu Nov 16 17:31:33 2006 UTC (5 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.322: preferred, colored
Changes since revision 1.322: +2 -0 lines
Look for capabilities in PCI-PCI bridges using the same CAP PTR register as for type 0 devices. Submitted by: grehan MFC after: 1 week
Revision 1.322: download - view: text, markup, annotated - select for diffs
Mon Nov 13 21:47:30 2006 UTC (5 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.321: preferred, colored
Changes since revision 1.321: +421 -7 lines
First cut at MI support for PCI Message Signalled Interrupts (MSI):
- Add 3 new functions to the pci_if interface along with suitable wrappers
to provide the device driver visible API:
- pci_alloc_msi(dev, int *count) backed by PCI_ALLOC_MSI(). '*count'
here is an in and out parameter. The driver stores the desired number
of messages in '*count' before calling the function. On success,
'*count' holds the number of messages allocated to the device. Also on
success, the driver can access the messages as SYS_RES_IRQ resources
starting at rid 1. Note that the legacy INTx interrupt resource will
not be available when using MSI. Note that this function will allocate
either MSI or MSI-X messages depending on the devices capabilities and
the 'hw.pci.enable_msix' and 'hw.pci.enable_msi' tunables. Also note
that the driver should activate the memory resource that holds the
MSI-X table and pending bit array (PBA) before calling this function
if the device supports MSI-X.
- pci_release_msi(dev) backed by PCI_RELEASE_MSI(). This function
releases the messages allocated for this device. All of the
SYS_RES_IRQ resources need to be released for this function to succeed.
- pci_msi_count(dev) backed by PCI_MSI_COUNT(). This function returns
the maximum number of MSI or MSI-X messages supported by this device.
MSI-X is preferred if present, but this function will honor the
'hw.pci.enable_msix' and 'hw.pci.enable_msi' tunables. This function
should return the largest value that pci_alloc_msi() can return
(assuming the MD code is able to allocate sufficient backing resources
for all of the messages).
- Add default implementations for these 3 methods to the pci_driver generic
PCI bus driver. (The various other PCI bus drivers such as for ACPI and
OFW will inherit these default implementations.) This default
implementation depends on 4 new pcib_if methods that bubble up through
the PCI bridges to the MD code to allocate IRQ values and perform any
needed MD setup code needed:
- PCIB_ALLOC_MSI() attempts to allocate a group of MSI messages.
- PCIB_RELEASE_MSI() releases a group of MSI messages.
- PCIB_ALLOC_MSIX() attempts to allocate a single MSI-X message.
- PCIB_RELEASE_MSIX() releases a single MSI-X message.
- Add default implementations for these 4 methods that just pass the
request up to the parent bus's parent bridge driver and use the
default implementation in the various MI PCI bridge drivers.
- Add MI functions for use by MD code when managing MSI and MSI-X
interrupts:
- pci_enable_msi(dev, address, data) programs the MSI capability address
and data registers for a group of MSI messages
- pci_enable_msix(dev, index, address, data) initializes a single MSI-X
message in the MSI-X table
- pci_mask_msix(dev, index) masks a single MSI-X message
- pci_unmask_msix(dev, index) unmasks a single MSI-X message
- pci_pending_msix(dev, index) returns true if the specified MSI-X
message is currently pending
- Save the MSI capability address and data registers in the pci_cfgreg
block in a PCI devices ivars and restore the values when a device is
resumed. Note that the MSI-X table is not currently restored during
resume.
- Add constants for MSI-X register offsets and fields.
- Record interesting data about any MSI-X capability blocks we come
across in the pci_cfgreg block in the ivars for PCI devices.
Tested on: em (i386, MSI), bce (amd64/i386, MSI), mpt (amd64, MSI-X)
Reviewed by: scottl, grehan, jfv
MFC after: 2 months
Revision 1.321: download - view: text, markup, annotated - select for diffs
Thu Nov 9 21:05:32 2006 UTC (5 years, 3 months ago) by jmg
Branches: MAIN
Diff to: previous 1.320: preferred, colored
Changes since revision 1.320: +4 -3 lines
fix hanging on invalid data... (This doesn't fix hanging due to broken hardware)... Tested by: Ian Dowse, Adam K Kirchhoff and Vladimir Kushnir
Revision 1.320: download - view: text, markup, annotated - select for diffs
Tue Nov 7 18:55:51 2006 UTC (5 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.319: preferred, colored
Changes since revision 1.319: +23 -22 lines
Various whitespace cleanups.
Revision 1.319: download - view: text, markup, annotated - select for diffs
Sat Nov 4 06:56:51 2006 UTC (5 years, 3 months ago) by imp
Branches: MAIN
Diff to: previous 1.318: preferred, colored
Changes since revision 1.318: +5 -5 lines
Doh! Actually commit checking against NULL for res. Noticed by: dougb@
Revision 1.318: download - view: text, markup, annotated - select for diffs
Mon Oct 30 22:46:33 2006 UTC (5 years, 3 months ago) by imp
Branches: MAIN
Diff to: previous 1.317: preferred, colored
Changes since revision 1.317: +11 -10 lines
Assign start to the value we were able to allocate and use that to write out the BAR. Otherwise, we were trying to shift a 32-bit quantity on 32-bit platforms. Also, 'start' check sanity to where it is known.
Revision 1.317: download - view: text, markup, annotated - select for diffs
Mon Oct 30 19:18:46 2006 UTC (5 years, 3 months ago) by imp
Branches: MAIN
Diff to: previous 1.316: preferred, colored
Changes since revision 1.316: +29 -12 lines
More fully support 64-bit bars. Prior to this commit, we supported only those bars that had addresses assigned by the BIOS and where the bridges were properly programmed. Now even unprogrammed ones work. This was needed for sun4v. We still only implement up to 2GB memory ranges, even for 64-bit bars. PCI standards at least through 2.2 say that this is the max (or 1GB is, I only know it is < 32bits). o Always define pci_addr_t as uint64_t. A pci address is always 64-bits, but some hosts can't address all of them. o Preserve the upper half of the 64-bit word during resource probing. o Test to make sure that 64-bit values can fit in a u_long (true on some platforms, but not others). Don't use those that can't. o minor pedantry about data sizes. o Better bridge resource reporting in bootverbose case. o Minor formatting changes to cope with different data types on different platforms. Submitted by: jmg, with many changes by me to fully support 64-bit addresses.
Revision 1.316: download - view: text, markup, annotated - select for diffs
Fri Oct 20 21:28:11 2006 UTC (5 years, 3 months ago) by jmg
Branches: MAIN
Diff to: previous 1.315: preferred, colored
Changes since revision 1.315: +51 -7 lines
fix tab indentation for CP and RV... If the length is zero, catch this early, instead of making dflen go negative and letting bad things happen... We also check to see if RV (checksum) is 0, and handle that has a checksum failure... Properly handle checksum failures by not processing read-write VPD data, and removing all the found read-only data... Tested by: oleg (dflen going negative)
Revision 1.315: download - view: text, markup, annotated - select for diffs
Mon Oct 9 16:15:55 2006 UTC (5 years, 4 months ago) by jmg
Branches: MAIN
Diff to: previous 1.314: preferred, colored
Changes since revision 1.314: +339 -3 lines
provide routines to access VPD data at the PCI layer... remove sk's own implementation, and use the new calls to get the data... Reviewed by: -arch
Revision 1.292.2.9: download - view: text, markup, annotated - select for diffs
Mon Sep 25 15:49:51 2006 UTC (5 years, 4 months ago) by marcel
Branches: RELENG_6
CVS tags: RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Diff to: previous 1.292.2.8: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.8: +2 -2 lines
MFC rev 1.311: Allow 16 byte memory mapped I/O ranges. Approved by: re (hrs)
Revision 1.292.2.8: download - view: text, markup, annotated - select for diffs
Sat Sep 23 03:33:17 2006 UTC (5 years, 4 months ago) by jmg
Branches: RELENG_6
Diff to: previous 1.292.2.7: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.7: +1 -1 lines
MFC: v1.314 pci.c spell PCIS_CRYPTO_ENTERTAIN properly... Approved by: re (bmah)
Revision 1.314: download - view: text, markup, annotated - select for diffs
Wed Sep 20 06:47:14 2006 UTC (5 years, 4 months ago) by jmg
Branches: MAIN
Diff to: previous 1.313: preferred, colored
Changes since revision 1.313: +1 -1 lines
spell PCIS_CRYPTO_ENTERTAIN properly... MFC after: 3 days
Revision 1.313: download - view: text, markup, annotated - select for diffs
Wed Jul 12 21:22:43 2006 UTC (5 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.312: preferred, colored
Changes since revision 1.312: +3 -4 lines
Simplify the pager support in DDB. Allowing different db commands to install custom pager functions didn't actually happen in practice (they all just used the simple pager and passed in a local quit pointer). So, just hardcode the simple pager as the only pager and make it set a global db_pager_quit flag that db commands can check when the user hits 'q' (or a suitable variant) at the pager prompt. Also, now that it's easy to do so, enable paging by default for all ddb commands. Any command that wishes to honor the quit flag can do so by checking db_pager_quit. Note that the pager can also be effectively disabled by setting $lines to 0. Other fixes: - 'show idt' on i386 and pc98 now actually checks the quit flag and terminates early. - 'show intr' now actually checks the quit flag and terminates early.
Revision 1.312: download - view: text, markup, annotated - select for diffs
Thu May 11 22:13:21 2006 UTC (5 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.311: preferred, colored
Changes since revision 1.311: +3 -3 lines
Fixup some comments to allow for the fact that PCI domains are not specific to Alpha hoses.
Revision 1.311: download - view: text, markup, annotated - select for diffs
Thu Apr 27 04:53:18 2006 UTC (5 years, 9 months ago) by marcel
Branches: MAIN
Diff to: previous 1.310: preferred, colored
Changes since revision 1.310: +2 -2 lines
The size of I/O ranges can be anything from 16 bytes to 2G bytes. Lower the minimum for memory mapped I/O from 32 bytes to 16 bytes. This fixes bus enumeration on ia64 now that the Diva auxiliary serial port is attached to.
Revision 1.292.2.7: download - view: text, markup, annotated - select for diffs
Tue Jan 31 14:42:43 2006 UTC (6 years ago) by imp
Branches: RELENG_6
CVS tags: RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Diff to: previous 1.292.2.6: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.6: +2 -1 lines
I haven't yet merged back the defines from -current for __PCI_REROUTE_INTERRUPT, so merging it was in error. I thought I'd specifically checked before the commit, but it looks like I was wrong. Thanks to Peter Pentchev (roam@) for his help in finding this...
Revision 1.292.2.6: download - view: text, markup, annotated - select for diffs
Mon Jan 30 18:42:10 2006 UTC (6 years ago) by imp
Branches: RELENG_6
Diff to: previous 1.292.2.5: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.5: +93 -49 lines
MFC: 1.308, 1.307, 1.306: expose pci_add_resources to the outside world. Implement force in pci_add_map. Write values of allocated resources to the BARs. 1.304: Improve diagnostic messages 1.303: Improved resource allocation. 1.302: Use symbolic names 1.301: Minor style(9) nitage 1.296: Allow code to access cached values for CMDREG, CACHLNSZ, MINGNT, MAXLAT and LATTIMER.
Revision 1.310: download - view: text, markup, annotated - select for diffs
Fri Jan 20 22:00:50 2006 UTC (6 years ago) by jhb
Branches: MAIN
Diff to: previous 1.309: preferred, colored
Changes since revision 1.309: +1 -1 lines
Make the 'pci_devclass' pointer variable private (drivers really shouldn't share devclass pointers, a mistake I've encouraged in the past) and move the declaration of the pci_driver kobj class from cardbus.c to pci_private.h so that other drivers can inherit from pci_driver.
Revision 1.309: download - view: text, markup, annotated - select for diffs
Sun Jan 1 21:04:31 2006 UTC (6 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.308: preferred, colored
Changes since revision 1.308: +2 -4 lines
Use __HAVE_ACPI and __PCI_REROUTE_INTERRUPT as appropriate rather than the complicated #ifdefs.
Revision 1.308: download - view: text, markup, annotated - select for diffs
Sun Jan 1 08:26:39 2006 UTC (6 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.307: preferred, colored
Changes since revision 1.307: +1 -5 lines
Remove stray debug from p4 integration.
Revision 1.307: download - view: text, markup, annotated - select for diffs
Fri Dec 30 19:36:29 2005 UTC (6 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.306: preferred, colored
Changes since revision 1.306: +0 -4 lines
Remove debug now that I've looped back the big changes into my p4 tree.
Revision 1.306: download - view: text, markup, annotated - select for diffs
Fri Dec 30 19:28:26 2005 UTC (6 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +61 -29 lines
Expose pci_add_resources to the outside world, add a 'force' flag to force allocation of unallocated BARs (cardbus uses this to preallocate everything). Add a prefetchmask to allow for busses that get prefetch hints to set them. Addjust pci_add_map and pci_ata_maps to take a new force flag which pci_add_resources will pass in. Implement 'force' in pci_add_map. Write new value of allocated resource into the bar, if the allocation succeeded (we should have done this before, but with the new force the bug was very obvious).
Revision 1.305: download - view: text, markup, annotated - select for diffs
Tue Dec 20 19:57:47 2005 UTC (6 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +54 -2 lines
Add a new method PCI_FIND_EXTCAP() to the pci bus interface that is used to search for a specific extended capability. If the specified capability is found for the given device, then the function returns success and optionally returns the offset of that capability. If the capability is not found, the function returns an error.
Revision 1.304: download - view: text, markup, annotated - select for diffs
Wed Nov 9 03:37:52 2005 UTC (6 years, 3 months ago) by imp
Branches: MAIN
Diff to: previous 1.303: preferred, colored
Changes since revision 1.303: +3 -2 lines
Improve diagnostic message.
Revision 1.303: download - view: text, markup, annotated - select for diffs
Sat Oct 29 05:52:17 2005 UTC (6 years, 3 months ago) by imp
Branches: MAIN
Diff to: previous 1.302: preferred, colored
Changes since revision 1.302: +3 -0 lines
MFp4: When doing lazy allocation, it turns out that we need to record the actual resource values we received from the system rather than the range we requested. Since we request a range starting at 0, we would record that number. Later, since this == 0, we'd allocate again. However, we wouldn't write the new resource into the BAR. This resulted in a resource leak as well as a BAR that couldn't access the resource at all since rman_get_start, et al, were wrong. MFC After: 1 week (assuming RELENG_6 is open for business)
Revision 1.302: download - view: text, markup, annotated - select for diffs
Sat Oct 29 05:49:06 2005 UTC (6 years, 3 months ago) by imp
Branches: MAIN
Diff to: previous 1.301: preferred, colored
Changes since revision 1.301: +1 -1 lines
Use symbolic name rather thanhard coding the cap pointer offset for type two devices.
Revision 1.301: download - view: text, markup, annotated - select for diffs
Fri Oct 28 05:56:50 2005 UTC (6 years, 3 months ago) by imp
Branches: MAIN
Diff to: previous 1.300: preferred, colored
Changes since revision 1.300: +2 -4 lines
Minor style(9) nitage.
Revision 1.292.2.4.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 27 16:44:06 2005 UTC (6 years, 3 months ago) by wpaul
Branches: RELENG_6_0
CVS tags: RELENG_6_0_0_RELEASE
Diff to: previous 1.292.2.4: preferred, colored; next MAIN 1.292.2.5: preferred, colored
Changes since revision 1.292.2.4: +1 -0 lines
MFC: add 1 microsecond delay to pci_add_children() bus enumeration loop Approved by: re
Revision 1.292.2.5: download - view: text, markup, annotated - select for diffs
Thu Oct 27 16:41:49 2005 UTC (6 years, 3 months ago) by wpaul
Branches: RELENG_6
Diff to: previous 1.292.2.4: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.4: +1 -0 lines
MFC: add 1 microsecond delay to pci_add_children() bus enumeration loop
to pacify certain PCI bridges ('fixes' problem with USB controllers
not being probed on some Sun AMD8111 machines, notably mine).
Approved by: re
Revision 1.300: download - view: text, markup, annotated - select for diffs
Tue Oct 25 06:53:45 2005 UTC (6 years, 3 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.299: preferred, colored
Changes since revision 1.299: +1 -0 lines
Add a 1 microsecond delay in pci_add_children(), right before the read of the PCIR_HDRTYPE register. It's the value returned from this read access that determines whether or not we decide a device is present at the current slot index. For some reason that I can't adequately explain, this read fails on my machine when probing the USB controller on my machine (which happens a multifunction device at slot index 3 hung off the PCI-PCI bridge on the AMD8111 (bus index 1)). The read will return 0xFF even though it should return 0x80 to indicate the presence of a multifunction device. As near as I can tell, there's some timing issue involved with reading the 'dead' slot indexes 0 through 2 that causes the read of the actual device at slot 3 to fail. I tried a couple of different tricks to correct the problem (the patch to amd64/pci/pci_cfgreg.c fixes it for the amd64 arch), but adding this delay is the only thing that always allows the USB controllers to be correctly probed 100% of the time. Whatever the problem is, it's likely confined to the AMD8111 chipset. However, a simple 1us delay is fairly harmless and should have no side effects for other hardware. I consider this to be voodoo, but it's fairly benign voodoo and it makes my USB keyboard and mouse work again. Note that this is the second time that I've had to resort to a 1us delay to fix a PCI-related problem with this AMD8111/Opteron system (the first being a fix I made a while back to the NDISulator). It's possible the delay really belongs in the cfgreg code itself, or that pci_cfgreg needs some custom hackery for an errata in the 8111. (I checked but couldn't find any documented errata on AMD's site that could account for these problems.)
Revision 1.292.2.4: download - view: text, markup, annotated - select for diffs
Thu Oct 6 20:05:04 2005 UTC (6 years, 4 months ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_0_BP
Branch point for: RELENG_6_0
Diff to: previous 1.292.2.3: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.3: +55 -17 lines
MFC: Consolidate common code for assigning interrupts to PCI devices and add a sledgehammer tunable to override PCI interrupt routing for any PCI device. Approved by: re (scottl)
Revision 1.299: download - view: text, markup, annotated - select for diffs
Thu Sep 29 15:04:41 2005 UTC (6 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.298: preferred, colored
Changes since revision 1.298: +55 -17 lines
- Consolidate duplicated code for assigning interrupts to PCI devices via routing, etc. in a static pci_assign_interrupt() function. - Add a sledgehammer that allows the user to override the interrupt assignment of any PCI device via a tunable (e.g. "hw.pci0.7.INTB=5" would force any functions on the pci device in slot 7 of bus 0 that use B# to use IRQ 5). This should be used with great caution! Generally, if the interrupt routing in use provides specific tunables (such as hard-wiring the IRQ for a given $PIR or ACPI PCI link device), then those should be used instead. One instance where this tunable might be useful is if a box has an MPTable with duplicate entries for the same PCI device with different IRQs. MFC after: 1 week
Revision 1.292.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 27 05:57:47 2005 UTC (6 years, 4 months ago) by imp
Branches: RELENG_6
Diff to: previous 1.292.2.2: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.2: +43 -22 lines
MFC: 1.297 and 1.298 Split the do_powerstaes knob into do_power_resume and do_power_nodriver. Go ahead and enable power state management for suspend/resume, but leave the nodriver powerdown off by default. The MFC that changed do_power_state default to 0 broke some resume on some laptops. Approved by: re@ (scottl)
Revision 1.298: download - view: text, markup, annotated - select for diffs
Wed Sep 21 19:47:00 2005 UTC (6 years, 4 months ago) by imp
Branches: MAIN
Diff to: previous 1.297: preferred, colored
Changes since revision 1.297: +18 -16 lines
Split power state control into two variables. hw.pci.do_powerstate has been removed. It has been replaced by hw.pci.do_power_nodriver and hw.pci.do_power_resume. The former defaults to 0 while the latter defaults to 1. When do_powerstate was set to 0, it broke suspend/resume for a lot of people as an unintended consequence. This change will only affect the areas that were intended to affect. This change will have no effect on servers, but will help laptops quite a bit. MFC After: 3 days.
Revision 1.292.2.2: download - view: text, markup, annotated - select for diffs
Sun Sep 11 19:28:30 2005 UTC (6 years, 4 months ago) by imp
Branches: RELENG_6
Diff to: previous 1.292.2.1: preferred, colored; branchpoint 1.292: preferred, colored
Changes since revision 1.292.2.1: +2 -2 lines
Change the default of pci_do_powerstate to 0, per request from re@. The number of raid controllers that violate the WHQL seems to be growing in number and not isolated to old versions as previously thought. Though the numbers of these seen in the wild is still relatively small, they hang the system when parts of their devices are powered down. The one area that these parts appear often are in the higher end servers. As such, be conservative about powering down devices that have no driver attached by default. Until a better approach is proven in current, this is the prudent choice. Laptop users wishing the benefits of powering down devices with no drivers will now need to set hw.pci.do_powerstate=1 in their /boot/loader.conf file. Some users will have devices that will prevent this setting (hence the need to make it default 0). Approved by: re@ (scottl)
Revision 1.297: download - view: text, markup, annotated - select for diffs
Sun Sep 11 04:09:44 2005 UTC (6 years, 5 months ago) by imp
Branches: MAIN
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +34 -15 lines
Change hw.pci.do_powerstate from a boolean to a range. 0 means the same as today: do no power management. 1 means be conservative about what you power down (any device class that has caused problems gets added here). 2 means be agressive about what gets powered down (any device class that's fundamental to the system is here). 3 means power them all down, reguardless. The default is 1. The effect in the default system is to add mass storage devices to the list that we don't power down. From all the pciconf -l lists that I've seen for the aac and amr issue, the bad device has been a mass storage device class. This is an attempt at a compromise between the very small number of systems that have extreme issues with powerdown, and the very large number of systems that gain real benefits from powerdown (I get about 20% more battery life when I attach a minimal set of drivers on my Sony). Hopefully it will strike the proper balance. MFC After: 3 days (before next beta)
Revision 1.296: download - view: text, markup, annotated - select for diffs
Sun Sep 11 03:22:03 2005 UTC (6 years, 5 months ago) by imp
Branches: MAIN
Diff to: previous 1.295: preferred, colored
Changes since revision 1.295: +23 -6 lines
Allow one to access the cached values for CMDREG, CACHELNSZ, MINGNT, MAXLAT and LATTIMER. Improve error message when a bogus RID type is requested for a bar.
Revision 1.264.2.12: download - view: text, markup, annotated - select for diffs
Mon Sep 5 18:09:20 2005 UTC (6 years, 5 months ago) by imp
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.264.2.11: preferred, colored; branchpoint 1.264: preferred, colored; next MAIN 1.265: preferred, colored
Changes since revision 1.264.2.11: +6 -1 lines
MFC: 1.293 1.294: Treat 0xfffff.... as unassigned as well as 0.
Revision 1.292.2.1: download - view: text, markup, annotated - select for diffs
Mon Sep 5 18:04:33 2005 UTC (6 years, 5 months ago) by imp
Branches: RELENG_6
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +6 -1 lines
MFC: 1.293 1.294: Treat resources that are 0xfffxxxx as being unassigned like we treat 0. Approved by: re@ (scottl)
Revision 1.295: download - view: text, markup, annotated - select for diffs
Sat Sep 3 23:15:46 2005 UTC (6 years, 5 months ago) by imp
Branches: MAIN
Diff to: previous 1.294: preferred, colored
Changes since revision 1.294: +8 -6 lines
More consistantly return the correct BAR size. Before, we'd only return the correct bar size if we encountered a 64-bit BAR that had its resources already assigned. If the resources weren't yet assigned, we'd bogusly assume it was a 32-bit bar and return 1.
Revision 1.294: download - view: text, markup, annotated - select for diffs
Thu Sep 1 16:41:42 2005 UTC (6 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +1 -1 lines
Typo in comment.
Revision 1.293: download - view: text, markup, annotated - select for diffs
Thu Sep 1 02:42:34 2005 UTC (6 years, 5 months ago) by imp
Branches: MAIN
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +6 -1 lines
Treat resources that are 0xfffff.... as being 'unassigned'. Reviewed by: jhb Tested by: Mark Kirkwood MFC After: 3 days
Revision 1.264.2.11: download - view: text, markup, annotated - select for diffs
Wed Jun 29 15:25:01 2005 UTC (6 years, 7 months ago) by jhb
Branches: RELENG_5
Diff to: previous 1.264.2.10: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.10: +7 -7 lines
MFC revs 1.290 and 1.291: Don't enable I/O or memory mode in a device's command register for BARs with a base of 0.
Revision 1.264.2.10: download - view: text, markup, annotated - select for diffs
Sun Jun 19 20:06:05 2005 UTC (6 years, 7 months ago) by dwhite
Branches: RELENG_5
Diff to: previous 1.264.2.9: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.9: +2 -2 lines
MFC rev 1.292: Mask off the type bits when comparing the base address, and restore the old value if zero.
Revision 1.292: download - view: text, markup, annotated - select for diffs
Fri Jun 3 19:41:06 2005 UTC (6 years, 8 months ago) by imp
Branches: MAIN
CVS tags: RELENG_6_BP
Branch point for: RELENG_6
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +2 -2 lines
Mask off the bar's value after the probe test write before testing against 0 in pci_alloc_map, just like we do in pci_add_map. Also, make sure that we restore the value to the BAR that was there before if the bar is 0. Chances are that it was 0 before the write too and that the restoration is a nop, but better safe than sorry. Notice by: dwhite
Revision 1.291: download - view: text, markup, annotated - select for diffs
Wed Jun 1 14:07:43 2005 UTC (6 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +1 -1 lines
Typo. Submitted by: njl
Revision 1.290: download - view: text, markup, annotated - select for diffs
Tue May 31 21:33:33 2005 UTC (6 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +7 -7 lines
Don't enable I/O or memory mode in a device's command register if the BAR we are processing has a base address of zero. Note that this will only change behavior for devices where all the BARs of a given type have a base address of 0 since we will enable the appropriate access when we encounter the first BAR with a base that is not 0. Specifically, this allows certain Toshiba laptops to no longer require 'hw.pci.enable_io_modes=0' to avoid hangs during boot. PR: kern/20040 PR: i386/63776 (possibly) PR: i386/68900 (possibly) PR: i386/74532 (possibly) MFC after: 1 week
Revision 1.289: download - view: text, markup, annotated - select for diffs
Fri Apr 29 06:22:41 2005 UTC (6 years, 9 months ago) by imp
Branches: MAIN
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +1 -0 lines
Add a detach for pci bridge and pci bus drivers. This allows one to theoretically unload pci bridges or pci drivers. It will also allow detach to work if one needed to detach a subtree. This is inspired by looking at the p4 commits from bms to his 5.4 tree, but I didn't look at the final results.
Revision 1.288: download - view: text, markup, annotated - select for diffs
Thu Apr 14 17:52:55 2005 UTC (6 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +1 -1 lines
Call pci_print_verbose() before pci_add_resources() so that the order of printf's during a verbose boot is more intuitive (the BAR listings and interrupt routing info now comes after the config header dump rather than just before it).
Revision 1.287: download - view: text, markup, annotated - select for diffs
Mon Apr 11 02:08:05 2005 UTC (6 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +8 -6 lines
It isn't a whinable offence to want memory when the bar says ioport. Put that behind bootverbose to make the ata driver less chatty on advanced hardware. Requested by: sos
Revision 1.286: download - view: text, markup, annotated - select for diffs
Sun Apr 10 23:49:04 2005 UTC (6 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +1 -0 lines
Go ahead and try to allocate PCI_BAR(5) for ata devices.
Revision 1.264.2.9: download - view: text, markup, annotated - select for diffs
Fri Apr 1 22:53:42 2005 UTC (6 years, 10 months ago) by jmg
Branches: RELENG_5
CVS tags: RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.264.2.8: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.8: +25 -1 lines
MFC: > add some additional pci classes and sub-classes.. and: > fix a copy/paste typo for scanner/gameport... > Revision Changes Path > 1.284 +25 -1 src/sys/dev/pci/pci.c > 1.41 +36 -2 src/sys/dev/pci/pcireg.h > 1.24 +25 -1 src/usr.sbin/pciconf/pciconf.c > 1.42 +2 -2 src/sys/dev/pci/pcireg.h Approved by: re (kensmith)
Revision 1.264.2.8: download - view: text, markup, annotated - select for diffs
Fri Apr 1 18:45:44 2005 UTC (6 years, 10 months ago) by jmg
Branches: RELENG_5
Diff to: previous 1.264.2.7: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.7: +7 -15 lines
MFC: > relocate the power state transition statements to the > pci_set_powerstate_method function... and: > move the statement about switching power states to just before we do it, so > we don't print a false statement if the destination powerstate is > unsupported... > > Revision Changes Path > 1.283 +5 -15 src/sys/dev/pci/pci.c > 1.285 +7 -5 src/sys/dev/pci/pci.c Approved by: re (kensmith)
Revision 1.285: download - view: text, markup, annotated - select for diffs
Fri Apr 1 16:22:50 2005 UTC (6 years, 10 months ago) by jmg
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +7 -5 lines
move the statement about switching power states to just before we do it, so we don't print a false statement if the destination powerstate is unsupported...
Revision 1.264.2.7: download - view: text, markup, annotated - select for diffs
Fri Apr 1 16:18:04 2005 UTC (6 years, 10 months ago) by jmg
Branches: RELENG_5
Diff to: previous 1.264.2.6: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.6: +55 -38 lines
MFC: > Implement mimimum system software delays, per PCI PM 1.1 spec, as > suggested by Peter Edwards. This seems to fix my fxp problems and > likely will fix his as well. Use DELAY rather than *sleep because we > can be called from any context. > > Revision Changes Path > 1.274 +55 -38 src/sys/dev/pci/pci.c > 1.275 +2 -2 src/sys/dev/pci/pci.c Approved by: re (scottl)
Revision 1.264.2.6: download - view: text, markup, annotated - select for diffs
Fri Apr 1 12:26:21 2005 UTC (6 years, 10 months ago) by delphij
Branches: RELENG_5
Diff to: previous 1.264.2.5: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.5: +3 -1 lines
MFC revision 1.281 (by imp) date: 2005/03/15 22:53:31; author: imp; state: Exp; lines: +3 -1 If bus_generic_susped returns an error, devlist is not freed. Free it. Submitted by: Ted Unangst (using the Coverity Prevent analysis tool) Approved by: re (scottl)
Revision 1.284: download - view: text, markup, annotated - select for diffs
Sat Mar 26 20:31:09 2005 UTC (6 years, 10 months ago) by jmg
Branches: MAIN
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +25 -1 lines
add some additional pci classes and sub-classes.. Reviewed by: imp (almost 6 months ago)
Revision 1.283: download - view: text, markup, annotated - select for diffs
Wed Mar 23 21:24:29 2005 UTC (6 years, 10 months ago) by jmg
Branches: MAIN
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +5 -15 lines
relocate the power state transition statements to the pci_set_powerstate_method function... Reviewed by: imp MFC after: 1 week
Revision 1.282: download - view: text, markup, annotated - select for diffs
Fri Mar 18 05:19:49 2005 UTC (6 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +1 -1 lines
Use STAILQ in preference to SLIST for the resources. Insert new resources last in the list rather than first. This makes the resouces print in the 4.x order rather than the 5.x order (eg fdc0 at 0x3f0-0x3f5,0x3f7 is 4.x, but 0x3f7,0x3f0-0x3f5 is 5.x). This also means that the pci code will once again print the resources in BAR ascending order.
Revision 1.281: download - view: text, markup, annotated - select for diffs
Tue Mar 15 22:53:31 2005 UTC (6 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +3 -1 lines
If bus_generic_susped returns an error, devlist is not freed. Free it. Submitted by: Ted Unangst (using the Coverity Prevent analysis tool)
Revision 1.280: download - view: text, markup, annotated - select for diffs
Mon Feb 28 01:14:15 2005 UTC (6 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +2 -4 lines
Expose pci_cfg_safe/restore for subclasses of pci to use.
Revision 1.264.2.5: download - view: text, markup, annotated - select for diffs
Sat Feb 26 23:02:48 2005 UTC (6 years, 11 months ago) by ticso
Branches: RELENG_5
Diff to: previous 1.264.2.4: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.4: +2 -1 lines
MFC 1.278: Enable interrupt routing as first choice on alpha.
Revision 1.279: download - view: text, markup, annotated - select for diffs
Fri Feb 25 23:15:48 2005 UTC (6 years, 11 months ago) by sam
Branches: MAIN
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +0 -2 lines
kill unused variable Noticed by: Coverity Prevent analysis tool
Revision 1.278: download - view: text, markup, annotated - select for diffs
Mon Feb 7 00:43:14 2005 UTC (7 years ago) by ticso
Branches: MAIN
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +1 -1 lines
Enable interrupt routing as first choice on alpha. The alpha default handler knows how to trigger a fallback.
Revision 1.264.2.4: download - view: text, markup, annotated - select for diffs
Mon Jan 31 06:28:36 2005 UTC (7 years ago) by njl
Branches: RELENG_5
Diff to: previous 1.264.2.3: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.3: +2 -2 lines
Be conservative and don't power down by default until after 5.4R. Discussed with imp@ and scottl@.
Revision 1.264.2.3: download - view: text, markup, annotated - select for diffs
Sat Jan 29 19:52:40 2005 UTC (7 years ago) by njl
Branches: RELENG_5
Diff to: previous 1.264.2.2: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.2: +56 -13 lines
MFC: Enable power state support for ACPI and PCI devices for suspend and resume.
Revision 1.264.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 29 19:47:12 2005 UTC (7 years ago) by njl
Branches: RELENG_5
Diff to: previous 1.264.2.1: preferred, colored; branchpoint 1.264: preferred, colored
Changes since revision 1.264.2.1: +23 -22 lines
MFC 1.268 and 1.272: Don't power down base peripherals and enable power states by default.
Revision 1.277: download - view: text, markup, annotated - select for diffs
Sat Jan 29 19:45:31 2005 UTC (7 years ago) by njl
Branches: MAIN
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +1 -2 lines
Fix typo.
Revision 1.276: download - view: text, markup, annotated - select for diffs
Thu Jan 6 01:43:05 2005 UTC (7 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +1 -1 lines
Start each of the license/copyright comments with /*-, minor shuffle of lines
Revision 1.275: download - view: text, markup, annotated - select for diffs
Fri Dec 31 23:59:24 2004 UTC (7 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +2 -2 lines
Fix last second typos that crept in :-(.
Revision 1.274: download - view: text, markup, annotated - select for diffs
Fri Dec 31 20:43:46 2004 UTC (7 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +55 -38 lines
Implement mimimum system software delays, per PCI PM 1.1 spec, as suggested by Peter Edwards. This seems to fix my fxp problems and likely will fix his as well. Use DELAY rather than *sleep because we can be called from any context.
Revision 1.273: download - view: text, markup, annotated - select for diffs
Wed Dec 8 04:35:19 2004 UTC (7 years, 2 months ago) by imp
Branches: MAIN
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +16 -16 lines
Fix comments to match last commit, and minor reformatting...
Revision 1.272: download - view: text, markup, annotated - select for diffs
Wed Dec 8 04:16:18 2004 UTC (7 years, 2 months ago) by imp
Branches: MAIN
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +2 -1 lines
It turns out that a lot of newer systems have 'base peripherals' on the PCI bus. We presently have no drivers for these devices, so they are powered down. This is undesirable behavior since it breaks the system when the base peripherals go away suddenly in the middle of boot. # if we ever get generic drivers for memory and/or base peripherals, then # we can remove the tests here.
Revision 1.271: download - view: text, markup, annotated - select for diffs
Fri Dec 3 08:44:56 2004 UTC (7 years, 2 months ago) by njl
Branches: MAIN
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +2 -1 lines
ACPI is not on pc98 either. Informed by: nyan
Revision 1.270: download - view: text, markup, annotated - select for diffs
Fri Dec 3 08:13:08 2004 UTC (7 years, 2 months ago) by njl
Branches: MAIN
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +4 -0 lines
Non-x86 platforms cannot use the ACPI includes. This should be fixed but for now, only include the headers for i386, amd64, or ia64. Pointed out by: grehan
Revision 1.269: download - view: text, markup, annotated - select for diffs
Thu Dec 2 08:07:12 2004 UTC (7 years, 2 months ago) by njl
Branches: MAIN
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +54 -15 lines
Turn ACPI and PCI devices off or to a lower power state in suspend and
back on again in resume. Override the default of D3 with the value the
BIOS specifies in _SxD, if present. Skip serial devices (PNP05xx) since
they seem to hang when set to D3 and may require special driver support.
Also, skip non-type 0 PCI devices (i.e., bridges) since our we don't yet
save/restore their config space and that seems to be necessary.
If this gives you trouble with suspend/resume, you can disable the new
ACPI and PCI power behavior separately with these tunables & sysctls:
debug.acpi.do_powerstate
hw.pci.do_powerstate
Approved by: imp (pci)
Tested by: acpi@ (numerous)
Revision 1.264.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 23 21:08:13 2004 UTC (7 years, 2 months ago) by jhb
Branches: RELENG_5
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +2 -2 lines
MFC: Enhancements to the ddb "experience": - Add paging support to the various MD stack trace handlers. - Allow the number of lines per page to be adjusted via the $lines variable in ddb. Setting this variable to 0 effectively disables paging. - Fix the sparc64 userland stack trace to honor the total count argument so it won't loop forever in some cases.
Revision 1.268: download - view: text, markup, annotated - select for diffs
Wed Nov 10 00:41:39 2004 UTC (7 years, 3 months ago) by imp
Branches: MAIN
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +2 -2 lines
Make pci_do_powerstate default to 1 now that we've done the release to get more testing. This should help things a little.
Revision 1.267: download - view: text, markup, annotated - select for diffs
Mon Nov 1 22:15:14 2004 UTC (7 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +1 -1 lines
- Change the ddb paging "support" to use a variable (db_lines_per_page) to control the number of lines per page rather than a constant. The variable can be examined and changed in ddb as '$lines'. Setting the variable to 0 will effectively turn off paging. - Change db_putchar() to force out pending whitespace before outputting newlines and carriage returns so that one can rub out content on the current line via '\r \r' type strings. - Change the simple pager to rub out the --More-- prompt explicitly when the routine exits. - Add some aliases to the simple pager to make it more compatible with more(1): 'e' and 'j' do a single line. 'd' does half a page, and 'f' does a full page. MFC after: 1 month Inspired by: kris
Revision 1.266: download - view: text, markup, annotated - select for diffs
Thu Oct 14 03:05:39 2004 UTC (7 years, 3 months ago) by green
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +1 -1 lines
Fix a spelling error in a panic string.
Revision 1.265: download - view: text, markup, annotated - select for diffs
Thu Sep 23 22:58:43 2004 UTC (7 years, 4 months ago) by cognet
Branches: MAIN
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +2 -1 lines
Re-route interrupts on arm as well.
Revision 1.264: download - view: text, markup, annotated - select for diffs
Fri Jul 2 13:42:36 2004 UTC (7 years, 7 months ago) by imp
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Branch point for: RELENG_5
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +1 -1 lines
Disable native ata support for now, too much breaks
Revision 1.263: download - view: text, markup, annotated - select for diffs
Tue Jun 29 20:25:43 2004 UTC (7 years, 7 months ago) by sos
Branches: MAIN
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +42 -54 lines
Update the special handling code for ATA devices to allow usage of PCI native addressing. That means that if the HW says that using "real" addresses instead of the hardwired legacy compat ones is allowed, we will use them.
Revision 1.262: download - view: text, markup, annotated - select for diffs
Wed Jun 16 09:46:52 2004 UTC (7 years, 7 months ago) by phk
Branches: MAIN
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +1 -1 lines
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
Revision 1.261: download - view: text, markup, annotated - select for diffs
Mon May 24 17:41:05 2004 UTC (7 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +2 -2 lines
Use PCI_BAR() in preference to PCI_MAPS + x * 4. Submitted by: jhb
Revision 1.260: download - view: text, markup, annotated - select for diffs
Mon May 24 15:52:57 2004 UTC (7 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +0 -19 lines
Do not write to those config registers that are unambiguously defined in the various pci specifications as readonly. vendor, subvendor, device and subdevice are required to be loaded in hardware by some means that isn't the system BIOS or other system software (although some devices do have ways of accomplishing this). class and subclass are defined to be read-only in section 6.2.1 (v2.2). Apart from the status register, which we weren't touching, these are the only read-only registers I could find in the 2.2 spec. progif is also defined as being read-only in section 6.2.1. However, the PCI IDE programming document specifically states that some of the bits are read/write. Since we may have to restore registers before we have a driver attached, go ahead and restore this one byte when transitioning between D3 and D0. The PCI spec also says that writes to reserved and unimplemented registers must be completed normally. It makes no statements about writes to read-only registers, so be as conservative as possible, while covering the exception to the rule that is documented in a subpart of the standard. Requested by: socttl
Revision 1.259: download - view: text, markup, annotated - select for diffs
Fri May 21 19:47:55 2004 UTC (7 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +1 -1 lines
Fix cutNpasto in last commit.
Revision 1.258: download - view: text, markup, annotated - select for diffs
Fri May 21 14:41:02 2004 UTC (7 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +13 -0 lines
ifdef writing to registers that the base pci standard says are read-only on D3->D0 power state transition. Add a define to enable them, but include a comment to contact me if there's a problem.
Revision 1.257: download - view: text, markup, annotated - select for diffs
Fri May 21 07:06:54 2004 UTC (7 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +2 -2 lines
Compeletely rewrite the description of hw.pci.do_powerstate to sound better.
Revision 1.256: download - view: text, markup, annotated - select for diffs
Fri May 21 07:03:07 2004 UTC (7 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +1 -1 lines
Improve the English somewhat. Prodded by: ru@
Revision 1.255: download - view: text, markup, annotated - select for diffs
Fri May 21 06:43:46 2004 UTC (7 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +1 -2 lines
Ooops, forgot to commit the updated definition for hw.pci.do_powerstate when I committed code that changed its meaning.
Revision 1.254: download - view: text, markup, annotated - select for diffs
Fri May 21 06:41:15 2004 UTC (7 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +7 -3 lines
MFp4: Split the baby. For idepci devices, now both legacy mode bits need not be set. We can run an idepci in a split mode. However, it only works better than before, not works. It works better in that when one device is legacy and the other isn't and disabled, we now operate correctly. sos submitted a version of this patch.
Revision 1.253: download - view: text, markup, annotated - select for diffs
Fri May 21 06:39:09 2004 UTC (7 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +6 -3 lines
Move pci_do_powerstate up a level. Now it just means 'do not turn devices off into d3 state when there's no driver for the device'. This should help suspend/resume in the default case.
Revision 1.252: download - view: text, markup, annotated - select for diffs
Fri May 21 06:36:36 2004 UTC (7 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +16 -0 lines
MFp4: o save/restore subvendor, subdevice, vendor, device, baseclass, subclass, progif and revid. While these are typically read only fields, they aren't always read-only. progif is writable for ata devices, for example. It does no harm when they are read only, and helps when they aren't.
Revision 1.251: download - view: text, markup, annotated - select for diffs
Fri May 21 06:03:26 2004 UTC (7 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +28 -17 lines
make the pci power state and resource code a lot less chatty. The chattiness was left in for debugging, but now that nearly all of the problems relating to the changes have been fixed, it is only annoying. It is still available via bootverbose. Prodded by: jhb
Revision 1.250: download - view: text, markup, annotated - select for diffs
Wed Apr 28 13:43:11 2004 UTC (7 years, 9 months ago) by tmm
Branches: MAIN
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +0 -8 lines
Remove the EBus stopgap of r1.248; a proper fix is in place now.
Revision 1.249: download - view: text, markup, annotated - select for diffs
Mon Apr 26 02:11:38 2004 UTC (7 years, 9 months ago) by imp
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +1 -1 lines
Fix two typos from PR: 65694 1) In pci.c, we need to check the child device's state, not the parent device's state. 2) In acpi_pci.c, we have to run the power state change after the acpi method when the old_state is > new state, not the other way around. Submitted by: Dmitry Remesov PR: 65694
Revision 1.248: download - view: text, markup, annotated - select for diffs
Fri Apr 23 15:48:48 2004 UTC (7 years, 9 months ago) by marius
Branches: MAIN
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +8 -0 lines
Add a stopgap for the EBus breakage on sparc64 since the PCI code does resource pre-allocation. The problem is that the BARs of the EBus bridges contain the ranges for the resources for the EBus devices beyond the bridge. So when the EBus code tries to allocate the resource for an EBus device it's already allocated by the PCI code. To be removed again as soon as we have a proper solution in the EBus Code. Reviewed by: tmm Approved by: marcel (mentor)
Revision 1.247: download - view: text, markup, annotated - select for diffs
Wed Apr 21 20:19:56 2004 UTC (7 years, 9 months ago) by imp
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +99 -45 lines
ata devices in legacy are special, and we must treat them as such. While I would have prefered to have a solution that didn't move knowledge of this into the pci layer. However, this is literally the only exception that's listed in the PCI standard to the usual way of decoding BARs. atapci devices in legacy mode now ignore the first 4 bars and hard code the values to the legacy ide values (well, for each of the controllers that are in legacy mode). The 5th bar is handled normally. Remove the zero bar handling. zero bars should be ignored at all other times, and since we handle that specially, we don't need the older workaround.
Revision 1.246: download - view: text, markup, annotated - select for diffs
Tue Apr 20 20:57:28 2004 UTC (7 years, 9 months ago) by sos
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +9 -0 lines
Do not pre-allocate resources for BAR's on ATA MASTERDEV's thats on the standard ATA primary and secondary addresses. Reintroduce the size 1 ALTIO space so that we can have both ATA and floppies back working.
Revision 1.245: download - view: text, markup, annotated - select for diffs
Fri Apr 16 15:01:54 2004 UTC (7 years, 9 months ago) by imp
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +4 -4 lines
ooops. I disabled pci_enable_io_modes not pci_do_powerstate in the last commit. That was in error. Noticed by: sos
Revision 1.244: download - view: text, markup, annotated - select for diffs
Fri Apr 16 04:53:19 2004 UTC (7 years, 9 months ago) by imp
Branches: MAIN
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +3 -2 lines
make the bad bar warning less scary, and toss it behind a bootverbose. It is harmless, but freaking people out.
Revision 1.243: download - view: text, markup, annotated - select for diffs
Fri Apr 16 04:50:54 2004 UTC (7 years, 9 months ago) by imp
Branches: MAIN
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +2 -2 lines
Turn off the power stuff for a little while longer. There appears to be something subtle wrong with it.
Revision 1.242: download - view: text, markup, annotated - select for diffs
Wed Apr 14 17:52:08 2004 UTC (7 years, 9 months ago) by imp
Branches: MAIN
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +2 -2 lines
Now that the dust has settled on the resource issues, turn on the power parts of my patches and see what breaks. Don't (yet) throw the chatty messages behind a if (bootverbose).
Revision 1.241: download - view: text, markup, annotated - select for diffs
Tue Apr 13 19:31:57 2004 UTC (7 years, 9 months ago) by imp
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +51 -26 lines
Some devices have what appear to be invalid BARs. They are invalid in the sense that any write to them reads back as a 0. This presents a problem to our resource allocation scheme. If we encounter such vars, the code now treats them as special, allowing any allocation against them to succeed. I've not seen anything in the standard to clearify what host software should do when it encounters these sorts of BARs. Also cleaned up some output while I'm here and add commmented out bootverbose lines until I'm ready to reduce the verbosity of boot messages. This gets a number of south bridges and ata controllers made mostly by VIA, AMD and nVidia working again. Thanks to Soren Schmidt for his help in coming up with this patch.
Revision 1.240: download - view: text, markup, annotated - select for diffs
Sun Apr 11 07:02:49 2004 UTC (7 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +48 -15 lines
Add system tunable to turn off power state changes. Default to off until we get the resource allocation stuff hammered out. Fix and off by one error that caused unnecessary filtering of valid BARs for only 4 bytes than ICH3 and other PCI IDE controllers have. Andrew Gallatin submitted this, although it doesn't solve the problems ICH3 controllers have with the new code, it does restore the former resource list on the probe line.
Revision 1.239: download - view: text, markup, annotated - select for diffs
Fri Apr 9 20:41:18 2004 UTC (7 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +10 -6 lines
Only print state change message for real state changes. When we set a device in D0 to D0, that's a no-op, however the messages seem to be confusing some people. Eventually, these messages will be parked behind a if (bootverbose). # I don't think this will fix any real bugs...
Revision 1.238: download - view: text, markup, annotated - select for diffs
Fri Apr 9 15:44:33 2004 UTC (7 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +294 -58 lines
Omnibus PCI commit: o Save and restore bars for suspend/resume as well as for D3->D0 transitions. o preallocate resources that the PCI devices use to avoid resource conflicts o lazy allocation of resources not allocated by the BIOS. o set unattached drivers to state D3. Set power state to D0 before probe/attach. Right now there's two special cases for this (display and memory devices) that need work in other areas of the tree. Please report any bugs to me.
Revision 1.237: download - view: text, markup, annotated - select for diffs
Wed Dec 24 02:01:22 2003 UTC (8 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +5 -5 lines
Minor whitespace changes to conform better to stlye(9) and reduce diffs with uncommitted changes I have in p4.
Revision 1.236: download - view: text, markup, annotated - select for diffs
Mon Nov 17 08:58:16 2003 UTC (8 years, 2 months ago) by peter
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +1 -1 lines
Initial landing of SMP support for FreeBSD/amd64. - This is heavily derived from John Baldwin's apic/pci cleanup on i386. - I have completely rewritten or drastically cleaned up some other parts. (in particular, bootstrap) - This is still a WIP. It seems that there are some highly bogus bioses on nVidia nForce3-150 boards. I can't stress how broken these boards are. I have a workaround in mind, but right now the Asus SK8N is broken. The Gigabyte K8NPro (nVidia based) is also mind-numbingly hosed. - Most of my testing has been with SCHED_ULE. SCHED_4BSD works. - the apic and acpi components are 'standard'. - If you have an nVidia nForce3-150 board, you are stuck with 'device atpic' in addition, because they somehow managed to forget to connect the 8254 timer to the apic, even though its in the same silicon! ARGH! This directly violates the ACPI spec.
Revision 1.235: download - view: text, markup, annotated - select for diffs
Mon Nov 3 22:06:35 2003 UTC (8 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +1 -1 lines
Enable PCI interrupt routing for i386 SMP kernels.
Revision 1.234: download - view: text, markup, annotated - select for diffs
Sat Nov 1 12:45:03 2003 UTC (8 years, 3 months ago) by dfr
Branches: MAIN
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +1 -5 lines
Make the cardbus driver a derived class of the pci driver. In theory, this should allow many of the pci methods to be re-staticised.
Revision 1.233: download - view: text, markup, annotated - select for diffs
Wed Sep 17 08:32:44 2003 UTC (8 years, 4 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +33 -1 lines
Add pci_resume() to reestablish interrupt routing after suspend/resume. Especially after hibernation, interrupt routing went back to initial status on some machines.
Revision 1.232: download - view: text, markup, annotated - select for diffs
Sun Sep 14 19:30:00 2003 UTC (8 years, 4 months ago) by scottl
Branches: MAIN
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +37 -17 lines
Teach the PCI code to parse MSI extended capabilities. Re-arrange the pcicfg struct a bit to hold extcap structures instead of structure members.
Revision 1.231: download - view: text, markup, annotated - select for diffs
Sun Sep 14 06:23:19 2003 UTC (8 years, 4 months ago) by scottl
Branches: MAIN
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +3 -3 lines
Remove most of the magic constants from the extcap parsing code.
Revision 1.230: download - view: text, markup, annotated - select for diffs
Wed Sep 3 15:24:31 2003 UTC (8 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +1 -1 lines
Replace another instance of PCIR_MAPS with PCIR_BAR(x). Reminded by: dfr
Revision 1.229: download - view: text, markup, annotated - select for diffs
Tue Sep 2 17:30:37 2003 UTC (8 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +1 -1 lines
Use PCIR_BAR(x) instead of PCIR_MAPS. Glanced over by: imp, gibbs Tested by: i386 LINT
Revision 1.228: download - view: text, markup, annotated - select for diffs
Mon Sep 1 15:01:49 2003 UTC (8 years, 5 months ago) by dfr
Branches: MAIN
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +9 -6 lines
Don't try to enable io or memory access for non-standard resource addresses. This stops resource allocations for e.g. amdpm failing - this has its own special ways of enabling access.
Revision 1.227: download - view: text, markup, annotated - select for diffs
Thu Aug 28 21:22:25 2003 UTC (8 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +3 -3 lines
- Rename PCIx_HEADERTYPE* to PCIx_HDRTYPE* so the constants aren't so long. - Add a new PCIM_HDRTYPE constant for the field in PCIR_HDRTYPE that holds the header type. - Replace several magic numbers with appropriate constants for the header type register and a couple of PCI_FUNCMAX. - Merge to amd64 the fix to the i386 bridge code to skip devices with unknown header types. Requested by: imp (1, 2)
Revision 1.226: download - view: text, markup, annotated - select for diffs
Fri Aug 22 03:11:53 2003 UTC (8 years, 5 months ago) by imp
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +30 -30 lines
Prefer the uintXX_t to the u_intXX_t names.
Revision 1.225: download - view: text, markup, annotated - select for diffs
Fri Aug 1 21:45:56 2003 UTC (8 years, 6 months ago) by imp
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +1 -1 lines
Define PCI_MAXHDRTYPE to be 2. We know about header types 0, 1 and 2. Update the MI device scanning code to use PCI_MAXHDRTYPE rather than the hard coded 2.
Revision 1.224: download - view: text, markup, annotated - select for diffs
Thu Jul 31 17:29:42 2003 UTC (8 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +4 -29 lines
Update the 'ps', 'show pci', and 'show ktr' ddb commands to use the new pager callout instead of homerolling their own paging facility.
Revision 1.223: download - view: text, markup, annotated - select for diffs
Tue Jul 1 14:08:32 2003 UTC (8 years, 7 months ago) by tmm
Branches: MAIN
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +17 -6 lines
Add a new PCI interface method, assign_interrupt, to determine the interrupt to be used for a device. This is intended solely for internal use of PCI bus implementations, and exists so that PCI bus drivers implementing special interrupt assignment methods which require additional work at the bus level to work right can be easily derived from the generic driver (or any other one) without resorting to hacks. It will be used in the sparc64 ofw_pcibus driver, which will be committed shortly. Make use of this method in the generic implementation, and add it to the method table of bus drivers derived from the PCI one. Reviewed by: imp, -hackers
Revision 1.222: download - view: text, markup, annotated - select for diffs
Tue Jul 1 13:54:10 2003 UTC (8 years, 7 months ago) by tmm
Branches: MAIN
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +3 -1 lines
Allow to write the intpin ivar using the pci_set_intpin() accessor. There are some Sun PCI devices around which bogusly set intpin to 0, although they use the intline mechanism; this allows the device driver to correct that. Reviewed by: imp
Revision 1.221: download - view: text, markup, annotated - select for diffs
Sun Jun 22 06:09:14 2003 UTC (8 years, 7 months ago) by nyan
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +1 -1 lines
Re-enabled PCI irq routing on pc98.
Revision 1.220: download - view: text, markup, annotated - select for diffs
Sun Jun 22 02:26:17 2003 UTC (8 years, 7 months ago) by jmg
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +10 -3 lines
use a REG macro that was already defined. Reorder how the pci probing in handled. before adding devices, check to see if the slot is a multi-function device to see if we should probe all the functions. Original idea by: imp
Revision 1.219: download - view: text, markup, annotated - select for diffs
Mon Jun 9 18:08:46 2003 UTC (8 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +3 -2 lines
When we re-route a PCI interrupt, write the new IRQ value into the intline register. Reviewed by: imp
Revision 1.218: download - view: text, markup, annotated - select for diffs
Sun Jun 8 11:18:35 2003 UTC (8 years, 8 months ago) by nyan
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +1 -1 lines
Don't route PCI irq on pc98.
Revision 1.217: download - view: text, markup, annotated - select for diffs
Sat Jun 7 15:00:19 2003 UTC (8 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +11 -7 lines
- Adjust the comment about re-routing PCI interrupts to be less ia64-specific. - When trying to re-route interrupts, don't change cfg->intline if the re-route fails by returning an invalid vector. This fixes machines without any way of routing interrupts such as older PC's without a $PIR table. We do not currently write the new intline value back to the hardware, but we should. That will likely be added in a later commit.
Revision 1.216: download - view: text, markup, annotated - select for diffs
Wed Jun 4 21:10:15 2003 UTC (8 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +1 -1 lines
Batton down the hatches!!! Always route PCI interrupts on i386 UP machines. I was planning to enable this for i386 anyways once SMP support is done. Having this enabled fixes problems on many people's laptops. Requested by: imp
Revision 1.215: download - view: text, markup, annotated - select for diffs
Sat May 31 20:34:36 2003 UTC (8 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +0 -9 lines
Remove unused variable(s). Remove break after return; Found by: FlexeLint
Revision 1.214: download - view: text, markup, annotated - select for diffs
Wed Apr 16 03:15:08 2003 UTC (8 years, 9 months ago) by mdodd
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +49 -9 lines
Return status for PCI methods '{enable,disable}_{io,busmaster}'.
Reviewed by: imp
Revision 1.213: download - view: text, markup, annotated - select for diffs
Tue Apr 15 19:38:18 2003 UTC (8 years, 9 months ago) by imp
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +26 -14 lines
When the driver allocates memory or I/O ports, enable that bit in the command config register. At the present, this represents a nop because these bits should have been set earlier in the process. In the future, we'll only set these bits when the driver requests the resource, not when the bus code detects the resource. Reviewed by: mdodd
Revision 1.212: download - view: text, markup, annotated - select for diffs
Wed Feb 19 05:47:09 2003 UTC (8 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +1 -1 lines
Back out M_* changes, per decision of the TRB. Approved by: trb
Revision 1.211: download - view: text, markup, annotated - select for diffs
Tue Feb 18 03:25:57 2003 UTC (8 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +3 -2 lines
Include class designation in pnpinfo for generic driver loading
Revision 1.210: download - view: text, markup, annotated - select for diffs
Mon Feb 17 21:20:34 2003 UTC (8 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +31 -0 lines
Move the pnp and location info into the common pci bus. Make all known pci busses implement this. Also minor comment smithing in cardbus. Fix copyright to this year with my name on it since I've been doing a lot to this file. Reviewed by: jhb
Revision 1.209: download - view: text, markup, annotated - select for diffs
Mon Feb 17 19:47:02 2003 UTC (8 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +5 -2 lines
These don't need to be semi-public after all.
Revision 1.208: download - view: text, markup, annotated - select for diffs
Sun Feb 16 02:02:44 2003 UTC (8 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +3 -7 lines
Use rman_get_device rather than rle->resl->r_dev. make pci_hdrtypedata and pci_read_extcap accessible (but maybe in the end we'll make them private again).
Revision 1.207: download - view: text, markup, annotated - select for diffs
Tue Jan 21 08:55:37 2003 UTC (9 years ago) by alfred
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +1 -1 lines
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Revision 1.206: download - view: text, markup, annotated - select for diffs
Wed Nov 27 06:41:28 2002 UTC (9 years, 2 months ago) by imp
Branches: MAIN
CVS tags: RELENG_5_0_BP, RELENG_5_0_0_RELEASE, RELENG_5_0
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +8 -0 lines
Add a new cardbus specific ivar: PCI_IVAR_ETHADDR. Some pci-like buses support querying the MAC address in a standard-for-that-bus way. The base pci bus returns NULL for this IVAR always. Submitted by: sam Approved by: re (blanket for NEWCARD)
Revision 1.205: download - view: text, markup, annotated - select for diffs
Wed Nov 13 09:40:09 2002 UTC (9 years, 2 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +1 -1 lines
Staticize local variable. Submitted by: Hiten Pandya <hiten@angelica.unixdaemons.com> Obtained from: re (murray)
Revision 1.204: download - view: text, markup, annotated - select for diffs
Wed Oct 16 19:11:59 2002 UTC (9 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +2 -2 lines
Whitespace.
Revision 1.203: download - view: text, markup, annotated - select for diffs
Tue Oct 1 13:28:24 2002 UTC (9 years, 4 months ago) by bde
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +0 -2 lines
Removed the only PCI_DEBUG ifdef in the kernel. PCI_DEBUG was not a supported option and it disabled a whole 2 lines of bootverbose messages. I wanted to see 1 of the messages (about the latency timers). This is a wrong place to decode pci configurations, but the code is already here and handles more details than pciconf(8).
Revision 1.202: download - view: text, markup, annotated - select for diffs
Tue Oct 1 10:18:22 2002 UTC (9 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +0 -3 lines
The bus number is unsigned, it cannot be less than zero. Found by: FlexeLint
Revision 1.201: download - view: text, markup, annotated - select for diffs
Sat Sep 28 17:47:51 2002 UTC (9 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +3 -2 lines
Don't use GCC shorthand for ?: unless it really matters.
Revision 1.200: download - view: text, markup, annotated - select for diffs
Wed Sep 4 03:53:21 2002 UTC (9 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +2 -2 lines
Fix up a comment.
Revision 1.199: download - view: text, markup, annotated - select for diffs
Wed Sep 4 03:13:16 2002 UTC (9 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +15 -15 lines
- Make pci_load_vendor_data() static and do it during MOD_LOAD instead of when the first PCI bus attaches. - Create /dev/pci during MOD_LOAD as well. - Destroy /dev/pci during MOD_UNLOAD (not that you can kldunload pci, but might as well get the code right)
Revision 1.198: download - view: text, markup, annotated - select for diffs
Wed Aug 28 10:02:59 2002 UTC (9 years, 5 months ago) by guido
Branches: MAIN
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +77 -0 lines
Add a new command: show pciregs, equivalent to pciconf -l Reviewed by: Doug Rabson (quite some time ago) MFC after: 1 week
Revision 1.197: download - view: text, markup, annotated - select for diffs
Mon Aug 26 18:30:27 2002 UTC (9 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +0 -1 lines
Overhaul the ACPI PCI bridge driver a bit:
- Add an ACPI PCI-PCI bridge driver (the previous driver just handled
Host-PCI bridges) that is a PCI driver that is a subclass of the generic
PCI-PCI bridge driver. It overrides probe, attach, read_ivar, and
pci_route_interrupt.
- The probe routine only succeeds if our parent is an ACPI PCI bus which
we test for by seeing if we can read our ACPI_HANDLE as an ivar.
- The attach routine saves a copy of our handle and calls the new
acpi_pcib_attach_common() function described below.
- The read_ivar routine handles normal PCI-PCI bridge ivars and adds an
ivar to return the ACPI_HANDLE of the bus this bridge represents.
- The route_interrupt routine fetches the _PRT (PCI Interrupt Routing
Table) from the bridge device's softc and passes it off to
acpi_pcib_route_interrupt() to route the interrupt.
- Split the old ACPI Host-PCI bridge driver into two pieces. Part of
the attach routine and most of the route_interrupt routine remain in
acpi_pcib.c and are shared by both ACPI PCI bridge drivers.
- The attach routine verifies the PCI bridge is present, reads in
the _PRT for the bridge, and attaches the child PCI bus.
- The route_interrupt routine uses the passed in _PRT to route a PCI
interrupt.
The rest of the driver is the ACPI Host-PCI bridge specific bits that
live in acpi_pcib_acpi.c.
- We no longer duplicate pcib_maxslots but use it directly.
- The driver now uses the pcib devclass instead of its own devclass.
This means that PCI busses are now only children of pcib devices.
- Allow the ACPI_HANDLE for the child PCI bus to be read as an ivar
of the child bus.
- Fetch the _PRT for routing PCI interrupts directly from our softc
instead of walking the devclass to find ourself and then fetch our
own softc.
With this change and the new ACPI PCI bus driver, ACPI can now properly
route interrupts for devices behind PCI-PCI bridges. That is, the
Itanium2 with like 10 PCI busses can now boot ok and route all the PCI
interrupts. Hopefully this will also fix problems people are having with
CardBus bridges behind PCI-PCI bridges not properly routing interrupts
when ACPI is used.
Tested on: i386, ia64
Revision 1.196: download - view: text, markup, annotated - select for diffs
Mon Aug 26 15:23:52 2002 UTC (9 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +56 -30 lines
Various changes to make it easier to subclass the PCI bus device. - Make the pci devclass a global variable. - Add child devices in pci_attach() instead of pci_probe(). Change pci_probe() to just check for a valid bus number from the associated bridge and return -1000 if successful. This allows subclasses of the PCI bus driver to override the generic driver. - Move the code to load the vendor data into its own public function. Really though, doing this at attach is just plain wrong. This should really be done in the module load routine instead. As a side effect, the 'busno' variable in pci_attach() is now no longer static (minor bug that was harmless so far.) - Change pci_add_children() to take an extra argument that is the size of the device info structure passed to pci_read_device() and make it public so subclasses of the PCI bus can call it in their attach routines. - Move the bits to attach a probed PCI child to a PCI bus into a global pci_add_child() function. This will allow subclasses that can detect a PCI device not found in the normal PCI probe to add those devices in their own attach routine. (I have seen this in the ACPI tree on my laptop for example.) As a side effect, change the static function pci_add_resources() to get the busno, slot, and func from the passed in dinfo structure instead of requiring them as function arguments. Tested on: i386, alpha, ia64, sparc64
Revision 1.195: download - view: text, markup, annotated - select for diffs
Fri Aug 2 22:26:03 2002 UTC (9 years, 6 months ago) by imp
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +0 -7 lines
While PCI interrupts are shareable, this should not have been committed just yet.
Revision 1.194: download - view: text, markup, annotated - select for diffs
Fri Jul 26 07:58:16 2002 UTC (9 years, 6 months ago) by imp
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +36 -21 lines
Make PCI_ENABLE_IO_MODES a sysctl hw.pci.enable_io_modes. It can also be set at boot time. It defaults to 1 now since it can be set in the boot loader. If this proves unwise, we can reset it to defaulting to 0.
Revision 1.193: download - view: text, markup, annotated - select for diffs
Sat Jun 1 05:48:58 2002 UTC (9 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +5 -5 lines
Use PCI_INTERRUPT_VALI in stead of hard coded 255
Revision 1.192: download - view: text, markup, annotated - select for diffs
Sat Jun 1 05:44:45 2002 UTC (9 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +23 -20 lines
More style(9) nits
Revision 1.191: download - view: text, markup, annotated - select for diffs
Sat Jun 1 03:41:02 2002 UTC (9 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +87 -88 lines
Make this file mostly conform to style(9). Approved by: msmith in principle before walkabout
Revision 1.190: download - view: text, markup, annotated - select for diffs
Wed Apr 17 00:31:32 2002 UTC (9 years, 9 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +1 -0 lines
Add MODULE_VERSION.
Revision 1.189: download - view: text, markup, annotated - select for diffs
Wed Apr 10 07:35:28 2002 UTC (9 years, 10 months ago) by n_hibma
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +5 -1 lines
intline == 0 is not a valid intline on 386. See pci_cfgintr() in sys/i386/pci/pci_cfgreg.c. This should resolve some cases where adding USB support to the kernel produced an interrupt storm.
Revision 1.188: download - view: text, markup, annotated - select for diffs
Wed Mar 13 16:32:11 2002 UTC (9 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +4 -5 lines
Add 5th parameter to pci_read_device specifying the size of the object to create.
Revision 1.187: download - view: text, markup, annotated - select for diffs
Wed Feb 27 05:09:14 2002 UTC (9 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +49 -54 lines
Use the pci.c code wherever possible, rather than copying all the pci code into cardbus and s/pci/cardbus. This exposes a few pci_* functions that are now static. This work is similar to work Justin posted to the mobile list about a year or two ago, which I have neglected since then. This is a subset of his current work with the multiple inheritance newbus architecutre. When completed, that will eliminate the need for pci/pci_private.h. Similar work is needed for the cardbus_cis and pccard_cis code as well.
Revision 1.186: download - view: text, markup, annotated - select for diffs
Thu Jan 10 00:56:02 2002 UTC (10 years, 1 month ago) by mdodd
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +35 -0 lines
Implement 2 small helper functions: pci_find_bsf() - Find a device_t by bus/slot/function. pci_find_device() - Find a device_t by vendor/device ID.
Revision 1.185: download - view: text, markup, annotated - select for diffs
Fri Dec 21 21:49:57 2001 UTC (10 years, 1 month ago) by tmm
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +3 -34 lines
Use the new resource_list_print_type() function to print resource list contents, and the new __BUS_ACCESSOR macro to construct the accessor functions.
Revision 1.184: download - view: text, markup, annotated - select for diffs
Fri Dec 21 01:28:46 2001 UTC (10 years, 1 month ago) by pirzyk
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +2 -1 lines
Add support for the Intel 82443MX chipset PR: kern/33032 MFC after: 1 month
Revision 1.183: download - view: text, markup, annotated - select for diffs
Wed Dec 19 08:49:11 2001 UTC (10 years, 1 month ago) by mdodd
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +2 -0 lines
Don't put variable declarations in header files, put prototypes. 'pci_devq' provides useful information now.
Revision 1.182: download - view: text, markup, annotated - select for diffs
Thu Oct 25 04:44:50 2001 UTC (10 years, 3 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +2 -1 lines
Add PCI_ENABLE_IO_MODES option, for BIOSen that neglect this. Submitted by: Andrew R. Reiter arr@watson.org
Revision 1.181: download - view: text, markup, annotated - select for diffs
Fri Oct 5 10:33:42 2001 UTC (10 years, 4 months ago) by dfr
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +13 -2 lines
Re-route interrupts on ia64 so that we can get the I/O SAPIC interrupt numbers (the BIOS leaves legacy PIC interrupt numbers in the intline registers).
Revision 1.180: download - view: text, markup, annotated - select for diffs
Sat Sep 1 23:06:14 2001 UTC (10 years, 5 months ago) by n_hibma
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2, KSE_MILESTONE_2
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +2 -2 lines
Small nit: Make both prints use 'at device %d.%d'.
Revision 1.179: download - view: text, markup, annotated - select for diffs
Mon Aug 27 20:42:07 2001 UTC (10 years, 5 months ago) by imp
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +2 -2 lines
Ugggg. I thought I'd already committed this to -current: If the intline is 0 or 255, then it needs an interrupt routed. Some Sony laptops improperly flag devices that need an interrupt with 0 :-(.
Revision 1.178: download - view: text, markup, annotated - select for diffs
Thu May 31 21:47:24 2001 UTC (10 years, 8 months ago) by gallatin
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +2 -6 lines
Backout previous revision. While it fixed many platforms, it broke all alphas with devices behind ppb's. I'm working on a better solution now. Note that all alphas that use per-platform interrupt mapping are broken again (as they have been for several months)
Revision 1.177: download - view: text, markup, annotated - select for diffs
Sun May 27 22:22:02 2001 UTC (10 years, 8 months ago) by gallatin
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +6 -2 lines
finally fix intr routing on alphas such as the as500 after months of breakage: - call PCIB_ROUTE_INTERRUPT() regardless of how valid the intline looks. Some alphas leave garbage in the intline and leave the intr mapping to OS platform support routines that map slots/buses to intlines - Down in the alpha pci code, first try platform.pci_intr_route() and if it doesn't exist or returns garbage, just read the intline out of config space. tested on AS500 (garbage in intline) and UP1000 (PC-like, intline is valid) Note that a nice little hack like the APIC_IO section of pci_cfgregread() is not workable. This is because the calling interface for alpha_pci_route_interrupt() requires us to figure out the bus/slot/etc from a device_t. At pci_read_device() time, we don't have a device_t for the bus/slot/func in question.
Revision 1.176: download - view: text, markup, annotated - select for diffs
Thu Mar 15 06:51:45 2001 UTC (10 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +4 -4 lines
The serverworks OSB4 pci->isa bridge has the same mapping register at offset 0x90 for the SMBus device as the PIIX4.
Revision 1.175: download - view: text, markup, annotated - select for diffs
Tue Feb 27 23:13:20 2001 UTC (10 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +47 -30 lines
Slightly reimplement some recently added helper functions as methods, so that drivers are not reaching into the internals of the pci bus. There are no driver changes, the public interface is the same.
Revision 1.174: download - view: text, markup, annotated - select for diffs
Tue Feb 6 09:25:01 2001 UTC (11 years ago) by asmodai
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +2 -2 lines
Fix typo: wierd -> weird. There is no such thing as wierd in the english language.
Revision 1.173: download - view: text, markup, annotated - select for diffs
Mon Jan 1 16:49:31 2001 UTC (11 years, 1 month ago) by mjacob
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +7 -1 lines
Sanity check ptr for legal values so it is less likely (but not impossible) to get stuck in an infinite loop. Obtained from: msmith@freebsd.org
Revision 1.172: download - view: text, markup, annotated - select for diffs
Wed Dec 13 04:22:04 2000 UTC (11 years, 1 month ago) by msmith
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +1 -2 lines
Remove a redundant prototype.
Revision 1.171: download - view: text, markup, annotated - select for diffs
Wed Dec 13 02:45:03 2000 UTC (11 years, 1 month ago) by msmith
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +1 -3 lines
Don't try to free the now-nonexistent hdrspec field. This one snuck by me in the previous round of patches. Oops.
Revision 1.170: download - view: text, markup, annotated - select for diffs
Wed Dec 13 01:25:10 2000 UTC (11 years, 1 month ago) by msmith
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +265 -540 lines
Next round of PCI subsystem updates: - Break out the /dev/pci driver into a separate file. - Kill the COMPAT_OLDPCI support. - Make the EISA bridge attach a bit more like the old code; explicitly check for the existence of eisa0/isa0 and only attach if they don't already exist. Only make one bus_generic_attach() pass over the bridge, once both busses are attached. Note that the stupid Intel bridge's class is entirely unpredictable. - Add prototypes and re-layout the core PCI modules in line with current coding standards (not a major whitespace change, just moving the module data to the top of the file). - Remove redundant type-2 bridge support from the core PCI code; the PCI-CardBus code does this itself internally. Remove the now entirely redundant header-class-specific support, as well as the secondary and subordinate bus number fields. These are bridge attributes now. - Add support for PCI Extended Capabilities. - Add support for PCI Power Management. The interface currently allows a driver to query and set the power state of a device. - Add helper functions to allow drivers to enable/disable busmastering and the decoding of I/O and memory ranges. - Use PCI_SLOTMAX and PCI_FUNCMAX rather than magic numbers in some places. - Make the PCI-PCI bridge code a little more paranoid about valid I/O and memory decodes. - Add some more PCI register definitions for the command and status registers. Correct another bogus definition for type-1 bridges.
Revision 1.169: download - view: text, markup, annotated - select for diffs
Sat Dec 9 09:37:07 2000 UTC (11 years, 2 months ago) by msmith
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +2 -2 lines
Cosmetic nit; separate slot/function with '.' not ':'
Revision 1.168: download - view: text, markup, annotated - select for diffs
Sat Dec 9 09:15:38 2000 UTC (11 years, 2 months ago) by msmith
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +30 -10 lines
- Fix the device database parsing code so that it actually works. - Improve the formatting for devices identified by the database. - Fix the pcib_route_interrupt method definition, as an old version snuck in here somehow 8( - Remove a couple of the vendor/device IDs for PCI:ISA bridges which correctly identify themselves. Submitted by: peter
Revision 1.167: download - view: text, markup, annotated - select for diffs
Fri Dec 8 22:10:52 2000 UTC (11 years, 2 months ago) by msmith
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +224 -134 lines
Next phase in the PCI subsystem cleanup. - Move PCI core code to dev/pci. - Split bridge code out into separate modules. - Remove the descriptive strings from the bridge drivers. If you want to know what a device is, use pciconf. Add support for broadly identifying devices based on class/subclass, and for parsing a preloaded device identification database so that if you want to waste the memory, you can identify *anything* we know about. - Remove machine-dependant code from the core PCI code. APIC interrupt mapping is performed by shadowing the intline register in machine- dependant code. - Bring interrupt routing support to the Alpha (although many platforms don't yet support routing or mapping interrupts entirely correctly). This resulted in spamming <sys/bus.h> into more places than it really should have gone. - Put sys/dev on the kernel/modules include path. This avoids having to change *all* the pci*.h includes.
Revision 1.166: download - view: text, markup, annotated - select for diffs
Tue Nov 28 07:12:10 2000 UTC (11 years, 2 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +19 -46 lines
Reduce code duplication by using the GET_RESOURCE_LIST bus method and related generic resource_list management functions. I'll deal with the EISA bits later. Not objected to by: new-bus
Revision 1.165: download - view: text, markup, annotated - select for diffs
Sun Oct 29 10:07:43 2000 UTC (11 years, 3 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +3 -1 lines
fix warning compile error about unused variable
Revision 1.164: download - view: text, markup, annotated - select for diffs
Sun Oct 29 09:59:28 2000 UTC (11 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +3 -3 lines
Fix params passed to pci_porten() and pci_memen().
Revision 1.141.2.4: download - view: text, markup, annotated - select for diffs
Sat Oct 28 23:10:17 2000 UTC (11 years, 3 months ago) by msmith
Branches: old_RELENG_4
CVS tags: old_RELENG_4_2_0_RELEASE
Diff to: previous 1.141.2.3: preferred, colored; branchpoint 1.141: preferred, colored; next MAIN 1.142: preferred, colored
Changes since revision 1.141.2.3: +15 -1 lines
MFC: back out over-aggressive enabling of I/O and memory enabl bits in the command register.
Revision 1.163: download - view: text, markup, annotated - select for diffs
Sat Oct 28 23:07:13 2000 UTC (11 years, 3 months ago) by msmith
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +15 -2 lines
Unconditionally turning on the I/O and memory enable bits in the PCI command register is too aggressive. Revert to the previous behaviour, but leave the new behaviour available as an undocumented option. It's not clear what the Right, Right Thing is to do here, but the more conservative approach is safer.
Revision 1.162: download - view: text, markup, annotated - select for diffs
Sat Oct 28 07:04:07 2000 UTC (11 years, 3 months ago) by msmith
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +2 -1 lines
Allow PCI busses to be connected to host bridges detected by ACPI as well.
Revision 1.161: download - view: text, markup, annotated - select for diffs
Thu Oct 19 08:07:23 2000 UTC (11 years, 3 months ago) by msmith
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +2 -2 lines
Write the routed interrupt back to PCI configuration space.
Revision 1.160: download - view: text, markup, annotated - select for diffs
Mon Oct 16 15:38:11 2000 UTC (11 years, 3 months ago) by gallatin
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +3 -1 lines
The previous commit broke kernel builds on alpha (and probably ia64). #ifdef away the offending code until somebody with more newbus fu than me can figure out where to put a default function that returns 255 without touching each alpha chipset driver..
Revision 1.159: download - view: text, markup, annotated - select for diffs
Mon Oct 16 07:24:00 2000 UTC (11 years, 3 months ago) by imp
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +20 -1 lines
When a pci device hasn't had an interrupt routed to it (signified by the intline of 255) go ahead and route the interrupt when we allocate an interrupt. Submitted by: msmith
Revision 1.158: download - view: text, markup, annotated - select for diffs
Mon Oct 9 00:43:45 2000 UTC (11 years, 4 months ago) by msmith
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +6 -3 lines
Validate the PCI bus number that we fetch from our parent, since there's no guarantee that everything attached to *it* is a PCI bus.
Revision 1.157: download - view: text, markup, annotated - select for diffs
Tue Sep 5 00:32:19 2000 UTC (11 years, 5 months ago) by peter
Branches: MAIN
CVS tags: old_PRE_SMPNG
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +3 -1 lines
When dumping the 'found devices' list in verbose mode, actually show the bus/slot/function numbers. The old PCI code used other markers or something, but without it here under the new pci code it is very hard to tell which device is which (this only affects bootverbose mode).
Revision 1.141.2.3: download - view: text, markup, annotated - select for diffs
Fri Sep 1 23:29:34 2000 UTC (11 years, 5 months ago) by msmith
Branches: old_RELENG_4
CVS tags: old_RELENG_4_1_1_RELEASE
Diff to: previous 1.141.2.2: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.2: +9 -5 lines
MFC: fix up botched PCI configuration by the BIOS in the case where a resource has been allocated but its class is not marked as enabled in the command register.
Revision 1.156: download - view: text, markup, annotated - select for diffs
Fri Sep 1 23:09:02 2000 UTC (11 years, 5 months ago) by msmith
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +14 -7 lines
If a base address register has been set up by the BIOS, but the relevant enable bit hasn't been set in the command register, set the bit and honour the register. It seems that quite a few lazy BIOS writers aren't bothering to do this, which upsets the existing code and causes us to miss out on properly-configured devices.
Revision 1.155: download - view: text, markup, annotated - select for diffs
Thu Aug 31 21:27:51 2000 UTC (11 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +1 -2 lines
Remove duplicate static definition of pci_devclass
Revision 1.154: download - view: text, markup, annotated - select for diffs
Mon Aug 28 21:48:13 2000 UTC (11 years, 5 months ago) by dfr
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +176 -179 lines
* Completely rewrite the alpha busspace to hide the implementation from the drivers. * Remove legacy inx/outx support from chipset and replace with macros which call busspace. * Rework pci config accesses to route through the pcib device instead of calling a MD function directly. With these changes it is possible to cleanly support machines which have more than one independantly numbered PCI busses. As a bonus, the new busspace implementation should be measurably faster than the old one.
Revision 1.141.2.2: download - view: text, markup, annotated - select for diffs
Tue Jul 4 01:35:10 2000 UTC (11 years, 7 months ago) by mjacob
Branches: old_RELENG_4
CVS tags: old_RELENG_4_1_0_RELEASE
Diff to: previous 1.141.2.1: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.1: +5 -1 lines
MFC(1.148): Update 'hose' (actually, MCPCIA instance #) for Alpha Rawhide systems.
Revision 1.153: download - view: text, markup, annotated - select for diffs
Fri Jun 9 16:00:26 2000 UTC (11 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +2 -1 lines
Nuke the useless chip driver. It gets in the way when you want to load a functional driver for the device.
Revision 1.152: download - view: text, markup, annotated - select for diffs
Sun May 28 16:35:57 2000 UTC (11 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +3 -105 lines
Encapsulate the old PCI compatability support and APIs completely under "options COMPAT_OLDPCI". This option already existed, but now also tidies up the declarations in #include <pci/pci*.h>. It is amazing how much stuff was using the old pre-FreeBSD 3.x names and going silently undetected.
Revision 1.151: download - view: text, markup, annotated - select for diffs
Fri May 26 02:06:41 2000 UTC (11 years, 8 months ago) by jake
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +4 -4 lines
Back out the previous change to the queue(3) interface. It was not discussed and should probably not happen. Requested by: msmith and others
Revision 1.150: download - view: text, markup, annotated - select for diffs
Tue May 23 20:39:02 2000 UTC (11 years, 8 months ago) by jake
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +4 -4 lines
Change the way that the queue(3) structures are declared; don't assume that the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
Revision 1.149: download - view: text, markup, annotated - select for diffs
Thu May 18 20:28:15 2000 UTC (11 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +2 -2 lines
Print the correct value for the map type on a verbose boot. PR: kern/18662 Submitted by: tamaru@ap.t.u-tokyo.ac.jp
Revision 1.148: download - view: text, markup, annotated - select for diffs
Sun May 7 04:56:19 2000 UTC (11 years, 9 months ago) by mjacob
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +6 -2 lines
Update 'hose' (actually, MCPCIA instance #) for Alpha Rawhide systems. We have *got* to fix this bogosity of trying to steal part of the PCI address space for this stuff.
Revision 1.147: download - view: text, markup, annotated - select for diffs
Sun Apr 30 10:01:55 2000 UTC (11 years, 9 months ago) by bde
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +2 -2 lines
Fixed the type of some ivar access functions. Ivars have type uintptr_t, not u_long. On i386's with 64-bit longs, returning u_longs indirectly in (more than) the space reserved for uintptr_t's tended to corrupt the previous frame pointer in the stack frame, so it was not easy to debug. The type mismatches are hidden by the bogus cast in DEVMETHOD().
Revision 1.146: download - view: text, markup, annotated - select for diffs
Tue Apr 18 15:15:35 2000 UTC (11 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +1 -2 lines
Remove unneeded <sys/buf.h> includes. Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes.
Revision 1.145: download - view: text, markup, annotated - select for diffs
Sat Apr 8 14:17:12 2000 UTC (11 years, 10 months ago) by dfr
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +2 -2 lines
* Factor out the object system from new-bus so that it can be used by non-device code. * Re-implement the method dispatch to improve efficiency. The new system takes about 40ns for a method dispatch on a 300Mhz PII which is only 10ns slower than a direct function call on the same hardware. This changes the new-bus ABI slightly so make sure you re-compile any driver modules which you use.
Revision 1.141.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 27 18:23:34 2000 UTC (11 years, 10 months ago) by mjacob
Branches: old_RELENG_4
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +38 -10 lines
MFC 1.142: Use current alpha platform to know how many bits to allocate for a hose number.
Revision 1.144: download - view: text, markup, annotated - select for diffs
Sun Mar 19 13:07:12 2000 UTC (11 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +6 -3 lines
Connect the ISA and PCI compatability shims to an option. In this case it's options COMPAT_OLDISA and COMPAT_OLDPCI. This is meant to be a fairly strong incentive to update the older drivers to newbus, but doesn't (quite) leave anybody hanging with no hardware support. I was talking with a few folks and I was encouraged to simply break or disable the shims but that was a bit too drastic for my liking.
Revision 1.143: download - view: text, markup, annotated - select for diffs
Sat Mar 18 19:18:36 2000 UTC (11 years, 10 months ago) by n_hibma
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +13 -7 lines
Print the PCI resources even if they are disabled. This shows more clearly when the BIOS is forgetful about initialising the USB controllers.
Revision 1.142: download - view: text, markup, annotated - select for diffs
Wed Mar 15 23:50:31 2000 UTC (11 years, 10 months ago) by mjacob
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +38 -10 lines
Alpha 8200 port: Until we fix things better, determine which alpha CPU platform we're running on so we know how many bits to reserve at the top end for the 'hose' value. It turns out that there's *just* enough room to support all possible hoses on TurboLaser. Reviewed by: gallatin@freebsd.org, dfr@free3bsd.org
Revision 1.141: download - view: text, markup, annotated - select for diffs
Tue Feb 22 21:44:39 2000 UTC (11 years, 11 months ago) by billf
Branches: MAIN
CVS tags: old_RELENG_4_BP, old_RELENG_4_0_0_RELEASE
Branch point for: old_RELENG_4
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +14 -6 lines
o No need to print the vendor/device ID for things that matched succesfully. o ``<device name>'' versus ``device name'' for things that fall under nomatch. Reviewed by: dfr (in principle) Approved by: Baron von Hubbard
Revision 1.140: download - view: text, markup, annotated - select for diffs
Sat Feb 19 09:44:05 2000 UTC (11 years, 11 months ago) by dfr
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +4 -5 lines
Remove the vga-pci driver. It serves no purpose and it hides the hardware from useful drivers such as the 3D DRI drivers I will be porting for hardware accelerated OpenGL. The hardware will still be reported during boot using the nomatch system. Approved by: jkh
Revision 1.139: download - view: text, markup, annotated - select for diffs
Tue Feb 1 18:02:12 2000 UTC (12 years ago) by peter
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +2 -2 lines
Spell "pci_delete_resource" correctly. Approved by: jkh (who must be very sick of requests now :-)
Revision 1.138: download - view: text, markup, annotated - select for diffs
Sat Jan 29 15:37:33 2000 UTC (12 years ago) by peter
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +2 -1 lines
Put a FYI in the compatability shims so that people are aware that they are using an old unconverted driver. Most (if not all) of the drivers for common hardware are newbus these days. However, we don't want to encourage people to take the easy way out and write new drivers using the shims. This is just passive "encouragement". Reviewed by: phk
Revision 1.137: download - view: text, markup, annotated - select for diffs
Sat Jan 8 10:12:21 2000 UTC (12 years, 1 month ago) by peter
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +38 -4 lines
Show the port/mem/irq of pci devices too.
Revision 1.136: download - view: text, markup, annotated - select for diffs
Fri Dec 10 17:44:22 1999 UTC (12 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +8 -15 lines
Make the usb and ide/ata device identification a little saner. Rather than attaching to the device via chip*, use the newbus nomatch method to report the device. This leaves them unattached so that a driver can be easily loaded to grab them later.
Revision 1.135: download - view: text, markup, annotated - select for diffs
Wed Dec 8 17:43:52 1999 UTC (12 years, 2 months ago) by ken
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +2 -2 lines
[ repository copy of sys/pci/pci_ioctl.h to sys/sys/pciio.h happened in the background ] Rename sys/pci/pci_ioctl.h to sys/sys/pciio.h to make it easier for userland programs to use this interface. Reformat the file, and add a BSD-style copyright to it. Add a new man page for pci(4). The PCIOCGETCONF, PCIOCREAD, and PCIOCWRITE ioctls are documented, but the PCIOCATTACHED ioctl is not documented because it is not implemented. Change includes of <pci/pci_ioctl.h> to <sys/pciio.h> or remove them altogether. In many cases, pci_ioctl.h was unused. Reviewed by: steve
Revision 1.93.2.3: download - view: text, markup, annotated - select for diffs
Wed Dec 8 05:04:11 1999 UTC (12 years, 2 months ago) by ken
Branches: old_RELENG_3
CVS tags: old_RELENG_3_5_0_RELEASE, old_RELENG_3_4_0_RELEASE
Diff to: previous 1.93.2.2: preferred, colored; branchpoint 1.93: preferred, colored; next MAIN 1.94: preferred, colored
Changes since revision 1.93.2.2: +3 -3 lines
MFC, revision 1.95 (partial) Prevent garbage values from showing up in the PCI device name field in 'pciconf -l' when no driver is assigned. Peter committed the same fix to current as part of the new-bus merge in revision 1.95. Approved by: jkh
Revision 1.134: download - view: text, markup, annotated - select for diffs
Sun Dec 5 18:50:22 1999 UTC (12 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +2 -2 lines
Raise the pci compat driver match priority a bit so that it's not quite so close to the chip* drivers.
Revision 1.133: download - view: text, markup, annotated - select for diffs
Fri Dec 3 08:41:22 1999 UTC (12 years, 2 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +3 -3 lines
Remove the 'ivars' arguement to device_add_child() and device_add_child_ordered(). 'ivars' may now be set using the device_set_ivars() function. This makes it easier for us to change how arbitrary data structures are associated with a device_t. Eventually we won't be modifying device_t to add additional pointers for ivars, softc data etc. Despite my best efforts I've probably forgotten something so let me know if this breaks anything. I've been running with this change for months and its been quite involved actually isolating all the changes from the rest of the local changes in my tree. Reviewed by: peter, dfr
Revision 1.132: download - view: text, markup, annotated - select for diffs
Tue Nov 30 01:34:46 1999 UTC (12 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +3 -2 lines
Make the pci driver compat shim return a preference for probe rather than an "it's mine!" so that other newbus-aware drivers can bid for the device too. This should allow the sym driver to out-bid the ncr driver for devices it supports without having to modify ncr.c at all. ncr would then function as a catch-all.
Revision 1.131: download - view: text, markup, annotated - select for diffs
Mon Nov 22 14:39:21 1999 UTC (12 years, 2 months ago) by n_hibma
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +6 -6 lines
Feh, kind of went wrong the previous commit. dev should child (in some cases) plus a typo.
Revision 1.130: download - view: text, markup, annotated - select for diffs
Mon Nov 22 03:34:43 1999 UTC (12 years, 2 months ago) by n_hibma
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +16 -3 lines
Move the pretty printing of the description for USB controllers to pci_probe_nomatch, so it won't be in the way when loading USB as a module. The reason for them being there in the first place is that every motherboard comes with USB kit and this way it looks more pretty (peter). The real solution will be to define some method of detaching a driver after it has attached.
Revision 1.129: download - view: text, markup, annotated - select for diffs
Sat Nov 20 14:54:28 1999 UTC (12 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +5 -3 lines
Allow NULL for startp and/or countp in bus_get_resource() so that you can get one of the two without having to use a dummy variable.
Revision 1.128: download - view: text, markup, annotated - select for diffs
Wed Nov 3 22:43:03 1999 UTC (12 years, 3 months ago) by gallatin
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +5 -5 lines
now that a map's base addr is 64-bits, the alpha multi-hose hack needs to be cast to 64-bits in pci_add_map. This should allow XP1000s and DS20s to boot -current again.
Revision 1.127: download - view: text, markup, annotated - select for diffs
Sat Oct 30 06:32:01 1999 UTC (12 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +3 -3 lines
Change useracc() and kernacc() to use VM_PROT_{READ|WRITE|EXECUTE} for the
"rw" argument, rather than hijacking B_{READ|WRITE}.
Fix two bugs (physio & cam) resulting by the confusion caused by this.
Submitted by: Tor.Egge@fast.no
Reviewed by: alc, ken (partly)
Revision 1.126: download - view: text, markup, annotated - select for diffs
Fri Oct 29 19:03:18 1999 UTC (12 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +5 -5 lines
Don't test boolean return against != 1. Don't needlessly assign the error variable in an if statement.
Revision 1.125: download - view: text, markup, annotated - select for diffs
Thu Oct 28 08:06:59 1999 UTC (12 years, 3 months ago) by dfr
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +102 -64 lines
Fix some resource allocation peculiarities of the intpm device.
Revision 1.124: download - view: text, markup, annotated - select for diffs
Tue Oct 26 07:40:41 1999 UTC (12 years, 3 months ago) by dfr
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +2 -2 lines
Make sure we add an interrupt resource if intline!=255.
Revision 1.123: download - view: text, markup, annotated - select for diffs
Sun Oct 17 06:48:47 1999 UTC (12 years, 3 months ago) by dfr
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +2 -2 lines
Correct a stupid type which prevented us from working with any device which needed port resources.
Revision 1.122: download - view: text, markup, annotated - select for diffs
Thu Oct 14 21:38:31 1999 UTC (12 years, 3 months ago) by dfr
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +142 -257 lines
* Implement bus_set/get/delete_resource for pci. * Change the hack used on the alpha for mapping devices into DENSE or BWX memory spaces to a simpler one. Its still a hack and should be a seperate api to explicitly map the resource. * Add $FreeBSD$ as necessary.
Revision 1.121: download - view: text, markup, annotated - select for diffs
Tue Oct 12 22:10:49 1999 UTC (12 years, 4 months ago) by gallatin
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +3 -3 lines
allow pci_ioctl to work with multi-hose alphas. Rather than teaching pci_ioctl about hoses, we just pass down a magic number & let the platform code figure out what the hose is based on what the bus number is. concept approved by dfr
Revision 1.120: download - view: text, markup, annotated - select for diffs
Sun Oct 3 21:09:30 1999 UTC (12 years, 4 months ago) by gallatin
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +5 -1 lines
A band-aid to prevent multi-hose alpha chipsets (aka tsunami) from panic'ing because the hose is not filled in. We should probably extend the pciioctl interface to take hoses into account..
Revision 1.119: download - view: text, markup, annotated - select for diffs
Fri Oct 1 16:58:40 1999 UTC (12 years, 4 months ago) by roger
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +2 -10 lines
Backout part of the changes made in 1.111 For unknown devices the output will now be pci0: unknown card (vendor=0x109e, dev=0x0878) at 14.1 irq 19 instead of pci0: unknown card DD^0878 (vendor=0x109e, dev=0x0878) at 14.1 irq 19 Before this change, the code used to take the PCI vendor id and translate it into a three letter ASCII name. For PnP devices, the vendor id _does_ map to a nice ASCII name (eg Creative Labs PnP ID maps to "CTL", ESS PnP ID maps to "ESS") But there is no such mapping for PCI devices, as can be seen by the example above where the Brooktree PCI vendor ID maps to "DD^" The PCI Special Interest Group confirmed they do not have any mappings from vendor ID to ASCII.
Revision 1.118: download - view: text, markup, annotated - select for diffs
Sat Sep 25 18:24:41 1999 UTC (12 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +1 -6 lines
Remove five now unused fields from struct cdevsw. They should never have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
Revision 1.23.4.8: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:36:52 1999 UTC (12 years, 5 months ago) by peter
Branches: old_RELENG_2_1_0
Diff to: previous 1.23.4.7: preferred, colored; branchpoint 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23.4.7: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.57.2.10: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:21:21 1999 UTC (12 years, 5 months ago) by peter
Branches: old_RELENG_2_2
Diff to: previous 1.57.2.9: preferred, colored; branchpoint 1.57: preferred, colored; next MAIN 1.58: preferred, colored
Changes since revision 1.57.2.9: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.117: download - view: text, markup, annotated - select for diffs
Fri Sep 3 04:30:01 1999 UTC (12 years, 5 months ago) by luoqi
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +5 -6 lines
Handle for passthru resource release correctly.
Revision 1.93.2.2: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:31:55 1999 UTC (12 years, 5 months ago) by peter
Branches: old_RELENG_3
CVS tags: old_RELENG_3_3_0_RELEASE
Diff to: previous 1.93.2.1: preferred, colored; branchpoint 1.93: preferred, colored
Changes since revision 1.93.2.1: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.116: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:51:03 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.115: download - view: text, markup, annotated - select for diffs
Mon Aug 23 20:59:15 1999 UTC (12 years, 5 months ago) by phk
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +7 -22 lines
Convert DEVFS hooks in (most) drivers to make_dev().
Diskslice/label code not yet handled.
Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers)
Add the correct hook for devfs to kern_conf.c
The net result of this excercise is that a lot less files depends on DEVFS,
and devtoname() gets more sensible output in many cases.
A few drivers had minor additional cleanups performed relating to cdevsw
registration.
A few drivers don't register a cdevsw{} anymore, but only use make_dev().
Revision 1.114: download - view: text, markup, annotated - select for diffs
Thu Jul 29 01:03:03 1999 UTC (12 years, 6 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +13 -5 lines
Alter the behavior of sys/kern/subr_bus.c:device_print_child() - device_print_child() either lets the BUS_PRINT_CHILD method produce the entire device announcement message or it prints "foo0: not found\n" Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on the previous behavior of device_print_child() (printing the "foo0: <FooDevice 1.1>" bit of the announce message.) Provide bus_print_child_header() and bus_print_child_footer() to actually print the output for bus_generic_print_child(). These functions should be used whenever possible (unless you can just use bus_generic_print_child()) The BUS_PRINT_CHILD method now returns int instead of void. Modify everything else that defines or uses a BUS_PRINT_CHILD method to comply with the above changes. - Devices are 'on' a bus, not 'at' it. - If a custom BUS_PRINT_CHILD method does the same thing as bus_generic_print_child(), use bus_generic_print_child() - Use device_get_nameunit() instead of both device_get_name() and device_get_unit() - All BUS_PRINT_CHILD methods return the number of characters output. Reviewed by: dfr, peter
Revision 1.113: download - view: text, markup, annotated - select for diffs
Wed Jul 28 07:57:47 1999 UTC (12 years, 6 months ago) by dfr
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +13 -1 lines
Add support for SYS_RES_DENSE and SYS_RES_BWX resource types. These are equivalent to SYS_RES_MEMORY for x86 but for alpha, the rman_get_virtual() address of the resource is initialised to point into either dense-mapped or bwx-mapped space respectively, allowing direct memory pointers to be used to device memory. Reviewed by: Andrew Gallatin <gallatin@cs.duke.edu>
Revision 1.112: download - view: text, markup, annotated - select for diffs
Tue Jul 27 05:08:36 1999 UTC (12 years, 6 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +3 -3 lines
Case matters. DEv_METHOD to DEV_METHOD.
Revision 1.111: download - view: text, markup, annotated - select for diffs
Tue Jul 27 04:28:14 1999 UTC (12 years, 6 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +32 -1 lines
Implement the BUS_PROBE_NOMATCH method for the PCI bus. This function is called for each device for which no driver was found. Output is similar to the eisa_probe_nomatch() function but with the added benefit of displaying the assigned IRQ (since PCI gives us this information up front.) Output is like so: pci0: unknown card CPQ0508 (vendor=0x0e11, dev=0x0508) at 11.0 irq 9 pci0: unknown card DFZ0508 (vendor=0x10da, dev=0x0508) at 11.0 irq 9 pci0: unknown card DBL0508 (vendor=0x104c, dev=0x0508) at 11.0 irq 9 pci0: unknown card DDM0011 (vendor=0x108d, dev=0x0011) at 11.0 irq 9 I'm not happy with the 3 lines of macro cruft that got added but I consider it a temporary annoyance as those bits will be moved to some place where PCI, EISA and ISAPNP code will be able to use them. (Not surprisingly, this message is longer than the code in question.) Reviewed by: peter, dfr
Revision 1.110: download - view: text, markup, annotated - select for diffs
Sat Jul 3 20:17:07 1999 UTC (12 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +1 -6 lines
Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entire files. config will leave the whole file out if configured to do so.
Revision 1.109: download - view: text, markup, annotated - select for diffs
Thu Jul 1 22:58:03 1999 UTC (12 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +2 -1 lines
#include <machine/md_var.h> to bring the prototype for alpha_platform_assign_pciintr() into scope (!).
Revision 1.93.2.1: download - view: text, markup, annotated - select for diffs
Tue Jun 1 06:52:20 1999 UTC (12 years, 8 months ago) by roger
Branches: old_RELENG_3
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +47 -1 lines
MFC: Add pci_get_parent_from_tag() and pci_get_bus_from_tag() to the FreeBSD 2.2 PCI API compatibility section. These use the old pcici_t tags and are for new Matrox Meteor frame grabbers which need to identify the PCI bus they are on and the tag of their PCI-PCI Bridge
Revision 1.108: download - view: text, markup, annotated - select for diffs
Mon May 31 22:13:34 1999 UTC (12 years, 8 months ago) by roger
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +47 -1 lines
On the new Meteor cards, the Philips SAA 7116 is connected to the PCI bus via an IBM PCI-PCI bridge (82351 or 82352 or 82353) The driver must identify if it is on a secondary PCI bus, which is created via the IBM PCI-PCI bridge. If it is, then it must initialise the IBM PCI-PCI bridge correctly. To do this, the following new functions are added. Because they use the pcici_t tag, they are considered 2.2 compatibility APIs pcici_t * pci_get_parent_from_tag(pcici_t tag); int pci_get_bus_from_tag(pcici_t tag); (The _from_tag suffix is used to prevent clashes with similarly named newbus PCI API functions) Submitted by: Anton Berezin <tobez@plab.ku.dk> Reviewed by: Doug Rabson <dfr@nlsystems.com> Reworked by: Me (roger)
Revision 1.107: download - view: text, markup, annotated - select for diffs
Mon May 31 11:29:01 1999 UTC (12 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +2 -5 lines
Simplify cdevsw registration.
The cdevsw_add() function now finds the major number(s) in the
struct cdevsw passed to it. cdevsw_add_generic() is no longer
needed, cdevsw_add() does the same thing.
cdevsw_add() will print an message if the d_maj field looks bogus.
Remove nblkdev and nchrdev variables. Most places they were used
bogusly. Instead check a dev_t for validity by seeing if devsw()
or bdevsw() returns NULL.
Move bdevsw() and devsw() functions to kern/kern_conf.c
Bump __FreeBSD_version to 400006
This commit removes:
72 bogus makedev() calls
26 bogus SYSINIT functions
if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.
I4b and vinum not changed. Patches emailed to authors. LINT
probably broken until they catch up.
Revision 1.106: download - view: text, markup, annotated - select for diffs
Sun May 30 16:53:36 1999 UTC (12 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +20 -3 lines
This commit should be a extensive NO-OP:
Reformat and initialize correctly all "struct cdevsw".
Initialize the d_maj and d_bmaj fields.
The d_reset field was not removed, although it is never used.
I used a program to do most of this, so all the files now use the
same consistent format. Please keep it that way.
Vinum and i4b not modified, patches emailed to respective authors.
Revision 1.105: download - view: text, markup, annotated - select for diffs
Sun May 30 10:54:31 1999 UTC (12 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +2 -2 lines
In pci_alloc_resource() only check start and end to see if its a default.
Revision 1.104: download - view: text, markup, annotated - select for diffs
Thu May 20 15:33:31 1999 UTC (12 years, 8 months ago) by gallatin
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +37 -2 lines
Add support for multiple PCI "hoses" used on various alpha platforms. The specific intent of this commit is to pave the way for importing Compaq XP1000 support. These changes should not affect the i386 port. Reviewed by: Doug Rabson <dfr@nlsystems.com> (actually, he walked me through most of it & deserves more than reviewd-by credit )
Revision 1.103: download - view: text, markup, annotated - select for diffs
Mon May 10 17:56:22 1999 UTC (12 years, 9 months ago) by dfr
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +3 -1 lines
Add missing suspend/resume methods.
Revision 1.102: download - view: text, markup, annotated - select for diffs
Sun May 9 20:27:26 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +14 -16 lines
For the ioctl that reads the pci configuration, look up the name and unit on the fly so that we can see the driver assignment of new pci devices as well in the 'pciconf -l' display.
Revision 1.101: download - view: text, markup, annotated - select for diffs
Sun May 9 15:54:04 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +2 -5 lines
Argh, don't clobber the pci device list if there are multiple busses! (An AGP counts as a PCI bus, it seems...) This stopped 'pciconf -l' from working on AGP or PCI->PCI bridge systems.
Revision 1.100: download - view: text, markup, annotated - select for diffs
Sat May 8 21:59:40 1999 UTC (12 years, 9 months ago) by dfr
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +1 -3 lines
Move the declaration of the interrupt type from the driver structure to the BUS_SETUP_INTR call.
Revision 1.99: download - view: text, markup, annotated - select for diffs
Sat May 8 20:28:01 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +8 -1 lines
Print 'irq nn' on the device attach line like the old pci code did. However, we are not printing 'int a/b/c/d' yet, is it worth it on non-SMP systems? (It's useful when tracing PCI->IO-APIC routing on SMP systems)
Revision 1.98: download - view: text, markup, annotated - select for diffs
Sat May 8 18:09:53 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +1 -11 lines
GC pci_bushigh() - no longer used.
Revision 1.97: download - view: text, markup, annotated - select for diffs
Thu May 6 22:05:38 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +3 -3 lines
Fix a goof on my part; s/struct moduledata */struct module */
Revision 1.96: download - view: text, markup, annotated - select for diffs
Sat Apr 24 19:59:20 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
CVS tags: old_PRE_VFS_BIO_NFS_PATCH, old_PRE_SMP_VMSHARE, old_POST_VFS_BIO_NFS_PATCH, old_POST_SMP_VMSHARE
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +17 -9 lines
Replace the pcidevice_set linker set based configuration mechanism for old style pci drivers with a simple one-line change to use a module that registers itself under new-bus and should in theory enable just about all of the pci drivers to be loadable (kldload and loader(8)) but without having the impact of converting the APIs yet. This also fixes the problem of having undefined variables when only new-style pci drivers are present.
Revision 1.95: download - view: text, markup, annotated - select for diffs
Fri Apr 16 21:22:52 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
CVS tags: old_POST_NEWBUS
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +541 -112 lines
Bring the 'new-bus' to the i386. This extensively changes the way the i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Apr 11 02:47:31 1999 UTC (12 years, 10 months ago) by eivind
Branches: MAIN
CVS tags: old_PRE_NEWBUS
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +3 -3 lines
Staticize.
Revision 1.93: download - view: text, markup, annotated - select for diffs
Tue Jan 19 23:29:18 1999 UTC (13 years ago) by se
Branches: MAIN
CVS tags: old_RELENG_3_BP, old_RELENG_3_2_PAO_BP, old_RELENG_3_2_PAO, old_RELENG_3_2_0_RELEASE, old_RELENG_3_1_0_RELEASE
Branch point for: old_RELENG_3
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +2 -1 lines
Fix problem with zero valued map registers followed by valid map entries. The previous code just ignored the invalid map register, but this gave surprising results because of the way pci_map_port() associated the map register offset supplied with a map entry in the map array.
Revision 1.92: download - view: text, markup, annotated - select for diffs
Tue Jan 12 01:44:42 1999 UTC (13 years, 1 month ago) by eivind
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +1 -9 lines
Remove 'pci_bridgeto' - it was just an empty placeholder.
Revision 1.91: download - view: text, markup, annotated - select for diffs
Mon Nov 9 08:08:06 1998 UTC (13 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +3 -3 lines
s/%#p/%p/ to fix a warning. This looks like a leftover of once being %#x, which causes a leading 0x to be prepended. %p has this by default and the '#' is ignored by the kernel prinf code for %p.
Revision 1.90: download - view: text, markup, annotated - select for diffs
Tue Nov 3 08:47:29 1998 UTC (13 years, 3 months ago) by julian
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +25 -17 lines
In the cyrix Cx5530, there are null (empty) Base address registers before the base register that controls Ultra-DMA, so we need to examine all possible base registers instead of just giving up at the first empty one. Also, looking at the source code to the BIOS, I see that they are also checking for 0xffffffff as an invalid value so do the same. Stefan may like to clean this up, but at least now I can find my PCI IDE registers.
Revision 1.89: download - view: text, markup, annotated - select for diffs
Wed Sep 16 08:28:11 1998 UTC (13 years, 4 months ago) by dfr
Branches: MAIN
CVS tags: old_RELENG_3_0_0_RELEASE
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +9 -5 lines
Some workarounds for a common DEC pci-pci bridge found on alphas. Fix printf format errors which show up on the alpha.
Revision 1.88: download - view: text, markup, annotated - select for diffs
Tue Sep 15 22:05:37 1998 UTC (13 years, 4 months ago) by gibbs
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +5 -5 lines
Correct printf format bugs.
Revision 1.87: download - view: text, markup, annotated - select for diffs
Tue Sep 15 08:21:08 1998 UTC (13 years, 4 months ago) by gibbs
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +359 -38 lines
Revive PCIConf. Submitted by: "Kenneth D. Merry" <ken@plutotech.com>
Revision 1.86: download - view: text, markup, annotated - select for diffs
Sun Sep 6 22:41:41 1998 UTC (13 years, 5 months ago) by tegge
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +3 -3 lines
Maintain a mapping from irq number to (ioapic number, int pin) tuple, and use this when masking/unmasking interrupts. Maintain a mapping from (iopaic number, int pin) tuple to irq number, and use this when configuring devices and programming the ioapics. Previous code assumed that irq number was equal to int pin number, and that the ioapic number was 0. Don't let an AP enter _cpu_switch before all local apics are initialized.
Revision 1.85: download - view: text, markup, annotated - select for diffs
Thu Aug 13 19:12:20 1998 UTC (13 years, 6 months ago) by gibbs
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +5 -4 lines
Use "baseclass" instead of "class" for storing the contents of PCI register 0xB so that C++ programs can use the PCI conf interface.
Revision 1.84: download - view: text, markup, annotated - select for diffs
Wed Jul 22 08:40:46 1998 UTC (13 years, 6 months ago) by dfr
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +4 -1 lines
Add a call to a platform-specific irq remapping function for alpha platforms which don't record the correct irqs in PCI config space. Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
Revision 1.57.2.9: download - view: text, markup, annotated - select for diffs
Tue Jul 7 05:24:23 1998 UTC (13 years, 7 months ago) by gibbs
Branches: old_RELENG_2_2
CVS tags: old_RELENG_2_2_8_RELEASE, old_RELENG_2_2_7_RELEASE
Diff to: previous 1.57.2.8: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.8: +2 -2 lines
asm->__asm inline->__inline
Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun Jun 7 17:12:42 1998 UTC (13 years, 8 months ago) by dfr
Branches: MAIN
CVS tags: old_PRE_NOBDEV
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +8 -2 lines
This commit fixes various 64bit portability problems required for FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
Revision 1.57.2.8: download - view: text, markup, annotated - select for diffs
Wed May 6 19:12:26 1998 UTC (13 years, 9 months ago) by gibbs
Branches: old_RELENG_2_2
Diff to: previous 1.57.2.7: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.7: +39 -1 lines
Add support for extracting the bus, device, and function from a pcici_t.
Revision 1.82: download - view: text, markup, annotated - select for diffs
Wed Apr 1 21:07:36 1998 UTC (13 years, 10 months ago) by tegge
Branches: MAIN
CVS tags: old_PRE_DEVFS_SLICE, old_POST_DEVFS_SLICE
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +20 -4 lines
Add two workarounds for broken MP tables: - Attempt to handle PCI devices where the interrupt is an ISA/EISA interrupt according to the mp table. - Attempt to handle multiple IO APIC pins connected to the same PCI or ISA/EISA interrupt source. Print a warning if this happens, since performance is suboptimal. This workaround is only used for PCI devices. With these two workarounds, the -SMP kernel is capable of running on my Asus P/I-P65UP5 motherboard when version 1.4 of the MP table is disabled.
Revision 1.57.2.7: download - view: text, markup, annotated - select for diffs
Sat Mar 7 11:33:01 1998 UTC (13 years, 11 months ago) by se
Branches: old_RELENG_2_2
CVS tags: old_RELENG_2_2_6_RELEASE
Diff to: previous 1.57.2.6: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.6: +421 -334 lines
Add PCI LKM support. Drivers that want to be loadable need to call the new function "pci_register_lkm(&pci_device, 0)" from their "load" entry point. The new PCIOCATTACHED ioctl on /dev/pci allows user-land programs to find out, whether a PCI device got a driver attached. The "pciconf" function has been extended to return that information for automatic PCI driver loading from /etc/rc.
Revision 1.57.2.6: download - view: text, markup, annotated - select for diffs
Fri Mar 6 23:45:13 1998 UTC (13 years, 11 months ago) by julian
Branches: old_RELENG_2_2
CVS tags: old_POST_DPT
Diff to: previous 1.57.2.5: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.5: +26 -1 lines
Added support for the DPT driver. All non cosmettic changes are conditionalised on the #define DPTOPT so this should produce no functional changes if this is not defined. All changed files have previously been tagged with PRE_DPT.
Revision 1.81: download - view: text, markup, annotated - select for diffs
Sat Jan 24 02:54:47 1998 UTC (14 years ago) by eivind
Branches: MAIN
CVS tags: old_PRE_SOFTUPDATE, old_POST_SOFTUPDATE
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +3 -1 lines
Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style. This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow.
Revision 1.80: download - view: text, markup, annotated - select for diffs
Fri Nov 7 08:53:28 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +3 -3 lines
Remove a bunch of variables which were unused both in GENERIC and LINT. Found by: -Wunused
Revision 1.79: download - view: text, markup, annotated - select for diffs
Sun Sep 14 03:19:36 1997 UTC (14 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +2 -2 lines
Update select -> poll in drivers.
Revision 1.78: download - view: text, markup, annotated - select for diffs
Sat Aug 2 14:33:12 1997 UTC (14 years, 6 months ago) by bde
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +1 -5 lines
Removed unused #includes.
Revision 1.57.2.5: download - view: text, markup, annotated - select for diffs
Fri Jul 11 18:16:18 1997 UTC (14 years, 7 months ago) by se
Branches: old_RELENG_2_2
CVS tags: old_RELENG_2_2_5_RELEASE, old_PRE_DPT
Diff to: previous 1.57.2.4: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.4: +1 -26 lines
Remove heuristik meant to detect multi-function devices, that do not set the MSB in the header-type register. This seems to have applied to one device only, and didn't really make a difference there, since the additional functions didn't get a driver attached, anyway.
Revision 1.77: download - view: text, markup, annotated - select for diffs
Wed Jun 25 20:56:29 1997 UTC (14 years, 7 months ago) by fsmp
Branches: MAIN
CVS tags: old_WOLLMAN_MBUF, old_BP_WOLLMAN_MBUF
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +7 -5 lines
Modified to use renamed get_pci_apic_irq() -> pci_apic_pin() function.
Revision 1.76: download - view: text, markup, annotated - select for diffs
Mon Jun 2 19:59:01 1997 UTC (14 years, 8 months ago) by se
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +13 -2 lines
Move call of pci_addcfg() before test of cfg->subordinatebus, since the device probe of a host to PCI bridge may modify that value, based on its knowledge of device specific registers. This makes the Intel XXpress work, as verified by: Terje Marthinussen <terjem@cc.uit.no>.
Revision 1.75: download - view: text, markup, annotated - select for diffs
Wed May 28 10:01:03 1997 UTC (14 years, 8 months ago) by se
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +30 -29 lines
Two minor changes to the code that builds the pci map array: 1) Stop at the first map register that contains a zero value. 2) When testing for the map size work up from low values, since this works around a bug in some BusLogic SCSI card, which has the 16 upper port base address bits hardwired to zero. The config register dump printed in the bootverbose case has been slightly rearranged.
Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue May 27 19:24:36 1997 UTC (14 years, 8 months ago) by fsmp
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +6 -9 lines
Minor cleanup of APIC_IO code. Submitted by: Stefan Esser <se@freebsd.org>
Revision 1.73: download - view: text, markup, annotated - select for diffs
Tue May 27 04:09:01 1997 UTC (14 years, 8 months ago) by fsmp
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +19 -1 lines
Add support for APIC_IO to pci IRQ configuration. The support for APIC_IO was lost in the new set of pci modules. This patch restores the ability to build SMP/APIC_IO kernels.
Revision 1.72: download - view: text, markup, annotated - select for diffs
Mon May 26 15:08:34 1997 UTC (14 years, 8 months ago) by se
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +349 -1800 lines
Completely replace the PCI bus driver code to make it better reflect reality. There will be a new call interface, but for now the file pci_compat.c (which is to be deleted, after all drivers are converted) provides an emulation of the old PCI bus driver functions. The only change that might be visible to drivers is, that the type pcici_t (which had been meant to be just a handle, whose exact definition should not be relied on), has been converted into a pcicfgregs* . The Tekram AMD SCSI driver bogusly relied on the definition of pcici_t and has been converted to just call the PCI drivers functions to access configuration space register, instead of inventing its own ... This code is by no means complete, but assumed to be fully operational, and brings the official code base more in line with my development code. A new generic device descriptor data type has to be agreed on. The PCI code will then use that data type to provide new functionality: 1) userconfig support 2) "wired" PCI devices 3) conflicts checking against ISA/EISA 4) maps will depend on the command register enable bits 5) PCI to Anything bridges can be defined as devices, and are probed like any "standard" PCI device. The following features are currently missing, but will be added back, soon: 1) unknown device probe message 2) suppression of "mirrored" devices caused by ancient, broken chip-sets This code relies on generic shared interrupt support just commited to kern_intr.c (plus the modifications of isa.c and isa_device.h).
Revision 1.71: download - view: text, markup, annotated - select for diffs
Sat May 3 13:52:29 1997 UTC (14 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +58 -45 lines
Initialize PCI/CardBus bridges. Tested on: HP Omnibook 800 / TI PCI1130 Reviewed by: se
Revision 1.70: download - view: text, markup, annotated - select for diffs
Sat Apr 26 11:46:18 1997 UTC (14 years, 9 months ago) by peter
Branches: MAIN
CVS tags: old_post_smp_merge
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +26 -4 lines
Man the liferafts! Here comes the long awaited SMP -> -current merge! There are various options documented in i386/conf/LINT, there is more to come over the next few days. The kernel should run pretty much "as before" without the options to activate SMP mode. There are a handful of known "loose ends" that need to be fixed, but have been put off since the SMP kernel is in a moderately good condition at the moment. This commit is the result of the tinkering and testing over the last 14 months by many people. A special thanks to Steve Passe for implementing the APIC code!
Revision 1.57.2.4: download - view: text, markup, annotated - select for diffs
Wed Apr 23 20:25:04 1997 UTC (14 years, 9 months ago) by se
Branches: old_RELENG_2_2
CVS tags: old_RELENG_2_2_2_RELEASE
Diff to: previous 1.57.2.3: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.3: +17 -8 lines
Merge in rev. 1.69 from -current (header type 2 support).
Revision 1.69: download - view: text, markup, annotated - select for diffs
Wed Apr 23 19:43:20 1997 UTC (14 years, 9 months ago) by se
Branches: MAIN
CVS tags: old_pre_smp_merge
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +19 -10 lines
Add preliminary support for PCI config header type 2: Fetch subvendor/device ID from config space register 0x40.
Revision 1.68: download - view: text, markup, annotated - select for diffs
Tue Mar 25 19:12:08 1997 UTC (14 years, 10 months ago) by se
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -3 lines
Fix printing of map sizes: large numbers got a negative sign before.
Revision 1.67: download - view: text, markup, annotated - select for diffs
Tue Mar 25 19:01:46 1997 UTC (14 years, 10 months ago) by se
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +11 -2 lines
Add a few vendor IDs and class and sub-class encodings. Submitted by: phk
Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Feb 22 09:44:11 1997 UTC (14 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +1 -1 lines
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not ready for it yet.
Revision 1.65: download - view: text, markup, annotated - select for diffs
Wed Feb 5 07:23:56 1997 UTC (15 years ago) by ache
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +1 -1 lines
Fix misspelled variable name, -current build stopper
Revision 1.64: download - view: text, markup, annotated - select for diffs
Tue Feb 4 18:31:55 1997 UTC (15 years ago) by se
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +5 -1 lines
Add interface revision field to pci_register_lkm parameter list.pci.c pcibus.h This parameter is intended to allow new kernels to work with old LKM binaries, provided the revision ID is incremented whenever the PCI LKM interface is changed. The revision ID does not at all protect against changes in data structures accesses by the driver.
Revision 1.57.2.3: download - view: text, markup, annotated - select for diffs
Sat Jan 25 02:02:40 1997 UTC (15 years ago) by se
Branches: old_RELENG_2_2
CVS tags: old_RELENG_2_2_1_RELEASE, old_RELENG_2_2_0_RELEASE
Diff to: previous 1.57.2.2: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.2: +10 -11 lines
Merge in 1.62 -> 1.63 from main branch.
Revision 1.63: download - view: text, markup, annotated - select for diffs
Sat Jan 25 01:57:30 1997 UTC (15 years ago) by se
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +8 -9 lines
Improve on previous fix: Clean up getirq() as well, and remove redundant warning messages.
Revision 1.57.2.2: download - view: text, markup, annotated - select for diffs
Thu Jan 23 23:28:14 1997 UTC (15 years ago) by se
Branches: old_RELENG_2_2
Diff to: previous 1.57.2.1: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.1: +2 -2 lines
Merge in diff from 1.61 to 1.62 from -current: Make pci_map_int() reject a request to use IRQ 0 for a PCI card interrupt. The PCI standard requires 255 to be put into the INTERRUPT LINE register if no IRQ has been routed to some PCI device, but a value of 0 is used by many PCI BIOS implementations. This patch fixes a panic for a system with an on-board AMD SCSI chip, that was disabled in the BIOS setup, but got attached with IRQ 0 by the previous code.
Revision 1.62: download - view: text, markup, annotated - select for diffs
Thu Jan 23 22:58:03 1997 UTC (15 years ago) by se
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +1 -1 lines
Make IRQ 0 invalid in pci_map_int(), since it is hardwired to the programmable interval timer chip in PC systems.
Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue Jan 21 23:23:39 1997 UTC (15 years ago) by se
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +389 -290 lines
Add PCI LKM support.
Revision 1.60: download - view: text, markup, annotated - select for diffs
Tue Jan 14 06:53:37 1997 UTC (15 years ago) by jkh
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +1 -1 lines
Make the long-awaited change from $Id$ to $FreeBSD$ This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
Revision 1.57.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 25 07:19:04 1996 UTC (15 years, 2 months ago) by phk
Branches: old_RELENG_2_2
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +12 -32 lines
YAMFC
Revision 1.59: download - view: text, markup, annotated - select for diffs
Tue Nov 12 23:17:59 1996 UTC (15 years, 3 months ago) by se
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +7 -2 lines
Add support for header type == 1 devices (PCI 2.1 compatible PCI to PCI bridges with support for 64 bit memory addresses and 32 bit I/O addresses). The code is not complete. It ignores the upper half of the long addresses. This is not a problem on PC compatible systems, but has to be fixed for real computers.
Revision 1.58: download - view: text, markup, annotated - select for diffs
Tue Nov 12 23:10:17 1996 UTC (15 years, 3 months ago) by se
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +6 -31 lines
Fix PCI to PCI bridge register bit field masks. Thanks to "Mike Durian" <durian@plutotech.com> for the very good problem report and his support as a beta tester of this patch.
Revision 1.23.4.7: download - view: text, markup, annotated - select for diffs
Tue Nov 12 22:20:22 1996 UTC (15 years, 3 months ago) by se
Branches: old_RELENG_2_1_0
CVS tags: old_RELENG_2_1_7_RELEASE, old_RELENG_2_1_6_RELEASE, old_RELENG_2_1_6_1_RELEASE
Diff to: previous 1.23.4.6: preferred, colored; branchpoint 1.23: preferred, colored
Changes since revision 1.23.4.6: +6 -31 lines
Fix PCI to PCI bridge register bit field masks. Thanks to "Mike Durian" <durian@plutotech.com> for the very good problem report and his support as a beta tester of this patch.
Revision 1.57: download - view: text, markup, annotated - select for diffs
Tue Oct 22 20:20:11 1996 UTC (15 years, 3 months ago) by se
Branches: MAIN
CVS tags: old_RELENG_2_2_BP
Branch point for: old_RELENG_2_2
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +165 -3 lines
Add support for ioctl() accesses to PCI config space registers. Garrett Wollman sent me this code a few weeks ago for review, and I made some significant changes, which he in turn accepted ... In order to make use of these changes, a device entry has to added to /dev. Submitted by: wollman
Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Oct 14 13:04:34 1996 UTC (15 years, 3 months ago) by se
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +4 -2 lines
pci_map_mem() did a too restrictive check on the mapping type: PCI_MAP_MEMORY_TYPE_32BIT_1M should be accepted as well as PCI_MAP_MEMORY_TYPE_32BIT (and now is). (Problem reported by David Greenman.)
Revision 1.55: download - view: text, markup, annotated - select for diffs
Tue Sep 10 23:30:59 1996 UTC (15 years, 5 months ago) by bde
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +1 -24 lines
Removed more devconf leftovers.
Revision 1.54: download - view: text, markup, annotated - select for diffs
Fri Sep 6 23:08:58 1996 UTC (15 years, 5 months ago) by phk
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +2 -77 lines
Remove devconf, it never grew up to be of any use.
Revision 1.53: download - view: text, markup, annotated - select for diffs
Thu Sep 5 21:28:51 1996 UTC (15 years, 5 months ago) by se
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +2 -1 lines
Fix code that deals with multiple host to PCI bridges by making the next one use the highest seen bus number plus 1 as its starting point.
Revision 1.52: download - view: text, markup, annotated - select for diffs
Mon Sep 2 21:23:04 1996 UTC (15 years, 5 months ago) by se
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +52 -21 lines
Add preliminary support for the Orion PCI chip set. It is special in the way it attaches multiple PCI buses directly to the CPU, instead of having them hanging off from PCI to PCI bridges. This code is a hack, and will be obsoleted by the planned rework of the PCI code, which will change the dealing with PCI to PCI bridges and other special devices significantly. The patch also adds a kern_devconf entry for PCI bus 0 which is assumed to be a child of cpu0. The new PCI code will make it possible to hand out the kern_devconf structure to a pci device being attached, since this is (regretably, IMHO) required by a few ISA devices. Finally there are new PCI ids for some Intel chip set devices, which had already been known to 2.1.5R, but did not make it into -current. This closes "kern/1558: PCI probe seems to have lost a device in -current".
Revision 1.23.4.6: download - view: text, markup, annotated - select for diffs
Wed Jun 26 04:36:49 1996 UTC (15 years, 7 months ago) by davidg
Branches: old_RELENG_2_1_0
CVS tags: old_RELENG_2_1_5_RELEASE
Diff to: previous 1.23.4.5: preferred, colored; branchpoint 1.23: preferred, colored
Changes since revision 1.23.4.5: +319 -194 lines
Brought in most of the improvements/bugfixes from the main branch. Thanks to Stefan Esser for taking the time to sort all of this out.
Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun Jun 9 11:58:19 1996 UTC (15 years, 8 months ago) by asami
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +4 -2 lines
Scan PCI buses in order the BIOS has assigned them. This is sometimes necessary to boot from a SCSI disk connected to a twin-channel adapter, and you have multiple of them (disks and adapters). Reviewed by: se
Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat May 18 17:32:20 1996 UTC (15 years, 8 months ago) by se
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +2 -2 lines
Fix range check to actually test the variable that will be used as an index later. Submitted by: Erich Stefan Boleyn <erich@uruk.org>
Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Apr 25 06:04:27 1996 UTC (15 years, 9 months ago) by asami
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -2 lines
Fix logic bug in pci bridge code. For a PCI-PCI bridge, secondary should be <= than subordinate, not the other way around. They are both true if the bridge is not cascaded (i.e., twin-channel scsi/e-net adapters won't be affected by this bug), which is probably why it was unnoticed until today.
Revision 1.48: download - view: text, markup, annotated - select for diffs
Sun Apr 14 20:14:36 1996 UTC (15 years, 9 months ago) by se
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +165 -155 lines
Update PCI bus code from my current sources: - always use pci_conf_read() and pci_conf_write(). (This is required to simulate non-existant devices in my system for PCI bridge code tests.) - reorder some functions (put the main functions at the end). - correct off by one bug in the code dealing with unitialized PCI to PCI bridge chips. (Bug found by ASAMI Satoshi.) - print function number for multi-function devices.
Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun Apr 7 17:32:35 1996 UTC (15 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +1 -3 lines
Removed now-unused #includes of <machine/cpu.h>. They were for bootverbose being declared in the wrong place.
Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Feb 19 00:30:40 1996 UTC (15 years, 11 months ago) by se
Branches: MAIN
CVS tags: old_wollman_polling
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +5 -3 lines
Remove limit of port I/O addresses to 65K, since PCI specifies 32 bit port addresses (even though the PC architecture doesn't support them). Add code to limit the I/O map size based on the lowest set bit of the address. This cures the problem with the BT946C only having a 16 bit map register, in voiolation of the PCI specs, without giving up the general support of >65K port regions.
Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Feb 17 23:57:03 1996 UTC (15 years, 11 months ago) by se
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +68 -21 lines
Add generic PCI to PCI bridge support. Improve verbose boot messages for unidentified chips.
Revision 1.44: download - view: text, markup, annotated - select for diffs
Tue Jan 30 01:14:29 1996 UTC (16 years ago) by se
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +79 -34 lines
Add heuristic to detect multi-function devices that don't announce this feature in the header type register, though it is required by the PCI spec. This should correctly probe both functions of the Intel 82371FB chip, without the need for a special case based on the device ID.
Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Jan 27 20:14:31 1996 UTC (16 years ago) by wollman
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +8 -1 lines
Decode configuration for the IDE part of the Triton chipset. This includes a hack in the probe code: the 82371FB is a multifuction device, but doesn't properly set the configuration bit which indicates this. So, we just hard-wire all 82371FBs as multifunction devices. This does not actually make the bus-master IDE stuff work, although if anyone wants to work on that, I have the databooks that tell how to use it.
Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Jan 25 18:31:58 1996 UTC (16 years ago) by se
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +19 -7 lines
Add support for multi-function devices.
Revision 1.41: download - view: text, markup, annotated - select for diffs
Tue Jan 23 21:47:16 1996 UTC (16 years ago) by se
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +10 -25 lines
Make PCI interrupt handlers return void like everybody else does. Reviewed by: davidg
Revision 1.23.4.5: download - view: text, markup, annotated - select for diffs
Fri Jan 19 19:21:03 1996 UTC (16 years ago) by se
Branches: old_RELENG_2_1_0
Diff to: previous 1.23.4.4: preferred, colored; branchpoint 1.23: preferred, colored
Changes since revision 1.23.4.4: +3 -3 lines
Improve PCI probe messages by printing the bus number. Add missing newline to PCI to PCI bridge message. Submitted by: Matt Thomas <matt@lkg.dec.com>
Revision 1.40: download - view: text, markup, annotated - select for diffs
Fri Jan 19 19:01:19 1996 UTC (16 years ago) by se
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -3 lines
Improve PCI probe messages by printing the bus number. Add missing newline to PCI to PCI bridge message. Submitted by: Matt Thomas <matt@lkg.dec.com>
Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Dec 16 00:27:46 1995 UTC (16 years, 1 month ago) by bde
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +15 -7 lines
Completed function declarations and/or added prototypes and/or added #includes to get prototypes. pci now uses a different interrupt handler type for interrupts that it dispatches and the isa interrupt handler type for the interrupts that it handles.
Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Dec 15 13:40:20 1995 UTC (16 years, 1 month ago) by se
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +4 -4 lines
Fix the off-by-one error in the calculation of the valid port range. Reduce default value of pcicb_membase to 0x2000000 (from 0x4000000) since this seems to be the lower bound used by many systems. Submitted by: Mihoko Tanaka <m_tanaka@pa.yokogawa.co.jp>
Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Dec 14 09:54:08 1995 UTC (16 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -3 lines
Another mega commit to staticize things.
Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu Dec 7 12:47:42 1995 UTC (16 years, 2 months ago) by davidg
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -2 lines
Untangled the vm.h include file spaghetti.
Revision 1.35: download - view: text, markup, annotated - select for diffs
Wed Dec 6 15:52:23 1995 UTC (16 years, 2 months ago) by se
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -2 lines
Set default burst length limit to 32 bytes, since this seems to be an acceptable value for all current chip sets (just a hint to PCI device drivers, used in the NCR driver, for example). Add PCI Vendor ID of ACER.
Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue Nov 21 13:59:56 1995 UTC (16 years, 2 months ago) by bde
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -1 lines
Made pci.c compile again. It unfortunately depends on the isa interrupt interface. Adding prototypes just made the dependency explicit.
Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon Nov 20 12:42:23 1995 UTC (16 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +7 -12 lines
Mega commit for sysctl. Convert the remaining sysctl stuff to the new way of doing things. the devconf stuff is the reason for the large number of files. Cleaned up some compiler warnings while I were there.
Revision 1.23.4.4: download - view: text, markup, annotated - select for diffs
Mon Oct 9 06:35:59 1995 UTC (16 years, 4 months ago) by davidg
Branches: old_RELENG_2_1_0
CVS tags: old_RELENG_2_1_0_RELEASE
Diff to: previous 1.23.4.3: preferred, colored; branchpoint 1.23: preferred, colored
Changes since revision 1.23.4.3: +6 -4 lines
Sync with main branch: add vendor ID for Compaq, cosmetic changes.
Revision 1.23.4.3: download - view: text, markup, annotated - select for diffs
Mon Oct 2 13:45:44 1995 UTC (16 years, 4 months ago) by davidg
Branches: old_RELENG_2_1_0
Diff to: previous 1.23.4.2: preferred, colored; branchpoint 1.23: preferred, colored
Changes since revision 1.23.4.2: +2 -2 lines
Brought in change from rev 1.32: check correct variable for NULL before calling free().
Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Oct 2 13:43:11 1995 UTC (16 years, 4 months ago) by davidg
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -2 lines
Fixed bug where wrong thing was being checked for NULL before calling free(), resulting in a panic. This happend whenever an irq had already been allocated by another device (like something on the ISA bus).
Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Sep 14 23:24:29 1995 UTC (16 years, 4 months ago) by se
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -2 lines
Add vendor ID of Compaq, now that I found what it is ...
Revision 1.30: download - view: text, markup, annotated - select for diffs
Thu Sep 14 13:09:40 1995 UTC (16 years, 4 months ago) by se
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +6 -7 lines
Minor changes to the PCI probe messages.
Revision 1.23.4.2: download - view: text, markup, annotated - select for diffs
Sat Sep 9 23:10:19 1995 UTC (16 years, 5 months ago) by davidg
Branches: old_RELENG_2_1_0
Diff to: previous 1.23.4.1: preferred, colored; branchpoint 1.23: preferred, colored
Changes since revision 1.23.4.1: +216 -91 lines
Brought in changes from main branch: mostly cosmetic, a fix or two, and recognize more chips.
Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Sep 7 15:20:53 1995 UTC (16 years, 5 months ago) by se
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +182 -67 lines
Make mapping messages depend on bootverbose flag. Add PCI subclass to unknown device message.
Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Jul 29 18:21:48 1995 UTC (16 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
Initialize "name" to quiet compiler.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Jul 27 21:56:51 1995 UTC (16 years, 6 months ago) by se
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +21 -8 lines
Add a few vendor IDs.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Jul 27 21:38:45 1995 UTC (16 years, 6 months ago) by se
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +15 -15 lines
Get rid of references to the linker supplied set length field. Use the terminating NULL pointer as the end of list marker instead.
Revision 1.23.4.1: download - view: text, markup, annotated - select for diffs
Thu Jul 20 17:46:52 1995 UTC (16 years, 6 months ago) by davidg
Branches: old_RELENG_2_1_0
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +17 -7 lines
Brought in changes from revs 1.24 and 1.25: make bridge consistency checks non-fatal and change "not supported" to "no driver assigned".
Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Jun 28 16:32:54 1995 UTC (16 years, 7 months ago) by se
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
Change message "not supported" to "no driver assigned", because people tend to assume their devices won't work if they see this message, though it may indicate that those devices just don't need any PCI driver (e.g. devices that emulate an ISA card, or that have been initialised by the BIOS and need no further care).
Revision 1.24: download - view: text, markup, annotated - select for diffs
Wed Jun 28 15:59:04 1995 UTC (16 years, 7 months ago) by se
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +16 -6 lines
Failure of the consistency checks for BIOS assigned mappings of busses connected via PCI to PCI bridges is considered non fatal for now.
Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue May 30 08:13:09 1995 UTC (16 years, 8 months ago) by rgrimes
Branches: MAIN
CVS tags: old_RELENG_2_1_0_BP, old_RELENG_2_0_5_RELEASE, old_RELENG_2_0_5_BP, old_RELENG_2_0_5
Branch point for: old_RELENG_2_1_0
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +6 -6 lines
Remove trailing whitespace.
Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu May 4 06:57:11 1995 UTC (16 years, 9 months ago) by davidg
Branches: MAIN
CVS tags: old_RELENG_2_0_5_ALPHA
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -1 lines
bzero the malloced pci_devconf structure. This should fix the problem with several of freefall's recent crashes.
Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Mar 23 06:14:44 1995 UTC (16 years, 10 months ago) by davidg
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +5 -4 lines
Restore my changes to initialize the kdc_shutdown routine pointer. Stefan clobbered it in his previous commit and not having it causes the machine to panic during reboot (as well as not doing the important shutdown callout).
Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Mar 21 23:01:01 1995 UTC (16 years, 10 months ago) by se
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +1030 -507 lines
Completely new PCI code: 1) Supports PCI to PCI bridge devices (and tries to initialise them, even if the BIOS is brain dead). 2) Supports shared PCI interrupts. Interrupt handlers now MUST return '0' if they found nothing to do, '1' otherwise. New features tested with i486 systems based on the Intel Saturn and a DEC 4channel Ethernet card only, but expected to work on most systems. The option PCI_REMAP has been removed ! Submitted by: Wolfgang Stanglmeier <wolf@kintaro.cologne.de>
Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Mar 17 04:27:19 1995 UTC (16 years, 10 months ago) by davidg
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +7 -5 lines
Added a new field to the pci_device struct called pd_shutdown to specify a device specific shutdown routine for devconf. Assign the value of this to the kern_devconf struct. Implement a device shutdown routine for if_de that disables the device. This will stop the device from corrupting memory after a reboot.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Thu Mar 2 21:51:53 1995 UTC (16 years, 11 months ago) by se
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +15 -13 lines
Speed up PCI attach code by ommiting test if its result is ignored anyway.
Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Feb 27 17:17:13 1995 UTC (16 years, 11 months ago) by se
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +77 -22 lines
First try to add support for PCI-PCI bridge chips (written for the DEC 21050 chip in particular, don't have specs of other such chips). This should add support for Multiple-Ethernet PCI cards (e.g. Znyx 314). Reviewed by: se Submitted by: <wolf@kintaro.cologne.de> Wolfgang Stanglmeier
Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Feb 25 17:26:22 1995 UTC (16 years, 11 months ago) by se
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +22 -2 lines
Deal with systems, that lack a fully decoded PCI configuration space. Submitted by: <wolf@kintaro.cologne.de> Wolfgang Stanglmeier
Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Feb 22 14:17:15 1995 UTC (16 years, 11 months ago) by se
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +121 -43 lines
New PCI attach code: PCI BIOS mappings are retained, except if option PCI_REMAP is specified in the kernel config file. There is now a list of attach addresses, and the first address that seems to make some device registers appear is chosen. Reviewed by: se Submitted by: wolf
Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue Feb 14 23:33:38 1995 UTC (16 years, 11 months ago) by se
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +8 -2 lines
ncr.c: New config option "NCR_IOMAPPED" makes the driver use port I/O. Put back in 53c815 defines, submitted by Mikael Hybsch <micke@dynas.se>. These had got lost between cvs rev. 1.14 and now ... pci.c: Really write config space register. Assign ports starting at 0xbc00. Submitted by: wolf Reviewed by: se
Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Feb 14 06:19:23 1995 UTC (16 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -1 lines
YFfix
Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Feb 9 20:20:33 1995 UTC (17 years ago) by se
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +17 -1 lines
Try to detect overlapping PCI memory assignment. (This can only happen with devices that are mapped by the BIOS.) Reviewed by: se Submitted by: wolf (Wolfgang Stanglmeier)
Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Feb 2 13:12:17 1995 UTC (17 years ago) by davidg
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +183 -130 lines
Reapplied all of Stefan's changes. What a mess - the files were modified and moved at the same time. This made it *very* difficult to fix the revision log lossage that happend when the files were moved. SIGH.
Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Feb 2 12:36:18 1995 UTC (17 years ago) by davidg
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -2 lines
Fixed up include paths after copying these in the repository.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Nov 2 23:47:13 1994 UTC (17 years, 3 months ago) by se
Branches: MAIN
CVS tags: old_RELEASE_2_0, old_OLAH_TTCP, old_BETA_2_0, old_ALPHA_2_0
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +114 -6 lines
Submitted by: Added hooks for "lsdev" ... PCI devices should need no individual code for lsdev.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Oct 25 23:09:08 1994 UTC (17 years, 3 months ago) by se
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -5 lines
Modified fifth parameter (imask) to register_intr() according to new definition of that function.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Oct 12 02:33:21 1994 UTC (17 years, 4 months ago) by se
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +301 -249 lines
Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> Bug fixed, that caused system hang on first interrupt on some motherboards. New version of PCI bus configuration code, now supports dynamic interrupt configuration (using BIOS supplied values). NCR SCSI and DEC Ethernet driver patched to use this feature. *** Remove PCI IRQ specifications from your kernel config file ! ***
Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Oct 1 00:18:53 1994 UTC (17 years, 4 months ago) by wollman
Branches: MAIN
CVS tags: old_V941001
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
Correct DEC -> Digital Equipment Corporation.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Sep 28 16:34:07 1994 UTC (17 years, 4 months ago) by se
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +1 -5 lines
Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> New version with improved support for WIDE SCSI using the NCR 53c825. Test for buggy secondary cache implementations. PCI Int to IRQ mapping now specified per slot.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Sep 16 00:33:23 1994 UTC (17 years, 4 months ago) by se
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +131 -126 lines
Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> + <se> Improved bus probing, symbolic names for registers.. Chip set parameters get dumped for intel PCI chip sets (82424+82434 only, for now).
Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Sep 14 01:34:47 1994 UTC (17 years, 5 months ago) by wollman
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +92 -70 lines
Added a bit of missing functionality to make this work correctly on a wider variety of systems. Include the deivers from pci_intel.c in pci_config.c (I hope this is what was intended; my system works ok). Use pmap_mapdev(). Automatically map any large linear frame buffers or whatnot in VGA-style devices which ordinarily would not have their own drivers, and don't call not_supported() for them. (This shuts up complaints about my Matrox card.) Include the beginnings of what could eventually become dynamically-loadable PCI devices. Allow for the possibility of PCI devices simply providing a PCI veneer over an existing ISA device, and shut up about them, too. Make autoconfiguration text conform more to the style of other supported buses.
Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu Sep 1 02:01:34 1994 UTC (17 years, 5 months ago) by se
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> Merged in changes required for NetBSD support (by mycroft@gnu.ai.mit.edu) and support for multiple NCR chips.
Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Thu Sep 1 01:45:19 1994 UTC (17 years, 5 months ago) by se
Branches: old_WST_SE
CVS tags: old_V2_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> + Stefan Esser <se> Directory for PCI autoconfigure and device driver code.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Sep 1 01:45:18 1994 UTC (17 years, 5 months ago) by se
Branches: MAIN
Initial revision
