summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci
AgeCommit message (Collapse)Author
2014-09-20On i386, agp_map_subregion might sleep, which is not allowed in some ofMark Kettenis
the inteldrm code. Fix this by adding new interfaces that can map a single page without sleeping and use that in the execbuffer fast path that needs this "atomic" behaviour. Should fix the panic I've seen under memory pressure on i386.
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
2014-06-29Don't ridiculously assume that sysctl.h will (through a set of extremelyTheo de Raadt
unfortunate circumstances) pull machine/cpufunc.h
2014-05-04format string fixes for bus_addr_t and bus_size_tStefan Fritsch
bus_addr_t and bus_size_t are u_long everywhere ok kettenis@
2014-04-19Don't panic if we're trying to disestablish an MSI but the hardware is gone.Mark Kettenis
tested by & ok mlarkin@
2014-04-08No need for <uvm/uvm_page.h>Martin Pieuchot
2014-04-01More <uvm/uvm.h> -> <uvm/uvm_extern.h> cleaning.Martin Pieuchot
ok kettenis@, deraadt@
2014-03-29It's been a quarter century: we can assume volatile is present with that name.Philip Guenther
ok dlg@ mpi@ deraadt@
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-28Appease LLVM's integrated assembler.Brad Smith
error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq' error: unknown token in expression cmp -> cmpl, %cs:* -> *%cs: ok kettenis@
2013-11-261 << 31 cleanup. Eitan Adler pointed out that there has been aTheo de Raadt
resurrection of the bad idiom in the tree. sufficient review by miod, kettenis, tedu
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-10-29unbreak glxsb(4) by properly allocating it's key schedule;Mike Belopuhov
reduce pctr.h usage while here. ok jsing, deraadt
2013-10-02Format string fixes: Use %l* for paddr_tStefan Fritsch
2013-10-01Format string fixes: %hu/%hd for uint16_t, %u/%d/%x for uint32_tStefan Fritsch
- despite the name, ntohl returns uint32_t, not long - also fix some %d into %u
2013-10-01Use %z* for size_tStefan Fritsch
while there, fix a few %d into %u
2013-10-01format string fix: it's u_long *addrStefan Fritsch
2013-08-25one change missed by jsging's commit is needed to unbreak the build;Mike Belopuhov
spotted by sthen@
2013-07-10To prevent lock ordering problems with the kernel lock, we need to make sureMark Kettenis
we block all interrupts that can grab the kernel lock. The simplest way to achieve this is to make sure mutexes always raise the ipl to the highest level that has interrupts that grab the kernel lock. This will allow us to have "mpsafe" interrupt handlers at lower priority levels. No change for non-MULTIPROCESSOR kernels. ok matthew@
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-05-16Implement a mechanism to establish interrupt handlers that don't grab theMark Kettenis
kernel lock upon entry through a new IPL_MPSAFE flag/level.
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-17Swap arguments to wdog_register() since it is nicer, and prepareTheo de Raadt
wdog_shutdown() for external usage.
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-25Make sure we send MSIs to the primary CPU like we do on amd64.Stuart Henderson
This is a fixed version reinstating the previous commit, fix from Christian Ehrhardt, same fix from brad@.
2012-09-22revert previous, breaks the treeStuart Henderson
2012-09-21Make sure we send MSIs to the primary CPU like we do on amd64.Mark Kettenis
Based on a diff from Christian Ehrhardt.
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
2012-08-16we are past the point where timecounters may disappearTed Unangst
ok miod
2012-01-13handle m_copyback errors, this code is too sensitive for suchMike Belopuhov
failures to be neglected; ok markus
2011-12-04Slightly different fix for the problem fixed by the previous commit for betterMark Kettenis
diffability with the amd64 codebase.
2011-12-04Do not check for an HyperTransport bus if we are using mode #2. Prevents aMiod Vallat
safety panic from occuring. Found the hard way by nick@
2011-10-23Remove comment; the question can be answerd affirmative. Fix a coding styleMark Kettenis
nit while I'm there.
2011-10-21Add bounds checks for access to mp_busses. Also make sure that we don'tMark Kettenis
accidentally use ISA or EISA interrupt mappings on PCI busses. ok jsg@
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-10-10Introduce pci_probe_device_hook(pci_chipset_tag_t, struct pci_attach_args *).Miod Vallat
This mandatory function will get invoked in pci_probe_device(), and allows a pci host driver to alter the pci_attach_args passed to a device when attaching. This function will also, if returning non-zero, cause the device to be skipped completely during all the phases of the PCI device discovery (i.e. ressource enumeration, ressource assignment, and actual attachment). This particular feature is experimental and might be reverted in the future (or the scope narrowed to device attachment only). A dummy #define pci_probe_device_hook() 0 is added to all platforms except sgi, where real functions (currently only returning 0) are added; real meat will be added shortly. Discussed at s2k11, no objection from the usual suspects.
2011-06-08Ateempt to make pci_intr_disestablish() work for MSIs.Mark Kettenis
ok deraadt@
2011-05-30Enable MSI on selected hardware. For now this means:Mark Kettenis
- Intel chipset supporting Pentium 4 or later. - Any AMD chipset made in this century. - Any NVIDIA chipset that has PCIe. 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 supporting Message Signaled Interrupts on i386. Still work inMark Kettenis
progress. The code is effectively disabled as long as PCI_FLAGS_MSI_ENABLED doesn't get set for the root PCI bus.
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-01-12use explicit_bzero() for the session, in drivers where struct sessionTheo de Raadt
contains key material (note, that is not true in all drivers... hence not always neccessary) discussed with mikeb