]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r340599-r340601
authorJayachandran C. <jchandra@FreeBSD.org>
Wed, 18 Sep 2019 07:16:00 +0000 (07:16 +0000)
committerJayachandran C. <jchandra@FreeBSD.org>
Wed, 18 Sep 2019 07:16:00 +0000 (07:16 +0000)
commit414858e3ea437691a220873d55a5c8a892653569
treecbf8459f70f73cba7c53d9c3b77be41f1122bc92
parent8e0e405509b3c6fc60a570e4b1ea6509597eb6d6
MFC r340599-r340601

r340599:
acpica, pci_host_generic_acpi: redo pci_host_generic_acpi.c

This is a major update for pci_host_generic_acpi.c, the current
implementation has some gaps that are better fixed up in one go.
The changes are to:
 * Follow x86 method of not adding PCI resources to PCI host bridge in
   ACPI code. This has been moved to pci_host_generic_acpi.c, where we
   walk thru its resources of the host bridge and add them.
 * Fixup code in pci_host_generic_acpi.c to read all decoded ranges
   and update the 'ranges' property. This allows us to share most of
   the code with generic implementation (and the FDT one).
 * Parse and setup IO ranges and bus ranges when walking the resources
   above. Drop most of the changes related to this from acpica code.
 * Add the ECAM memory area as mem resource 0. Implement the logic to
   get the ECAM area from MCFG (using bus range which we now decode),
   or from _CBA (using _BBN/bus range). Drop aarch64 ifdefs from acpica
   code which did part of this.
 * Switch resource activation to similar code as FDT implementation,
   this can be moved into generic implementation in a later pass.
 * Drop the mechanism of using the 7th bit of bus number as the domain,
   this is not correct and will work only in very specific cases. Use
   _SEG as PCI domain and use the bus ranges of the host bridge to
   provide start bus number.

This commit should not make any functional change to dev/acpica/acpi.c
for other architectures, almost all the changes there are to revert
earlier additions in this file done for aarch64.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D17791

r340600:
pci_host_generic, acpi_resource: drop unneeded code

Now that we are handling PCI resources in pci_host_generic_acpi.c, we
don't need these change (made by r336129)

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D17792

r340601:
pci_host_generic : move activate/release to generic code

Now that the ACPI and FDT implementations for activating and
deactivating resources are the same, we can move it to
pci_host_generic.c.  No functional changes.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D17793
sys/dev/acpica/acpi.c
sys/dev/acpica/acpi_resource.c
sys/dev/pci/pci_host_generic.c
sys/dev/pci/pci_host_generic_acpi.c
sys/dev/pci/pci_host_generic_fdt.c