summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/pci
AgeCommit message (Collapse)Author
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-04-04Remove an unused function inherited from NetBSD that deals with a brokenMark Kettenis
SiS chipset that we'll never see on and amd64 machine. ok oga@
2009-04-04Remove unused #include.Mark Kettenis
2009-03-31bzero pci attach argsMark Kettenis
2009-03-11Attach iommu on AMD family 10h processors (e.g. phenom) too.Owain Ainsworth
11h (Turion) still needs testing, so isn't part of this commit. ok reyk@, marco@
2009-03-10First step in cleaning up amd64 iommu.Owain Ainsworth
Firstly, don't keep identical data for each of the GARTs (we keep them in sync, but there is one per cpu socket), all that varies is the pci_tag_t, so just keep an array of those and have the rest of the information once. Secondly, don't keep the softc as a global, use the _cookie field of the dmatag_t, that's what it's there for. Finally, use dmamap_map to map the page tables, instead of the direct NC map. This is because later changes to support PAT will be a lot easier with one direct map (where we change the cacheability if needed), since otherwise it's just asking for illegal cache aliases. More changes will be upcoming. Tested by a few people, with an without bigmem, thanks to those. weingart@ liked the direction this is going, marco@ and kettenis@ oked it.
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@.
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-06cvs wouldn't let me check this in beforeTed 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-26Change pci_intr_handle_t to be like i386 where it is a struct that stores theMark Kettenis
tag and pin. Reduces the differences between the two architectures and I need it to fix acpiprt(4)-based interrupt routing. ok toby@, jordan@
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-09-26Attach agp(4) to the Intel Q35 integrated video.Mike Belopuhov
Tested on ASUS P5E-VM DO motherboard. ok oga
2008-07-07Add AGP and hostbridge support for the Intel 82945GME chipset.Bernd Ahlers
ok jsg@
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-05Allow pchb(4) to find additional non-coherent HyperTransport linksBrad Smith
with 10h and 11h families of AMD CPU's. ok kettenis@
2008-04-28Sync PCI ids.Brad Smith
2008-04-24oops. unbreak build by removing the #include for amd8131reg.hThordur I. Bjornsson
2008-04-24move the register defines from amd8131reg.h into aapi.c,Thordur I. Bjornsson
seems silly to have a seperate .h file for 4 defines. nuke the NetBSD __KERNEL_RCSID macro while there, we have that rcsid at the top of the file... ok toby@, brad@
2008-03-23Add AGP support for the Intel G33 chipset.Damien Bergamini
Tested on i386 with a Gigabyte G33M-DS2R motherboard (Intel GMA 3100). Based on NetBSD code. ok oga@
2008-03-16Make agp(4) attach at vga(4) instead of pchb(4). This is because sometimesOwain Ainsworth
agp and drm need to use the same memory mapping, the best way to deal with that is to allow them to share (that's coming later), for this to work cleanly we move the attach point of agp. Ideally most agp drivers would attach at pchb, with only agp_i810 (and any that work similarly) attaching at vga, but this will do for now. ok kettenis@, miod@.
2008-01-04Clean up Intel host bridge PCI IDs.Mark Kettenis
ok deraadt@
2007-12-18pass pci domain to the child too, ok kettenisTheo de Raadt
2007-11-27Unify amd64 and i386 code further; ok oga kettenisTheo de Raadt
2007-11-26First step towards unifying pchb between i386 and amd64Theo de Raadt
Light testing, mostly mechanical
2007-11-26correct newlines surrounding the sub-bus configuration, and unifyTheo de Raadt
pchb's further ok reyk oga
2007-11-26fix new agp code on amd64Reyk Floeter
- internal intel graphics semi-agp chipsets need special handling in pchb.c - re-add the i965GM device - use the correct major device id for /dev/agp0 on amd64 (not the i386 one) ok deraadt@
2007-11-25Make agp attach as a device. This means that many more agp bridgesOwain Ainsworth
actually get detected and attached. Also adds a kernel api for manipulating agp. Enable this on i386 and amd64. "I think you should commit it" deraadt@, ok matthieu. Looked over by several others.
2007-11-16Remove microtime calls and RNG benchmarking from the pchb attachmentMike Belopuhov
code. This is due to the fact that we do timecounter initialization after autoconf(9). ok deraadt
2007-09-17MALLOC/FREE -> malloc/free and M_ZERO changesCharles Longeau
ok krw@
2007-08-08Prevent a potential null-pointer dereference.Mark Kettenis
ok krw@, deraadt@
2007-08-04Add AGP support for the intel i965 chipset, this also extends theReyk Floeter
internal AGP API to work with 64bit PCI-Express memory and non-standard AGP aperture bases. tested by many ok matthieu@, deraadt@
2007-07-04fix dmesg formatting error when hardware random number generator is presentChris Kuethe
"Yes" deraadt
2007-06-03if the 915gm didn't work on i386, it's worrisome here too. remove it.Ted Unangst
2007-06-01never attempt to tweak a file just before commitTed Unangst
2007-05-31intel pchb rnd support, from i386Ted Unangst
ok deraadt
2007-05-29only the i810 is known to be needed for agp, reduce driver set to just thatTed Unangst
2007-05-27be more agressive on invalidation; perform invalidates on load* and unloadJason Wright
2007-05-27remove two TODO items:Jason Wright
- map the GART page table uncached - disable table walk probes
2007-05-21Implement deep interrupt swizzling by mapping all four PCI interrupt pinsMark Kettenis
for PCI-PCI bridges and passing the mapping to the attached bus device. MD code can use these when mapping PCI device interrupts. This diff adds such code for amd64 and i386. This fixes interrupt mapping for devices that sit behind two PCI-PCI bridges where the firmware only provides a mapping for the first PCI-PCI bridge. tested by sturm@, krw@, and a few others, ok deraadt@
2007-05-19(disabled) option for PCIAGP. at least lets i945 chipsets workTed Unangst
ok dim
2007-02-09simplify the argument passing (use a pointer to bus_dma_segment_t insteadJason Wright
of separate addr/len pairs).
2007-02-09according to the errata, invalid pages shouldn't be used. Always makeJason Wright
sure a page is mapped at every location (a page is already reserved for just this occaision). And no, this doesn't fix it.
2007-01-15ansi/deregisterJonathan Gray