summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci
AgeCommit message (Collapse)Author
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-21Read revision from the correct MSR; no functional change.Miod Vallat
2010-02-19Move auglx(4) from i386-only land to MI land.Miod Vallat
(auglx.c is not modified in this commit yet, only moved around)
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.
2010-01-10Fix two bugs in IPsec/HMAC-SHA2:Markus Friedl
(1) use correct (message) block size of 128 byte (instead of 64 bytes) for HMAC-SHA512/384 (RFC4634). (2) RFC4868 specifies that HMAC-SHA-{256,384,512} is truncated to nnn/2 bits, while we still use 96 bits. 96 bits have been specified in draft-ietf-ipsec-ciph-sha-256-00 while draft-ietf-ipsec-ciph-sha-256-01 changed it to 128 bits. WARNING: this change makes IPsec with SHA-256 (the default) incompatible with older OpenBSD versions and other IPsec-implementations that share this bug. ok+tests naddy, fries; requested by reyk/deraadt
2009-11-23pchb must walk children tooTheo de Raadt
2009-10-31s/Mhz/MHz/, MHz is a multiple of the SI unit hertz (whose symbol is Hz).Igor Sobrado
2009-10-30correct interrupt status bits; patfbsd@davenulle.orgTheo de Raadt
2009-10-06Allow MD limits for allocating PCI io and mem space and specify limits onMark Kettenis
i386 and amd64 to make avoid legacy ISA I/O registers. Fixes issues with ThinkPad T-series Dock II units as reported by sobrado@ ok miod@
2009-10-05wrap an annoying long line (like amd64)Theo 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-08-05timeout_add -> timeout_add_msecBret Lambert
ok markus@
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@
2009-06-06add an interface to agp to create a bus_dma_tag over a range of theOwain Ainsworth
aperture, which will take your memory, bind it to agp, and return you the aperture address. It's essentially the same as iommu on amd64 in the way it works. This will be used by the upcoming (works but is slow and will not be enabled at first) drm memory management code for intel igp chipsets. Right now the sync function for intagp is really slow (doing a wbinvd() on every sync), this is in the process of getting fixed, but the size of the diffs in my trees was getting silly.
2009-06-06option X86EMU is how this subsystem is brought into a kernelTheo de Raadt
2009-06-06fix include pathsTheo de Raadt
2009-06-06Add vga bios repost support. Fetched from the NetBSD tree mostly.Paul Irofti
Tested on multiple i386 and it works, amd64 works also with a few exceptions that will get fixed. The initial effort of importing was done by oga@, thanks! Lots of testing and debugging by mlarkin@ and me. Okay deraadt@, oga@, mlarkin@.
2009-05-18Add missing breaks so we don't fallthrough intoJonathan Gray
unwanted matching logic. ok oga@ deraadt@ miod@
2009-04-29Extend pciio extents to cover the while 32-bit address space. The processorMark Kettenis
can only address the first 64K but BARs can contain garbage and addresses beyond the end of the extent would cause a panic.
2009-04-13Ignore zero-sized regions from the BIOS memory map when reserving root PCIMark Kettenis
bus address space. Fixes a problem reported by david@.
2009-04-11Create extents for resource accounting on the root PCI bus and populate themMark Kettenis
based on the BIOS memory map.
2009-04-11There is no support for building multi-socket machines in AMD Family 11hMark Kettenis
processors, so the registers to configure addition HyperTransport links are absent. Don't try attaching addition pci busses on these processors to avoid probing non-existant registers.
2009-03-31bzero pci attach argsMark Kettenis
2009-03-29make various strings ("can't map mem space" and similar) more consistentStuart Henderson
between instances, saving space in the kernel. feedback from many (some incorporated, some left for future work). ok deraadt, kettenis, "why not" miod.
2009-03-10remove the _BUS_DMA_PRIVATE define from amd64 and i386.Owain Ainsworth
a define needed to get to ``private'' functions that needs to be defined 5 or more times isn't much use and may cause namespace issues anyway. Other archs will probably follow. Discussed in portugal. "Hell yes" weingart@, ok kettenis@, no objections miod@
2009-01-27Switch the amd64 PCI_CONF_LOCK from being a simplelock and splhigh to aOwain Ainsworth
mutex with ipl set to IPL_HIGH. While i'm here, unify the code with i386, by giving the same lock to the i386 code. This lock is mostly for MP, but could actually prevent a race where a process is doing pci_conf_{read,write}, and then an interrupt fire and also does pci_conf_{read,write}. Since this is a two stage process, the interrupt could race with the one, causing the value to the written to the wrong place, or the wrong value to be written. Tested by many. "go ahead" kettenis@.
2009-01-14int cpuspeed is global. ok markus@Alexander Yurchenko
2009-01-13Trivial lvalue abuse fixes, no binary changes.Alexander Yurchenko
ok millert@ tedu@
2009-01-04Add support for CS5535 IDE adapted from the gcscide code in NetBSDJonathan Gray
originally written by Juan Romero Pardines. Thanks to Lars Kotthoff for testing on a HeroLogic HL-463 system. Because the CS5535 doesn't provide SMM emulated PCI access to set DMA/PIO modes or a real PCI IDE controller we have to resort to making MSR calls. As this is very MD specific, hide most of uglyness away in i386 MD pciide code. ok grange@
2008-12-28Remove confusion between "raw" and "swizzled" interrupt pins. Remove someMark Kettenis
#ifdef __i386__ code that can go now things have been cleaned up.
2008-12-07Make acpiprt(4) check whether the current interrupt routing is "possible" andMark Kettenis
pick a new one from the list of possible routings if it isn't or if a pin is currently not routed. Delay re-routing interrupts until we establish a handler for it. This prevents us from messing with unused interrupt pins which may have fatal consequences (some machines spontaniously reboot). The heuristics for picking an interrupt from the list of possibe ones probably needs some tweaking still, but this makes several NVIDIA-based boards work much better than before. tested by many, ok marco@
2008-12-06revert all changes related to the mpsafe intr handler. i screwed up the commitTed Unangst
and even then it didn't work. we have higher standards than this.
2008-12-06some more trouble where i failed to account for oga's diffTed Unangst
2008-12-03Remove the x86 and i386 prefixes to the bus_dma types. It's really quiteOwain Ainsworth
pointless and just makes the code different for no reason. This moves i386 and amd64 bus_dma to being a lot closer to identical. suggestion to just remove the prefix instead of merge them from deraadt@. no objections art@, kettenis@, ok weingart@
2008-11-09Rework that way that agp attaches.Owain Ainsworth
previously, we had a static list of pcidevs and which agp driver would be interanlly attached. Instead, split the agp drivers so they work like audio(4), where we attach a driver, which sets up some callbacks and initial state, then attaches the interface (agp(4)). Since this allows us to attach different drivers in different places, and give them /proper/ probe functions move most of the drivers back to attaching at pchb, where they should, and intagp (formerly agp_i810) stays attaching at vga, since it's part of the intel integrated graphics chips. Diff shrinks the kernel slightly, gets rid of the annoying "no integrated graphics" warning, and allows more cleanup later. Tested by many. fix for alpha build (the only other vga_pci.c consumer) suggested by miod.
2008-10-25audio(9) says low level drivers are allowed to change the requestedJacob Meuser
values of the audio_params structure during AUDIO_SETINFO if the hardware cannot be set to exactly the requested mode. some drivers do this sometimes. others always return EINVAL if there isn't an exact match. be more consistent. only return EINVAL if an absurd parameter was requested, otherwise return a supported set of parameters, as close as possible to what was requested. with/ok ratchov@
2008-09-26Attach agp(4) to the Intel Q35 integrated video.Mike Belopuhov
Tested on ASUS P5E-VM DO motherboard. ok oga
2008-09-19AES with keysize != 128 bit is not supported in hardware, so we needMarkus Friedl
to switch to the software implementation; ok hshoexer, tom
2008-07-09Simplify the match function a bit by just returning the result fromBrad Smith
pci_matchbyid(). This is the only driver that will match against this hardware so it is not necessary to return a higher priority than what pci_matchbyid() returns. ok mbalmer@
2008-07-07Add AGP and hostbridge support for the Intel 82945GME chipset.Bernd Ahlers
ok jsg@
2008-06-27More removal of clauses 3 and 4 from NetBSD licenses.Ray Lai
OK deraadt@ and millert@
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-06-25Support the Intel G35 which apparently works similarly to the 965.Owain Ainsworth
Initial information, half the diff, and testing from Andrew Lutomirski, thanks!
2008-06-25auglx(4) is an audio(4) driver for the AC'97 audio codec found onMarc Balmer
some AMD Geode LX systems with CS5536 companion chip. It works similar to auich(4) and auixp(4), but the hardware dependent parts are quite different. Tested with various PC-Engines ALIX boards (1B, 3C3) and a WebDT 186 board. feedback many, ok deraadt & jmc (documentation)
2008-06-11When reading a GPIO pin, first determine if it is programmed for inputMarc Balmer
or output and then read the value from either the GPIO[x]_READ_BACK or GPIO[x]_OUT_VAL register. This allows to read back LED (output) states as well as input states (buttons). Problem noticed by Rolf Sommerhalder, fix by me.
2008-06-09rename arc4random_bytes => arc4random_buf to match libc's nicer name;Damien Miller
ok deraadt@