summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci
AgeCommit message (Collapse)Author
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
2011-01-11for key material that is being being discarded, convert bzero() toTheo de Raadt
explicit_bzero() where required ok markus mikeb
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-15Bring CBC oracle attack countermeasure from r1.32 of cryptosoft.c toMike Belopuhov
the hardware crypto accelerator land. This fixes aes-ni, via xcrypt, glxsb(4), hifn(4), safe(4) and ubsec(4) drivers. Original commit message by angelos: Don't keep the last blocksize-bytes of ciphertext for use as the next plaintext's IV, in CBC mode. Use arc4random() to acquire fresh IVs per message. with and ok deraadt, ok markus, djm
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-11-20__attribute__((packed)) -> __packed. The ioprbs.c chunk was commented out, andMiod Vallat
uncommenting it is intentional. ok deraadt@
2010-10-14Move glxpcib(4) to MI land unifying the two MD drivers.Paul Irofti
Specific features of the companion chip will be handled in MD land. Okay deraadt@.
2010-09-24Fix bus space mapping bugs for GPIO's and MFGPT's and while at it add properPaul Irofti
defines for the constants used while mapping. Okay miod@, deraadt@.
2010-09-22Fix ramdisks, from Vladimir Kirillov. Thanks!Paul Irofti
2010-09-21save & restore the watchdog configuration when doing suspend/resumeTheo de Raadt
ok pirofti
2010-09-20Write the start of an activate function. QUIESCE should wait for theTheo de Raadt
current crypto operation to finish but doesn't do that yet. The suspend and resume operations assume that SB_GLD_MSR_CTRL gets trashed ok pirofti
2010-09-20Need an activate function to get to sub-devices. Write it by hand sinceTheo de Raadt
we expect some specific register restoration will be needed here later too. ok pirofti
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-08-02correct header file stuff; pointed out by teduTheo de Raadt
2010-08-02needs explicit proc.h; Nathanael RensenTheo de Raadt
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-02remove unused pciaddr_search function.Jonathan Gray
ok kettenis@
2010-07-02m_copyback can fail to allocate memory, but is a void fucntion so gymnasticsBret Lambert
are required to detect that. Change the function to take a wait argument (used in nfs server, but M_NOWAIT everywhere else for now) and to return an error ok claudio@ henning@ krw@