summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/pci
AgeCommit message (Collapse)Author
2014-03-26No need to include <sys/lock.h> when only <sys/rwlock.h> is needed,Martin Pieuchot
so remove the former and include the latter instead of pulling it in <dev/pci/agpvar.h>. This header already requires various other types anyway. While here remove unneeded headers.
2013-12-09Remove MD intagp(4) code that is unused now that inteldrm(4) manages the GTTMark Kettenis
all by itself.
2013-12-07Remove the agp-specific bus_dma code. It is no longer used now thatMark Kettenis
inteldrm(4) manages the GTT by itself. ok miod@
2013-12-06Add a DVACT_WAKEUP op to the *_activate() API. This is called after theTheo de Raadt
kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
2013-11-06Add support for Power Resources for Dx states and the necessary hookMartin Pieuchot
for PCI devices. This hook should be called twice, before and after changing the power state of a PCI device. Before setting the device to the new state, the ACPI layer will notify every power resources linked to the device for that state and make sure they are turned "_ON". After changing the state of the device, it will decrement the reference of every power resources linked to that device for the old state and turn them "_OFF" if they are no longer referenced. This fixes the no-USB after resume problem seen on various ThinkPad, problem initialy diagnosed with Alexander Polakov. ok kettenis@, deraadt@
2013-05-30If ACPI is not compiled in, pci_min_powerstate() has no facts to supportTheo de Raadt
is should return D3. It should return the current power state. ok kettenis mlarkin
2013-05-30Enforce ca_activate tree-walks over the entire heirarchy for all events,Theo de Raadt
cleaning up some shutdown-hook related code on the way. (A few drivers related to sparc are still skipped at kettenis' request) ok kettenis mlarkin, tested by many others too
2013-03-17Add an interface to rebind AGP DMA mappings. To be used by the upcoming KMSMark Kettenis
support to reload bindings after suspend/resume and to update cachability flags in the address translation table entries.
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-10-16Change the PCI memory extent to cover the whole 64-bit memory spaceMike Belopuhov
but reserve everything above 36 bits so that the erroneous extent allocation will fail but not panic the system. Fixes the notorious IBM x3100 panic where one of the PCI BARs is programmed with an incorrect 64 bit address. Idea and OK kettenis@, tested by Walter Souza, thanks!
2012-10-08Revamp the sequences for suspend/hibernate -> resume so that the codeTheo de Raadt
paths are reflexive. It is now possible to fail part-way through a suspend sequence, and recover along the resume code path. Split DVACT_SUSPEND by adding a new DVACT_POWERDOWN method is used after hibernate (and suspend too) to finish the job. Some drivers must be converted at the same time to use this instead of shutdown hooks (the others will follow at a later time) ok kettenis mlarkin
2012-09-19Set up PCI bus number resource accounting for the main PCI bus hierarchy.Mark Kettenis
2012-09-07Implement pci_min_powerstate().Mark Kettenis
2011-10-29Make sure we don't accidentally use ISA or EISA interrupt mappings on PCIMark Kettenis
busses. tested by krw@
2011-10-13I'm sick and tired of people doing misalgned reads and writes to PCI configMark Kettenis
space and not noticing because they only test on amd64. So enforce alignment there as well, at least for a little while such that we find those bugs and force people to fix them.
2011-06-18Cleanup MSI code a bit by moving the code to eanble/disable MSIs intoMark Kettenis
separate functions and install them as route/unroute functions for the MIS pseudo-PIC.
2011-06-16QEMU pretends to emulate a different prehistoric Intel host bridge.Mark Kettenis
From Brad.
2011-06-05Disable MSIs in pci_intr_disestablish() when appropriate.Mark Kettenis
2011-06-05Direct MSIs at the appropriate CPU.Mark Kettenis
2011-06-02In the land of VMWare you can have the latest 64-bit AMD multicore CPUMark Kettenis
behind a prehistoric Intel host bridge. Disable MSI on these contortion.
2011-05-30Enable MSI on selected hardware. For now this means all Intel, AMD and NVIDIAMark Kettenis
chipsets. All of those that support 64-bit CPUs should support MSI as well. Explicitly disable MSI on chipsets that connect to the CPU over HyperTransport. Enabling MSI on those systems is handled by the HyperTransport support code in our PCI subsystem.
2011-05-29Don't attempt to use MSI if we're not running in APIC mode.Mark Kettenis
2011-05-21First stab at suporting Message Signaled Interrupts on amd64. UnfortunatelyMark Kettenis
this code differs somewhat from the i386 code because the amd64 interrupt subsystem is quite different. Still disabled like on i386.
2011-04-22Stop printing the PCI interrupt line programmed by the BIOS for APICMark Kettenis
interrupts. It is irreleveant, confuses people and the information is available in pcidump(8) output anyway. ok oga@, jsg@, deraadt@
2011-04-10Extend the PCI memory address space to 36-bit. The first BIOSen that assignMark Kettenis
addresses >4GB to 64-bit BARs have started to appear. But as long as machines still support running 32-bit operating systems we don't expect to see BARs that aren't addressable using PAE. Fixes a panic reported by william@. ok deraadt@
2011-04-02Remove the AMD GART based iommu code.Owain Ainsworth
With current strategies to put memory in the ``correct'' place it isn't needed. There's also the problem that it did not work on all machines, failing completely on some and utterly breaking DMA. So just remove it. If anyone needs it it will be in the Attic. ok deraadt@
2011-01-10Only use MMCFG extended PCIe config space. Gets us back the on-CPU PCI ↵Mark Kettenis
devices on AMD Family 0Fh processors.
2011-01-09Only use memory mapped extended PCIe config space access for the bussesMark Kettenis
advertised in the MCFG table, and fall back on the traditional method for other busses. Fixes issue reported by henning@.
2011-01-04Add support for Memory Mapped Configuration space access. This gives usMark Kettenis
access to PCIe extended configuration space access on modern i386 and amd64 machines.
2010-12-04Introduce a new pci routine, pci_conf_size(), which returns the size of aMiod Vallat
given pcitag_t configuration address space. Currently, all pci controllers will return the usual 0x100 bytes of PCI configuration space, but this will eventually change on PCIe-capable controlers. ok kettenis@
2010-09-10Provide a bus_dmamap_sync() implementation for the IOMMU. Fixes bigmem.Mark Kettenis
tested by naddy@, ok dlg@
2010-09-06Make sure bus_dmamap_sync() always involves a function call, to prevent theMark Kettenis
compiler from doing stupid things like reordering stores around it. There is some debate whether this will be enough for newer versions of GCC and LLVM. If this is indeed deemed necessary, this will be addressed in a future diff. ok miod@, oga@
2010-08-31Add DVACT_QUIECE support. This is called before splhigh() and beforeTheo de Raadt
DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
2010-08-31pchbactivate should return result of config_activate_childrenTheo de Raadt
2010-08-07On resume, re-activate the host RNG on the host bridges that need it.Theo de Raadt
ok kettenis
2010-07-08Add mapping for ACPI device to PCI bdf (match autoconf tree)Jordan Hargrave
Simplify resource parsing function to use buffer argument Convert namespace linked lists to use queue macros ok marco@, deraadt@
2010-07-08use config_activate_children to get down to the isa bus activation codeTheo de Raadt
2010-07-01Backout recent AML changes, breaks on R210 and othersJordan Hargrave
2010-06-29Add support for mapping ACPI to PCI devicesJordan Hargrave
ok kettenis, deraadt
2010-06-24The new AMD Opteron CPUs have up to 4 HyperTransport links instead of 3.Mark Kettenis
ok dlg@
2010-05-10Continue with the horrible habit of using agp_machdep.c for agp related MDOwain Ainsworth
things that there really isn't a decent api for elsewhere. Since on recent intel IGPs the gtt aperture is too big (256meg is not uncommon) to be mapped on a kva-constrained arch like i386, introduce an agp mapping api that does things depending on arch. On amd64 which can afford the space (and will use the direct mapping again soon)just do bus_space_map() on init, then parcels things out using bus_space_subregion(), thus avoiding map/unmap overhead on every call (this is how inteldrm does things right now). On i386, we do bus_space_map() and bus_space_unmap as appropriate. Linux has some tricks here involving ``atomic'' maps that are on only one cpu and that you may not sleep with to avoid the ipi overhead for tlb flushing. For now we don't go down that route but it is being considered. I am also considering if it is worth abstracting this a little more, improving the api and making it a general MD interface. Tested by myself on i386 and amd64 and by drahn@ (who has one of the machines with an aperture that is too big) on i386.
2010-04-08Fill in the bus_dma_sync for intagp to use clflush instead of wbinvd()Owain Ainsworth
if supported. When we do memory management on intel this would lead to a LOT of wbinvd() to deal with gpu->cpu incoherency. no one wants that. Needed for sanity of inteldrm memory management which is coming up next.
2010-04-02For the VT8251 host bridge, only attach the pci bus is non-zero, otherwiseMark Kettenis
keep attaching bus 0 forever. tested by mk@
2010-02-09Switching the strange VIA VT8251 PCIE host bridge into a PCI-PCI bridgeMark Kettenis
didn't quite work since the bridge seems to end up largely unconfigured, and our PCI resource configuration code isn't quite smart enough (yet) to fix things up. So instead switch it only into PCI-PCI bridge mode long enough to snoop the bus number, and attach pci(4) using that number. This is probably safer anyway, since ACPI may not like us switching things around behind its back. Fixes PR 6253 & 6304.
2009-11-23pchb must walk children tooTheo de Raadt
2009-09-28Make video buffer area and BIOS areas unavailable for PCI resource allocation.Mark Kettenis
This should prevent problems on systems where these areas are not reserved in the BIOS memory map. ok miod@, oga@, marco@
2009-09-18For some dark reason there's a bit on the VLINK device of this chipsetMark Kettenis
that makes the PCIE device show up as a host bridge instead of a PCI-PCI bridge. As a result any devices sitting behind it won't be detected. Whack the device into PCI-PCI mode such that we can walk the PCI bus hierarchy the normal way and detect all devices. Fixes PR 6215. ok dlg@
2009-08-22Constify the what/name parameter of pci_intr_establish().Michael Knudsen
Tested by myself, sthen, oga, kettenis, and jasper. Input from sthen and jasper. ok kettenis (Manpage follows shortly.)
2009-07-20Pass a pci_chipset_tag_t to pci_intr_line(), to eventually allow theMiod Vallat
logic to be chipset dependent; no functional change yet. ok kettenis@
2009-06-14Make sure the pglist is TAILQ_INIT()'ed before invoking uvm_pglistalloc().Miod Vallat
ok deraadt@ kettenis@