The NetBSD Project

CVS log for src/sys/dev/acpi/acpi_mcfg.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / acpi

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.26 / (download) - annotate - [select for diffs], Fri Oct 14 22:10:15 2022 UTC (3 months, 3 weeks ago) by jmcneill
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.25: +89 -72 lines
Diff to previous 1.25 (colored)

Add a PCI resource manager and use it on Arm ACPI platforms.

The Arm ACPI code relied on PCI_NETBSD_CONFIGURE to configure devices that
were not enabled by system firmware. This is not safe to do unless the
firmware explicitly permits it using a device specific method defined in
the PCI firmware spec.

Introduce a new PCI resource manager that discovers what has already been
configured by firmware and allocates from the remaining space. This will
ensure that devices setup by firmware are untouched and only will program
BARs of devices that are not enabled at boot time.

The current implementation assumes that the parent PCI-PCI bridge's
are already configured. A worthwhile improvement in the future would be
to support programming windows for bridges that are not fully configured.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Feb 27 14:19:07 2022 UTC (11 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.24: +2 -7 lines
Diff to previous 1.24 (colored)

acpi: Nix conditional pci_get_segment use.

New MI default of 0 serves.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Aug 7 21:19:15 2021 UTC (17 months, 4 weeks ago) by jmcneill
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

acpi: expose acpimcfg_configure_bus_cb

Revision 1.20.2.2 / (download) - annotate - [select for diffs], Sat Apr 3 22:28:43 2021 UTC (22 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.20.2.1: +4 -4 lines
Diff to previous 1.20.2.1 (colored) next main 1.21 (colored)

Sync with HEAD.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Jan 26 15:30:05 2021 UTC (2 years ago) by skrll
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

Trailing whitespace

Revision 1.22 / (download) - annotate - [select for diffs], Tue Jan 26 15:29:41 2021 UTC (2 years ago) by skrll
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

KNF

Revision 1.20.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:38:05 2020 UTC (2 years, 1 month ago) by thorpej
Branch: thorpej-futex
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored)

Sync w/ HEAD.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Dec 6 12:47:12 2020 UTC (2 years, 2 months ago) by jmcneill
Branch: MAIN
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored)

Fix typo in comment

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jul 7 03:38:48 2020 UTC (2 years, 7 months ago) by thorpej
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.19: +28 -71 lines
Diff to previous 1.19 (colored)

Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
  Provide a new resource provider API:

  ==> pciconf_resource_init() -- Initialize a PCI configuration resources
      container.
  ==> pciconf_resource_add() -- Add a PCI configuration resource to the
      container (I/O, MEM, or prefetchable MEM).  Multiple resources of
      each type may be added.
  ==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
      container once the bus has been configured.

  This is much easier to use than the previous method of providing an
  extent map for each kind of resource, and works better for e.g. ACPI
  platforms that provide potentially multiple PCI resources in tables
  provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
  rather than extent maps.

Revision 1.6.2.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:15 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.6.2.3: +2 -2 lines
Diff to previous 1.6.2.3 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

Sync with HEAD

Revision 1.18.4.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:02 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

Sync with HEAD

Revision 1.19 / (download) - annotate - [select for diffs], Mon Apr 13 12:08:05 2020 UTC (2 years, 9 months ago) by jmcneill
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

Work around a compiler issue when building on aarch64 with KUBSAN.

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:18 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.6.2.2: +2 -2 lines
Diff to previous 1.6.2.2 (colored) to branchpoint 1.6 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:02 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.6.2.1: +27 -2 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored)

Merge changes from current as of 20200406

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:07 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.17: +27 -2 lines
Diff to previous 1.17 (colored) next main 1.18 (colored)

Sync with head.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Feb 2 16:31:25 2020 UTC (3 years ago) by jmcneill
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3
Branch point for: bouyer-xenpvh
Changes since 1.17: +27 -2 lines
Diff to previous 1.17 (colored)

Add acpimcfg_conf_valid helper for pcie controllers with nonstandard
config space layouts.

Revision 1.16.4.1 / (download) - annotate - [select for diffs], Tue Oct 15 19:30:50 2019 UTC (3 years, 3 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored) next main 1.17 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #333):

	sys/dev/acpi/acpi_mcfg.c: revision 1.17

The MCFG base address field is the physical address of the base of mmio
space relative to bus 0, not the start bus number specified in the table
entry.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Oct 14 00:15:13 2019 UTC (3 years, 3 months ago) by jmcneill
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored)

The MCFG base address field is the physical address of the base of mmio
space relative to bus 0, not the start bus number specified in the table
entry.

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:05 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.6: +263 -36 lines
Diff to previous 1.6 (colored)

