Home | History | Annotate | Download | only in fdt
History log of /src/sys/arch/arm/fdt/pcihost_fdt.c
RevisionDateAuthorComments
 1.33  12-Jan-2024  skrll Trailing whitespace.
 1.32  15-Oct-2022  jmcneill Use "non-posted" instead of "strongly ordered" to describe nGnRnE mappings

Rename the following defines:
- _ARM_BUS_SPACE_MAP_STRONGLY_ORDERED to BUS_SPACE_MAP_NONPOSTED
- PMAP_DEV_SO to PMAP_DEV_NP
- LX_BLKPAG_ATTR_DEVICE_MEM_SO to LX_BLKPAG_ATTR_DEVICE_MEM_NP
Rename the following option:
- AARCH64_DEVICE_MEM_STRONGLY_ORDERED to AARCH64_DEVICE_MEM_NONPOSTED
 1.31  06-Sep-2022  skrll pcihost: Track MSI/MSI-X interrupt handlers.

Track the MSI/MSI-X interrupt handlers so that fdtbus_intr_disestablish
doesn't get called for them.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.
 1.30  04-Sep-2022  skrll Revert previous

kern/56994: wm(4) panic on attach in interrupt_distribute, sometimes
 1.29  04-Sep-2022  skrll pcihost: Don't call fdtbus_intr_disestablish for MSI/MSI-X interrupts.

This avoids a KASSERT firing when using 'drvctl -d' on a pci device that
uses MSI/MSI-X interrupts.
 1.28  13-Aug-2022  jmcneill Process "ranges" property even when linux,pci-probe-only is set.

When the linux,pci-probe-only flag is set, we still need to process the
ranges property to determine whether or not to set PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_OKAY flags on the bus.
 1.27  06-Sep-2021  jmcneill Instead of requiring drivers to be explicit about their device memory
mapping requirements, move this decision into the fdt layer. This
introduces a new MD function, fdtbus_bus_tag_create, which is responsible
for returning per-node bus_space handles.
 1.26  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.25  12-May-2021  thorpej branches: 1.25.4;
Pass along our device handle to the PCI bus instance we attach.
 1.24  24-Apr-2021  thorpej branches: 1.24.2; 1.24.4;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.23  27-Jan-2021  thorpej branches: 1.23.2;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.22  27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.21  25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.20  18-Jan-2021  thorpej Remove "struct of_compat_data" and replace its usage with
"struct device_compatible_entry"; they are ABI-compatible.

Fix several "loses const qualifier" bugs encountered during
this conversion.
 1.19  15-Jan-2021  ryo add fdtbus_intr_establish_xname() function
 1.18  10-Oct-2020  jmcneill branches: 1.18.2;
Read the linux,pci-probe-only property from the /chosen node, not the PCI host controller node
 1.17  07-Jul-2020  thorpej 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.
 1.16  14-Jun-2020  chs replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
 1.15  07-Jan-2020  skrll Fix arm __HAVE_PREEMPTION build

__HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP and curcpu is defined as

#define curcpu() lwp_getcpu(_curlwp())
 1.14  07-Jan-2020  skrll oops more KNF
 1.13  07-Jan-2020  skrll KNF
 1.12  28-Dec-2019  jmcneill Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.11  23-Jun-2019  jmcneill branches: 1.11.2;
Use ARM_PCI_INTR_* definitions from pci_machdep.h instead of own copies
 1.10  12-Jun-2019  jmcneill Support configuring ranges where only prefetchable memory is defined
 1.9  12-Jun-2019  jmcneill Enable RK3399 PCIe.
 1.8  28-Feb-2019  jakllsch branches: 1.8.4;
Split up the initialization of pcihost_fdt so we can borrow and override
its innards in an upcoming driver.
 1.7  28-Feb-2019  jakllsch Implement support for IO space, and better-handle both variants of MMIO space.
 1.6  19-Nov-2018  jmcneill Clear PCI_FLAGS_IO_OKAY as we don't support it yet.
 1.5  16-Nov-2018  jakllsch make pcihost_intr_evcnt static, like the other functions
 1.4  16-Nov-2018  jmcneill Add intr_establish_xname support to arm and expose it to intrctl
 1.3  11-Nov-2018  jmcneill Add MSI/MSI-X support.
 1.2  09-Sep-2018  jmcneill branches: 1.2.2;
Take interrupt-map-mask into consideration when mapping PCI interrupts.
 1.1  08-Sep-2018  jmcneill Add FDT generic PCI host controller driver.
 1.2.2.3  26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.2.2.2  30-Sep-2018  pgoyette Ssync with HEAD
 1.2.2.1  09-Sep-2018  pgoyette file pcihost_fdt.c was added on branch pgoyette-compat on 2018-09-30 01:45:38 +0000
 1.8.4.4  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.8.4.3  08-Apr-2020  martin Merge changes from current as of 20200406
 1.8.4.2  10-Jun-2019  christos Sync with HEAD
 1.8.4.1  28-Feb-2019  christos file pcihost_fdt.c was added on branch phil-wifi on 2019-06-10 22:05:53 +0000
 1.11.2.1  29-Dec-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #586):

sys/arch/arm/nvidia/tegra_pcie.c: revision 1.27
sys/arch/aarch64/aarch64/pmap.c: revision 1.57
sys/arch/aarch64/aarch64/locore.S: revision 1.48
sys/arch/aarch64/include/armreg.h: revision 1.29
sys/arch/aarch64/aarch64/pmap.c: revision 1.58
sys/arch/aarch64/aarch64/locore.S: revision 1.49
sys/arch/arm/acpi/acpipchb.c: revision 1.14
sys/arch/aarch64/aarch64/genassym.cf: revision 1.16
sys/arch/arm/acpi/acpi_machdep.c: revision 1.13
sys/arch/aarch64/include/pmap.h: revision 1.27
sys/arch/aarch64/aarch64/genassym.cf: revision 1.17
sys/arch/aarch64/include/pmap.h: revision 1.28
sys/arch/arm/fdt/pcihost_fdtvar.h: revision 1.3
sys/arch/arm/include/bus_defs.h: revision 1.14
sys/arch/aarch64/aarch64/bus_space.c: revision 1.9
sys/arch/arm/fdt/pcihost_fdt.c: revision 1.12
sys/arch/aarch64/conf/files.aarch64: revision 1.15
sys/arch/aarch64/conf/files.aarch64: revision 1.16
sys/arch/arm/rockchip/rk3399_pcie.c: revision 1.9

Enable early write acknowledge for device memory mappings.

Do not use Early Write Acknowledge for PCIe I/O and config space.
 1.18.2.1  03-Apr-2021  thorpej Sync with HEAD.
 1.23.2.1  23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.24.4.1  31-May-2021  cjep sync with head
 1.24.2.1  13-May-2021  thorpej Sync with HEAD.
 1.25.4.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed