Home | History | Annotate | Download | only in include
History log of /src/sys/arch/x86/include/pci_machdep_common.h
RevisionDateAuthorComments
 1.25  01-Aug-2020  jdolecek move __HAVE_PCI_MSI_MSIX to <x86/pci_machdep_common.h>
 1.24  25-Apr-2020  bouyer Merge the bouyer-xenpvh branch, bringing in Xen PV drivers support under HVM
guests in GENERIC.
Xen support can be disabled at runtime with
boot -c
disable hypervisor
 1.23  11-Jul-2016  knakahara branches: 1.23.28;
pci_intr_type() is required pci_chipset_tag_t argument by other than x86.

pointed out by nonaka@n.o.
 1.22  22-Oct-2015  knakahara add pci_intr_alloc related stubs to reduce ifdef from device drivers.
 1.21  17-Aug-2015  knakahara Add kernel code to support intrctl(8).
 1.20  13-Aug-2015  msaitoh - Don't take pci_attach_args as an argument in pci_msi[x]_count().
- Move prototypes of pci_msi[x]_count() from x86/x86/pci_machdep_common to
sys/dev/pci/pcivar.h.
- Move pci_msi[x]_count() from x86/pci/pci_msi_machdep.c to sys/dev/pci/pci.c
 1.19  21-Jul-2015  knakahara add pci_intr_alloc() API
 1.18  15-May-2015  knakahara pci_msi_string() must be used by MD code only.
 1.17  15-May-2015  knakahara unify INTx, MSI and MSI-X APIs without alloc. (alloc API is under discussion)
 1.16  08-May-2015  knakahara add a const qualifier to struct pci_attach_args *pa argument
 1.15  27-Apr-2015  knakahara add x86 MD MSI/MSI-X support code.
 1.14  27-Apr-2015  knakahara add pci_intr_distribute(9) for x86.
 1.13  29-Mar-2014  christos branches: 1.13.6;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.12  31-Jul-2013  soren Blocking memory space accesses on the SIS 85C496 chipset turned out to be
a bit too heavy-handed and similar cases are unlikely to crop up again,
so simplify by eliminating pci_bus_flags().

Closes PR port-i386/20410.
 1.11  09-Dec-2012  jakllsch branches: 1.11.2;
Reflect that this file is now for the x86 ports and not just i386 in comments.
 1.10  09-Dec-2012  jakllsch Remove trailing whitespace on blank lines.
 1.9  15-Jun-2012  yamt branches: 1.9.2;
comment
 1.8  28-Aug-2011  dyoung branches: 1.8.2;
Add some code for grovelling in the PCI configuration space for all
of the memory & I/O space reserved by the PCI BIOS for PCI devices
(including bridges) and recording that information for later use.

The code takes between 13k and 50k (depends on the architecture and,
bizarrely, the kernel configuration) so I am going to move it from
pci_machdep.c into its own module on Monday.
 1.7  01-Aug-2011  drochner add an experimental implementation of PCI MSIs (Message Signaled
Interrupts). Successfully tested with hdaudio and "wpi" wireless
ethernet.
notes:
-There seem to be buggy chips around which announce MSI support
but don't correctly implement it. Thus the final word whether MSIs
can be used should be by the driver.
-Only a single vector is supported. For multiple vectors, the IDT
allocation code would have to be changed. (And we would possibly
run into problems due to the limited number of vectors supported
by the current code.)
-The code is "#if NIOAPIC > 0" because it uses the ioapic_edge
interrupt stubs. These actually don't touch any ioapic, so this
is somewhat a misnomer.
-MSIs can't be identified by a "pin" but only by a cpu/vector
pair. Common intr code soesn't deal well with this yet.
-Drivers need to take care of saving/restoring MSI data in the device's
config space on suspend/resume.
 1.6  04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.5  06-Nov-2010  jakllsch branches: 1.5.2;
Unbreak Xen build, while not actually fixing the real problem.
NetBSD/xen doesn't implement disestablishing interrupts yet.
 1.4  06-Nov-2010  jakllsch Implement pciide_machdep_compat_intr_disestablish() to help enable
detachment of compatibility-mapped pciide(4)-family controllers.
 1.3  28-Apr-2010  dyoung branches: 1.3.2; 1.3.4; 1.3.6;
Provide an x86 implementation of pci_chipset_tag_create(9) and
pci_chipset_tag_destroy(9).
 1.2  20-Mar-2010  dyoung Add a prototype for pci_mmio_range_infer() that will infer the
range of memory forwarded by the host chipset to PCI.
 1.1  14-Mar-2010  dyoung branches: 1.1.2;
Add a new member, pc_super, to x86's pci_chipset_tag: pc.pc_super points
to the tag that pc inherits its behavior from. Add code to deal with
pc.pc_super.

Pull identical declarations out of xen/include/pci_machdep.h and
x86/include/pci_machdep.h into x86/include/pci_machdep_common.h.
 1.1.2.3  21-Apr-2011  rmind sync with head
 1.1.2.2  05-Mar-2011  rmind sync with head
 1.1.2.1  30-May-2010  rmind sync with head
 1.3.6.5  27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.3.6.4  02-May-2011  jym Sync with head.
 1.3.6.3  10-Jan-2011  jym Sync with HEAD
 1.3.6.2  24-Oct-2010  jym Sync with HEAD
 1.3.6.1  28-Apr-2010  jym file pci_machdep_common.h was added on branch jym-xensuspend on 2010-10-24 22:48:16 +0000
 1.3.4.2  11-Aug-2010  yamt sync with head.
 1.3.4.1  28-Apr-2010  yamt file pci_machdep_common.h was added on branch yamt-nfs-mp on 2010-08-11 22:52:55 +0000
 1.3.2.3  09-Nov-2010  uebayasi Sync with HEAD.
 1.3.2.2  30-Apr-2010  uebayasi Sync with HEAD.
 1.3.2.1  28-Apr-2010  uebayasi file pci_machdep_common.h was added on branch uebayasi-xip on 2010-04-30 14:39:57 +0000
 1.5.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.8.2.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.2.2  16-Jan-2013  yamt sync with (a bit old) head
 1.8.2.1  30-Oct-2012  yamt sync with head
 1.9.2.3  03-Dec-2017  jdolecek update from HEAD
 1.9.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.2.1  25-Feb-2013  tls resync with head
 1.11.2.2  18-May-2014  rmind sync with head
 1.11.2.1  28-Aug-2013  rmind sync with head
 1.13.6.4  05-Oct-2016  skrll Sync with HEAD
 1.13.6.3  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.13.6.2  22-Sep-2015  skrll Sync with HEAD
 1.13.6.1  06-Jun-2015  skrll Sync with HEAD
 1.23.28.1  16-Apr-2020  bouyer More #ifndef XEN -> #ifndef XENPV

RSS XML Feed