Sync with HEAD

Revision 1.5.2.4 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:47 2018 UTC (4 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.5.2.3: +8 -12 lines
Diff to previous 1.5.2.3 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.16 / (download) - annotate - [select for diffs], Thu Dec 20 19:16:17 2018 UTC (4 years, 1 month ago) by jmcneill
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, netbsd-9-base, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.15: +2 -11 lines
Diff to previous 1.15 (colored)

An ACPI MCFG allocation with start bus number = end bus number is valid,
so do not skip it. An entry like this defines MCFG space for a single bus.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Dec 8 15:02:06 2018 UTC (4 years, 1 month ago) by jmcneill
Branch: MAIN
Changes since 1.14: +4 -3 lines
Diff to previous 1.14 (colored)

acpimcfg_configure_bus_cb can support 16-bit addresses now

Revision 1.14 / (download) - annotate - [select for diffs], Mon Dec 3 05:22:03 2018 UTC (4 years, 2 months ago) by cherry
Branch: MAIN
Changes since 1.13: +6 -2 lines
Diff to previous 1.13 (colored)

Define macro before using it. This macro is used as a compile time
"plugin" mechanism to use various platform specific enumeration
functions. It is currently separately defined for 'native' and XEN,
but the mechanism is not exported globally as it should be.

XXX: fix this.

Revision 1.5.2.3 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:30 2018 UTC (4 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.5.2.2: +19 -9 lines
Diff to previous 1.5.2.2 (colored) to branchpoint 1.5 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.13 / (download) - annotate - [select for diffs], Fri Nov 2 19:51:08 2018 UTC (4 years, 3 months ago) by jmcneill
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

Do not ignore non-zero segment numbers in MCFG if __HAVE_PCI_GET_SEGMENT
is defined.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Nov 2 15:01:18 2018 UTC (4 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.11: +17 -9 lines
Diff to previous 1.11 (colored)

Add support for multiple PCI segments.

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Sat Oct 20 06:58:30 2018 UTC (4 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.5.2.1: +242 -21 lines
Diff to previous 1.5.2.1 (colored) to branchpoint 1.5 (colored)

Sync with head

Revision 1.11 / (download) - annotate - [select for diffs], Fri Oct 19 14:06:13 2018 UTC (4 years, 3 months ago) by jmcneill
Branch: MAIN
CVS Tags: pgoyette-compat-1020
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

Fix table offset when walking MCFG allocation subtables

Revision 1.10 / (download) - annotate - [select for diffs], Wed Oct 17 01:16:23 2018 UTC (4 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.9: +32 -19 lines
Diff to previous 1.9 (colored)

Allow access to PCI configuration space for devices without extended
config support.

ok nonaka@

Revision 1.9 / (download) - annotate - [select for diffs], Mon Oct 15 12:46:43 2018 UTC (4 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

Fix signature for acpimcfg_configure_bus in non-PCI_NETBSD_CONFIGURE case

Revision 1.8 / (download) - annotate - [select for diffs], Mon Oct 15 10:01:32 2018 UTC (4 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.7: +209 -2 lines
Diff to previous 1.7 (colored)

Add acpimcfg_configure_bus, which can be used by MD code to implement
PCI_NETBSD_CONFIGURE using ACPI MCFG tables.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Oct 13 13:32:50 2018 UTC (4 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.6: +3 -2 lines
Diff to previous 1.6 (colored)

acpimcfg_scan_bus: Assign the pci_softc's sc_pc to the passed in PCI
chipset tag -- pci_enumerate_bus depends on this being initialized. This
happened to work on x86 because the pci_* md code allows for NULL pc.

Revision 1.4.10.1 / (download) - annotate - [select for diffs], Sun Apr 8 06:06:07 2018 UTC (4 years, 10 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.4: +4 -3 lines
Diff to previous 1.4 (colored) next main 1.5 (colored)

Pull up following revision(s) (requested by nonaka in ticket #700):
	sys/dev/acpi/acpi_mcfg.c: 1.6
Change the iteration, to make sure the ACPI_MCFG_ALLOCATION structure we're
reading fits the table we allocated. Linux does the same.
I have a laptop which, for some reason, reports a table size of 62 bytes.
Clearly that's incorrect, it should be 60 (44 + 16). Because of the stray
+2, here the kernel reads past the end of the allocated buffer, hits an
unmapped VA, and panics at boot time. So the laptop can't boot.
Now it boots fine.

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Sat Apr 7 04:12:14 2018 UTC (4 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.5: +4 -3 lines
Diff to previous 1.5 (colored)

Sync with HEAD.  77 conflicts resolved - all of them $NetBSD$

Revision 1.6 / (download) - annotate - [select for diffs], Fri Apr 6 17:30:25 2018 UTC (4 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi
Changes since 1.5: +4 -3 lines
Diff to previous 1.5 (colored)

Change the iteration, to make sure the ACPI_MCFG_ALLOCATION structure we're
reading fits the table we allocated. Linux does the same.

I have a laptop which, for some reason, reports a table size of 62 bytes.
Clearly that's incorrect, it should be 60 (44 + 16). Because of the stray
+2, here the kernel reads past the end of the allocated buffer, hits an
unmapped VA, and panics at boot time. So the laptop can't boot.

Now it boots fine.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Feb 28 05:50:06 2018 UTC (4 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.4: +16 -4 lines
Diff to previous 1.4 (colored)

- Add new PCI quirk PCI_QUIRK_HASEXTCNF and PCI_QUIRK_NOEXTCNF. Some devices'
  extended configuration area may be broken or violate spec. If an extended
  configuration space is strange but it really exist, use PCI_QUIRK_HASEXTCNF.
  If an extended configuration space is plausible to exist but it really
  doesn't exist, use PCI_QUIRK_NOEXTCNF.
- Add PCI_PRODUCT_INTEL_XEOND_MEM_0_TTR_1(0x6fa8) and
  PCI_PRODUCT_INTEL_COREI76K_IMC_0(0x6f68) with PCI_QUIRK_HASEXTCNF. The
  document clearly states they violate spec and it support the extended
  configuration space.

Revision 1.4.16.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:36:58 2017 UTC (5 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.4.16.1: +724 -0 lines
Diff to previous 1.4.16.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

update from HEAD

Revision 1.2.2.3 / (download) - annotate - [select for diffs], Wed Oct 5 20:55:40 2016 UTC (6 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.2.2.2: +27 -3 lines
Diff to previous 1.2.2.2 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Sync with HEAD

Revision 1.4.16.1, Tue Jul 12 09:45:34 2016 UTC (6 years, 6 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.4: +0 -724 lines
FILE REMOVED

file acpi_mcfg.c was added on branch tls-maxphys on 2017-12-03 11:36:58 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jul 12 09:45:34 2016 UTC (6 years, 6 months ago) by hannken
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: tls-maxphys, netbsd-8
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

According to "PCI Express Base Specification Revision 3.0" from
November 10, 2010, section 7.9.1 an Extended Capability header
with value 0:0:0 represents the absence of Extended Capabilities.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jul 12 09:29:32 2016 UTC (6 years, 6 months ago) by hannken
Branch: MAIN
Changes since 1.2: +26 -2 lines
Diff to previous 1.2 (colored)

On an Intel E7520 temporarily disable Enhanced Config Access error
detection and reporting during bus scan.

Fixes PR kern/51251: ACPI device probe raises NMI

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Sun Dec 27 12:09:48 2015 UTC (7 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.2.2.1: +700 -0 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.2.2.1, Sun Oct 11 21:49:22 2015 UTC (7 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.2: +0 -700 lines
FILE REMOVED

file acpi_mcfg.c was added on branch nick-nhusb on 2015-12-27 12:09:48 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Sun Oct 11 21:49:22 2015 UTC (7 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226
Branch point for: nick-nhusb
Changes since 1.1: +5 -2 lines
Diff to previous 1.1 (colored)

add missing debugging attributes

Revision 1.1 / (download) - annotate - [select for diffs], Fri Oct 2 05:22:52 2015 UTC (7 years, 4 months ago) by msaitoh
Branch: MAIN

PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
  if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
  Currently the following extended capabilities are decoded:
   - Advanced Error Reporting
   - Virtual Channel
   - Device Serial Number
   - Power Budgeting
   - Root Complex Link Declaration
   - Root Complex Event Collector Association
   - Access Control Services
   - Alternative Routing-ID Interpretation
   - Address Translation Services
   - Single Root IO Virtualization
   - Page Request
   - TPH Requester
   - Latency Tolerance Reporting
   - Secondary PCI Express
   - Process Address Space ID
   - LN Requester
   - L1 PM Substates
  The following extended capabilities are not decoded yet:
   - Root Complex Internal Link Control
   - Multi-Function Virtual Channel
   - RCRB Header
   - Vendor Unique
   - Configuration Access Correction
   - Multiple Root IO Virtualization
   - Multicast
   - Resizable BAR
   - Dynamic Power Allocation
   - Protocol Multiplexing
   - Downstream Port Containment
   - Precision Time Management
   - M-PCIe
   - Function Reading Status Queueing
   - Readiness Time Reporting
   - Designated Vendor-Specific

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>