mbox series

[edk2,edk2-platforms,v2,0/7] SynQuacer ACPI support

Message ID 20180228192421.17684-1-ard.biesheuvel@linaro.org
Headers show
Series SynQuacer ACPI support | expand

Message

Ard Biesheuvel Feb. 28, 2018, 7:24 p.m. UTC
This implements ACPI support for the SynQuacer platforms.

Changes since v1:
- improve commit log (#1, #2)
- replace bare numbers with symbolic constants (#2)
- add Leif's R-b (#4)
- add patches #6 and #7

Note that supporting ACPI on this SoC is non-trivial, due to the quirky
DesignWare RCs and the pre-ITS that sits between the PCIe RCs and the GICv3.
However, the most important issue has been addressed by modifying the static
SMMU mapping that sits between the CPUs and the PCIe config space, working
around the ghosting issue that occurs on these RCs, due the complete lack of
type 0 config TLP filtering by the [non-existent] root port. (This was tested
using the 20180226-LB1.1-ACPI-ramfw.bin SCP firmware image, which is not [yet]
installed by default on DeveloperBox hardware)

That leaves the MSI issue, which is worked around by limiting MSI support to a
single RC. In the presented configuration, this is RC #1, which connects to the
x16 slot [and nothing else] on the DeveloperBox PCB. The onboard PCIe devices
(XHCI + SATA) work without problem using wired interrupts only, and so RC #0
has MSI support disabled. This means cards that require MSI support should
be inserted into the x16 slot, which is likely to be the preferred slot in
such cases anwyay (e.g., when using NVME or high end networking plugin cards)

Patch #1 fixes a minor issue in the slot-to-BDF mapping.

Patch #2 modifies the static PCIe window configuration so it can be described
using ACPI as well as DT.

Patch #3 introduces the static ACPI tables that describe the fixed platform
devices and peripherals to the OS.

Patch #4 adds a menu option to the platform driver to make ACPI vs DT user
selectable.

Patch #5 adds support for describing the eMMC controller using a SSDT table
which is only installed if eMMC support is enabled.

Patch #6 adds a _STA method implementation to the PCIe RC devices so that
they are only exposed to the OS when running on a platform that has one of
the several ECAM workarounds enabled. Otherwise, we can still boot via ACPI
using platform devices, but the PCIe RCs are unavailable.

Patch #7 extends the _STA method for PCI0 to take the presence detect GPIO
into account. This is necessary because on the SynQuacer evaluation board,
any attempt to access the device registers will lock up the system if no
card is inserted into the slot.

Note that driver support for the eMMC and network controller only landed in
v4.15, but when using a SATA driver and a plugin network card that does have
driver support, these patches should allow the SynQuacer based platforms to
boot stock Debian Stretch/Fedora/Centos etc installers.

Ard Biesheuvel (7):
  Platform/Socionext/DeveloperBox: fix PCIe slot to B/D/F mapping
  Silicon/SynQuacer: tweak PCI I/O windows for ACPI/Linux support
  Silicon/SynQuacer: add ACPI drivers and tables
  Silicon/SynQuacer/PlatformDxe: add option to enable ACPI mode
  Silicon/SynQuacer/PlatformDxe: add ACPI description of eMMC
  Silicon/SynQuacer/AcpiTables: disable PCI RCs if ECAM ghosts are
    detected
  Silicon/SynQuacer/AcpiTables: take presence detect of PCI0 into
    account

 Platform/Socionext/DeveloperBox/DeveloperBox.dsc                                                     |   2 +
 Platform/Socionext/DeveloperBox/DeveloperBox.fdf                                                     |  14 +
 Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc                                         |   2 +
 Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf                                         |  14 +
 Silicon/Socionext/SynQuacer/Acpi.dsc.inc                                                             |  48 +++
 Silicon/Socionext/SynQuacer/AcpiTables/AcpiSsdtRootPci.asl                                           | 317 ++++++++++++++++++++
 Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.h                                                  |  73 +++++
 Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf                                                |  65 ++++
 Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl                                                      | 187 ++++++++++++
 Silicon/Socionext/SynQuacer/AcpiTables/Fadt.aslc                                                     |  91 ++++++
 Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc                                                     |  93 ++++++
 Silicon/Socionext/SynQuacer/AcpiTables/Iort.aslc                                                     | 101 +++++++
 Silicon/Socionext/SynQuacer/AcpiTables/Madt.aslc                                                     | 182 +++++++++++
 Silicon/Socionext/SynQuacer/AcpiTables/Mcfg.aslc                                                     |  63 ++++
 Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc                                                     | 128 ++++++++
 Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi                                                |   2 +-
 Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.asl                                             |  41 +++
 Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c                                               |  55 ++++
 Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c                                        |  32 +-
 Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.h                                        |   4 +
 Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf                                      |   5 +
 Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxeHii.uni                                   |   8 +-
 Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxeHii.vfr                                   |  10 +-
 Silicon/Socionext/SynQuacer/Include/Platform/Pcie.h                                                  |  22 +-
 Silicon/Socionext/SynQuacer/Include/Platform/VarStore.h                                              |   8 +-
 Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c |   4 +-
 26 files changed, 1546 insertions(+), 25 deletions(-)
 create mode 100644 Silicon/Socionext/SynQuacer/Acpi.dsc.inc
 create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/AcpiSsdtRootPci.asl
 create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.h
 create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf
 create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl
 create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Fadt.aslc
 create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc
 create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Iort.aslc
 create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Madt.aslc
 create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Mcfg.aslc
 create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc
 create mode 100644 Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.asl

-- 
2.11.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Leif Lindholm Feb. 28, 2018, 8:21 p.m. UTC | #1
So, on the whole, I'm happy with this series.

Some of the .asl looks to me like it could be made more readable with
some additional #defines, but I may be oversimplifying. But I'd like
someone with more ACPI experience to give an R-b for 3,5-7.

With that provision, for the series:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>



On Wed, Feb 28, 2018 at 07:24:14PM +0000, Ard Biesheuvel wrote:
> This implements ACPI support for the SynQuacer platforms.

> 

> Changes since v1:

> - improve commit log (#1, #2)

> - replace bare numbers with symbolic constants (#2)

> - add Leif's R-b (#4)

> - add patches #6 and #7

> 

> Note that supporting ACPI on this SoC is non-trivial, due to the quirky

> DesignWare RCs and the pre-ITS that sits between the PCIe RCs and the GICv3.

> However, the most important issue has been addressed by modifying the static

> SMMU mapping that sits between the CPUs and the PCIe config space, working

> around the ghosting issue that occurs on these RCs, due the complete lack of

> type 0 config TLP filtering by the [non-existent] root port. (This was tested

> using the 20180226-LB1.1-ACPI-ramfw.bin SCP firmware image, which is not [yet]

> installed by default on DeveloperBox hardware)

> 

> That leaves the MSI issue, which is worked around by limiting MSI support to a

> single RC. In the presented configuration, this is RC #1, which connects to the

> x16 slot [and nothing else] on the DeveloperBox PCB. The onboard PCIe devices

> (XHCI + SATA) work without problem using wired interrupts only, and so RC #0

> has MSI support disabled. This means cards that require MSI support should

> be inserted into the x16 slot, which is likely to be the preferred slot in

> such cases anwyay (e.g., when using NVME or high end networking plugin cards)

> 

> Patch #1 fixes a minor issue in the slot-to-BDF mapping.

> 

> Patch #2 modifies the static PCIe window configuration so it can be described

> using ACPI as well as DT.

> 

> Patch #3 introduces the static ACPI tables that describe the fixed platform

> devices and peripherals to the OS.

> 

> Patch #4 adds a menu option to the platform driver to make ACPI vs DT user

> selectable.

> 

> Patch #5 adds support for describing the eMMC controller using a SSDT table

> which is only installed if eMMC support is enabled.

> 

> Patch #6 adds a _STA method implementation to the PCIe RC devices so that

> they are only exposed to the OS when running on a platform that has one of

> the several ECAM workarounds enabled. Otherwise, we can still boot via ACPI

> using platform devices, but the PCIe RCs are unavailable.

> 

> Patch #7 extends the _STA method for PCI0 to take the presence detect GPIO

> into account. This is necessary because on the SynQuacer evaluation board,

> any attempt to access the device registers will lock up the system if no

> card is inserted into the slot.

> 

> Note that driver support for the eMMC and network controller only landed in

> v4.15, but when using a SATA driver and a plugin network card that does have

> driver support, these patches should allow the SynQuacer based platforms to

> boot stock Debian Stretch/Fedora/Centos etc installers.

> 

> Ard Biesheuvel (7):

>   Platform/Socionext/DeveloperBox: fix PCIe slot to B/D/F mapping

>   Silicon/SynQuacer: tweak PCI I/O windows for ACPI/Linux support

>   Silicon/SynQuacer: add ACPI drivers and tables

>   Silicon/SynQuacer/PlatformDxe: add option to enable ACPI mode

>   Silicon/SynQuacer/PlatformDxe: add ACPI description of eMMC

>   Silicon/SynQuacer/AcpiTables: disable PCI RCs if ECAM ghosts are

>     detected

>   Silicon/SynQuacer/AcpiTables: take presence detect of PCI0 into

>     account

> 

>  Platform/Socionext/DeveloperBox/DeveloperBox.dsc                                                     |   2 +

>  Platform/Socionext/DeveloperBox/DeveloperBox.fdf                                                     |  14 +

>  Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc                                         |   2 +

>  Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf                                         |  14 +

>  Silicon/Socionext/SynQuacer/Acpi.dsc.inc                                                             |  48 +++

>  Silicon/Socionext/SynQuacer/AcpiTables/AcpiSsdtRootPci.asl                                           | 317 ++++++++++++++++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.h                                                  |  73 +++++

>  Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf                                                |  65 ++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl                                                      | 187 ++++++++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Fadt.aslc                                                     |  91 ++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc                                                     |  93 ++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Iort.aslc                                                     | 101 +++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Madt.aslc                                                     | 182 +++++++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Mcfg.aslc                                                     |  63 ++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc                                                     | 128 ++++++++

>  Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi                                                |   2 +-

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.asl                                             |  41 +++

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c                                               |  55 ++++

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c                                        |  32 +-

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.h                                        |   4 +

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf                                      |   5 +

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxeHii.uni                                   |   8 +-

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxeHii.vfr                                   |  10 +-

>  Silicon/Socionext/SynQuacer/Include/Platform/Pcie.h                                                  |  22 +-

>  Silicon/Socionext/SynQuacer/Include/Platform/VarStore.h                                              |   8 +-

>  Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c |   4 +-

>  26 files changed, 1546 insertions(+), 25 deletions(-)

>  create mode 100644 Silicon/Socionext/SynQuacer/Acpi.dsc.inc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/AcpiSsdtRootPci.asl

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.h

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Fadt.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Iort.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Madt.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Mcfg.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.asl

> 

> -- 

> 2.11.0

> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Graeme Gregory March 1, 2018, 11:23 a.m. UTC | #2
On Wed, Feb 28, 2018 at 07:24:14PM +0000, Ard Biesheuvel wrote:
> This implements ACPI support for the SynQuacer platforms.

> 

> Changes since v1:

> - improve commit log (#1, #2)

> - replace bare numbers with symbolic constants (#2)

> - add Leif's R-b (#4)

> - add patches #6 and #7

> 

> Note that supporting ACPI on this SoC is non-trivial, due to the quirky

> DesignWare RCs and the pre-ITS that sits between the PCIe RCs and the GICv3.

> However, the most important issue has been addressed by modifying the static

> SMMU mapping that sits between the CPUs and the PCIe config space, working

> around the ghosting issue that occurs on these RCs, due the complete lack of

> type 0 config TLP filtering by the [non-existent] root port. (This was tested

> using the 20180226-LB1.1-ACPI-ramfw.bin SCP firmware image, which is not [yet]

> installed by default on DeveloperBox hardware)

> 

> That leaves the MSI issue, which is worked around by limiting MSI support to a

> single RC. In the presented configuration, this is RC #1, which connects to the

> x16 slot [and nothing else] on the DeveloperBox PCB. The onboard PCIe devices

> (XHCI + SATA) work without problem using wired interrupts only, and so RC #0

> has MSI support disabled. This means cards that require MSI support should

> be inserted into the x16 slot, which is likely to be the preferred slot in

> such cases anwyay (e.g., when using NVME or high end networking plugin cards)

> 

> Patch #1 fixes a minor issue in the slot-to-BDF mapping.

> 

> Patch #2 modifies the static PCIe window configuration so it can be described

> using ACPI as well as DT.

> 

> Patch #3 introduces the static ACPI tables that describe the fixed platform

> devices and peripherals to the OS.

> 

> Patch #4 adds a menu option to the platform driver to make ACPI vs DT user

> selectable.

> 

> Patch #5 adds support for describing the eMMC controller using a SSDT table

> which is only installed if eMMC support is enabled.

> 

> Patch #6 adds a _STA method implementation to the PCIe RC devices so that

> they are only exposed to the OS when running on a platform that has one of

> the several ECAM workarounds enabled. Otherwise, we can still boot via ACPI

> using platform devices, but the PCIe RCs are unavailable.

> 

> Patch #7 extends the _STA method for PCI0 to take the presence detect GPIO

> into account. This is necessary because on the SynQuacer evaluation board,

> any attempt to access the device registers will lock up the system if no

> card is inserted into the slot.

> 

> Note that driver support for the eMMC and network controller only landed in

> v4.15, but when using a SATA driver and a plugin network card that does have

> driver support, these patches should allow the SynQuacer based platforms to

> boot stock Debian Stretch/Fedora/Centos etc installers.

> 


The ACPI parts look good to me.

Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org>


> Ard Biesheuvel (7):

>   Platform/Socionext/DeveloperBox: fix PCIe slot to B/D/F mapping

>   Silicon/SynQuacer: tweak PCI I/O windows for ACPI/Linux support

>   Silicon/SynQuacer: add ACPI drivers and tables

>   Silicon/SynQuacer/PlatformDxe: add option to enable ACPI mode

>   Silicon/SynQuacer/PlatformDxe: add ACPI description of eMMC

>   Silicon/SynQuacer/AcpiTables: disable PCI RCs if ECAM ghosts are

>     detected

>   Silicon/SynQuacer/AcpiTables: take presence detect of PCI0 into

>     account

> 

>  Platform/Socionext/DeveloperBox/DeveloperBox.dsc                                                     |   2 +

>  Platform/Socionext/DeveloperBox/DeveloperBox.fdf                                                     |  14 +

>  Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc                                         |   2 +

>  Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf                                         |  14 +

>  Silicon/Socionext/SynQuacer/Acpi.dsc.inc                                                             |  48 +++

>  Silicon/Socionext/SynQuacer/AcpiTables/AcpiSsdtRootPci.asl                                           | 317 ++++++++++++++++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.h                                                  |  73 +++++

>  Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf                                                |  65 ++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl                                                      | 187 ++++++++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Fadt.aslc                                                     |  91 ++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc                                                     |  93 ++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Iort.aslc                                                     | 101 +++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Madt.aslc                                                     | 182 +++++++++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Mcfg.aslc                                                     |  63 ++++

>  Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc                                                     | 128 ++++++++

>  Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi                                                |   2 +-

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.asl                                             |  41 +++

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c                                               |  55 ++++

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c                                        |  32 +-

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.h                                        |   4 +

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.inf                                      |   5 +

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxeHii.uni                                   |   8 +-

>  Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxeHii.vfr                                   |  10 +-

>  Silicon/Socionext/SynQuacer/Include/Platform/Pcie.h                                                  |  22 +-

>  Silicon/Socionext/SynQuacer/Include/Platform/VarStore.h                                              |   8 +-

>  Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c |   4 +-

>  26 files changed, 1546 insertions(+), 25 deletions(-)

>  create mode 100644 Silicon/Socionext/SynQuacer/Acpi.dsc.inc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/AcpiSsdtRootPci.asl

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.h

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Fadt.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Iort.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Madt.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Mcfg.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc

>  create mode 100644 Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.asl

> 

> -- 

> 2.11.0

> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Ard Biesheuvel March 1, 2018, 11:24 a.m. UTC | #3
On 1 March 2018 at 11:23, Graeme Gregory (Linaro)
<graeme.gregory@linaro.org> wrote:
> On Wed, Feb 28, 2018 at 07:24:14PM +0000, Ard Biesheuvel wrote:

>> This implements ACPI support for the SynQuacer platforms.

>>

>> Changes since v1:

>> - improve commit log (#1, #2)

>> - replace bare numbers with symbolic constants (#2)

>> - add Leif's R-b (#4)

>> - add patches #6 and #7

>>

>> Note that supporting ACPI on this SoC is non-trivial, due to the quirky

>> DesignWare RCs and the pre-ITS that sits between the PCIe RCs and the GICv3.

>> However, the most important issue has been addressed by modifying the static

>> SMMU mapping that sits between the CPUs and the PCIe config space, working

>> around the ghosting issue that occurs on these RCs, due the complete lack of

>> type 0 config TLP filtering by the [non-existent] root port. (This was tested

>> using the 20180226-LB1.1-ACPI-ramfw.bin SCP firmware image, which is not [yet]

>> installed by default on DeveloperBox hardware)

>>

>> That leaves the MSI issue, which is worked around by limiting MSI support to a

>> single RC. In the presented configuration, this is RC #1, which connects to the

>> x16 slot [and nothing else] on the DeveloperBox PCB. The onboard PCIe devices

>> (XHCI + SATA) work without problem using wired interrupts only, and so RC #0

>> has MSI support disabled. This means cards that require MSI support should

>> be inserted into the x16 slot, which is likely to be the preferred slot in

>> such cases anwyay (e.g., when using NVME or high end networking plugin cards)

>>

>> Patch #1 fixes a minor issue in the slot-to-BDF mapping.

>>

>> Patch #2 modifies the static PCIe window configuration so it can be described

>> using ACPI as well as DT.

>>

>> Patch #3 introduces the static ACPI tables that describe the fixed platform

>> devices and peripherals to the OS.

>>

>> Patch #4 adds a menu option to the platform driver to make ACPI vs DT user

>> selectable.

>>

>> Patch #5 adds support for describing the eMMC controller using a SSDT table

>> which is only installed if eMMC support is enabled.

>>

>> Patch #6 adds a _STA method implementation to the PCIe RC devices so that

>> they are only exposed to the OS when running on a platform that has one of

>> the several ECAM workarounds enabled. Otherwise, we can still boot via ACPI

>> using platform devices, but the PCIe RCs are unavailable.

>>

>> Patch #7 extends the _STA method for PCI0 to take the presence detect GPIO

>> into account. This is necessary because on the SynQuacer evaluation board,

>> any attempt to access the device registers will lock up the system if no

>> card is inserted into the slot.

>>

>> Note that driver support for the eMMC and network controller only landed in

>> v4.15, but when using a SATA driver and a plugin network card that does have

>> driver support, these patches should allow the SynQuacer based platforms to

>> boot stock Debian Stretch/Fedora/Centos etc installers.

>>

>

> The ACPI parts look good to me.

>

> Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org>

>


Cheers.

I'll hold off on merging this until Heyi's PciHostBridgeDxe patches
are in (which are in pretty good shape now)
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Ard Biesheuvel March 15, 2018, 4:06 p.m. UTC | #4
On 1 March 2018 at 11:24, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> On 1 March 2018 at 11:23, Graeme Gregory (Linaro)

> <graeme.gregory@linaro.org> wrote:

>> On Wed, Feb 28, 2018 at 07:24:14PM +0000, Ard Biesheuvel wrote:

>>> This implements ACPI support for the SynQuacer platforms.

>>>

>>> Changes since v1:

>>> - improve commit log (#1, #2)

>>> - replace bare numbers with symbolic constants (#2)

>>> - add Leif's R-b (#4)

>>> - add patches #6 and #7

>>>

>>> Note that supporting ACPI on this SoC is non-trivial, due to the quirky

>>> DesignWare RCs and the pre-ITS that sits between the PCIe RCs and the GICv3.

>>> However, the most important issue has been addressed by modifying the static

>>> SMMU mapping that sits between the CPUs and the PCIe config space, working

>>> around the ghosting issue that occurs on these RCs, due the complete lack of

>>> type 0 config TLP filtering by the [non-existent] root port. (This was tested

>>> using the 20180226-LB1.1-ACPI-ramfw.bin SCP firmware image, which is not [yet]

>>> installed by default on DeveloperBox hardware)

>>>

>>> That leaves the MSI issue, which is worked around by limiting MSI support to a

>>> single RC. In the presented configuration, this is RC #1, which connects to the

>>> x16 slot [and nothing else] on the DeveloperBox PCB. The onboard PCIe devices

>>> (XHCI + SATA) work without problem using wired interrupts only, and so RC #0

>>> has MSI support disabled. This means cards that require MSI support should

>>> be inserted into the x16 slot, which is likely to be the preferred slot in

>>> such cases anwyay (e.g., when using NVME or high end networking plugin cards)

>>>

>>> Patch #1 fixes a minor issue in the slot-to-BDF mapping.

>>>

>>> Patch #2 modifies the static PCIe window configuration so it can be described

>>> using ACPI as well as DT.

>>>

>>> Patch #3 introduces the static ACPI tables that describe the fixed platform

>>> devices and peripherals to the OS.

>>>

>>> Patch #4 adds a menu option to the platform driver to make ACPI vs DT user

>>> selectable.

>>>

>>> Patch #5 adds support for describing the eMMC controller using a SSDT table

>>> which is only installed if eMMC support is enabled.

>>>

>>> Patch #6 adds a _STA method implementation to the PCIe RC devices so that

>>> they are only exposed to the OS when running on a platform that has one of

>>> the several ECAM workarounds enabled. Otherwise, we can still boot via ACPI

>>> using platform devices, but the PCIe RCs are unavailable.

>>>

>>> Patch #7 extends the _STA method for PCI0 to take the presence detect GPIO

>>> into account. This is necessary because on the SynQuacer evaluation board,

>>> any attempt to access the device registers will lock up the system if no

>>> card is inserted into the slot.

>>>

>>> Note that driver support for the eMMC and network controller only landed in

>>> v4.15, but when using a SATA driver and a plugin network card that does have

>>> driver support, these patches should allow the SynQuacer based platforms to

>>> boot stock Debian Stretch/Fedora/Centos etc installers.

>>>

>>

>> The ACPI parts look good to me.

>>

>> Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org>

>>

>

> Cheers.

>

> I'll hold off on merging this until Heyi's PciHostBridgeDxe patches

> are in (which are in pretty good shape now)


Series applies as d9c87c711412..f8acbb73fae6

Thanks all
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel