[edk2-devel] [edk2-platforms][PATCH 00/15] Platform/RPi: Clean up and factorize ACPI

Pete Batard posted 15 patches 4 years, 1 month ago
Failed in applying to current master (apply log)
Platform/RaspberryPi/AcpiTables/AcpiTables.h                      | 164 ++++++
Platform/RaspberryPi/{RPi4 => }/AcpiTables/AcpiTables.inf         |   9 +-
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Csrt.aslc              |   7 +-
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Dbg2.aslc              |   2 +-
Platform/RaspberryPi/AcpiTables/Dsdt.asl                          | 567 ++++++++++++++++++++
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Fadt.aslc              |   0
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Gtdt.aslc              |   1 -
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Madt.aslc              |  15 +
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.asl                |   0
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.c                  |   0
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.h                  |   0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Rhpx.asl               |   0
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Sdhc.asl               |  32 +-
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Spcr.aslc              |   3 +-
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Uart.asl               |  79 +--
Platform/RaspberryPi/{RPi4 => }/AcpiTables/Xhci.asl               |   2 +
Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.c          |   3 +-
Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h                 |   6 +-
Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.h                 |  76 ---
Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.inf               |  40 --
Platform/RaspberryPi/RPi3/AcpiTables/Csrt.aslc                    | 326 -----------
Platform/RaspberryPi/RPi3/AcpiTables/Dbg2.aslc                    |  28 -
Platform/RaspberryPi/RPi3/AcpiTables/Dsdt.asl                     | 505 -----------------
Platform/RaspberryPi/RPi3/AcpiTables/Fadt.aslc                    |  46 --
Platform/RaspberryPi/RPi3/AcpiTables/Gtdt.aslc                    |  27 -
Platform/RaspberryPi/RPi3/AcpiTables/Madt.aslc                    |  56 --
Platform/RaspberryPi/RPi3/AcpiTables/Pep.asl                      |  89 ---
Platform/RaspberryPi/RPi3/AcpiTables/Pep.c                        |  78 ---
Platform/RaspberryPi/RPi3/AcpiTables/Pep.h                        | 120 -----
Platform/RaspberryPi/RPi3/AcpiTables/Sdhc.asl                     |  99 ----
Platform/RaspberryPi/RPi3/AcpiTables/Spcr.asl                     |  47 --
Platform/RaspberryPi/RPi3/AcpiTables/Uart.asl                     | 152 ------
Platform/RaspberryPi/RPi3/RPi3.dsc                                |  10 +-
Platform/RaspberryPi/RPi3/RPi3.fdf                                |   2 +-
Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h                 |  92 ----
Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl                     | 535 ------------------
Platform/RaspberryPi/RPi4/AcpiTables/Rhpx.asl                     | 195 -------
Platform/RaspberryPi/RPi4/RPi4.dsc                                |   6 +-
Platform/RaspberryPi/RPi4/RPi4.fdf                                |   2 +-
Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h       |  46 +-
Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Gpio.h   |   6 +-
Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Gpu.h    |  48 ++
Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Pwm.h    |  34 ++
Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836SdHost.h |   6 +-
Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Sdio.h   |  44 +-
Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.h                  |   3 +-
Silicon/Broadcom/Drivers/Net/BcmNet.dec                           |   3 +
47 files changed, 1000 insertions(+), 2611 deletions(-)
create mode 100644 Platform/RaspberryPi/AcpiTables/AcpiTables.h
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/AcpiTables.inf (82%)
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Csrt.aslc (94%)
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Dbg2.aslc (97%)
create mode 100644 Platform/RaspberryPi/AcpiTables/Dsdt.asl
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Fadt.aslc (100%)
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Gtdt.aslc (95%)
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Madt.aslc (74%)
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.asl (100%)
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.c (100%)
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.h (100%)
rename Platform/RaspberryPi/{RPi3 => }/AcpiTables/Rhpx.asl (100%)
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Sdhc.asl (64%)
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Spcr.aslc (95%)
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Uart.asl (62%)
rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Xhci.asl (96%)
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.h
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.inf
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Csrt.aslc
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Dbg2.aslc
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Dsdt.asl
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Fadt.aslc
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Gtdt.aslc
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Madt.aslc
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Pep.asl
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Pep.c
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Pep.h
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Sdhc.asl
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Spcr.asl
delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Uart.asl
delete mode 100644 Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h
delete mode 100644 Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl
delete mode 100644 Platform/RaspberryPi/RPi4/AcpiTables/Rhpx.asl
create mode 100644 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Gpu.h
create mode 100644 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Pwm.h
[edk2-devel] [edk2-platforms][PATCH 00/15] Platform/RPi: Clean up and factorize ACPI
Posted by Pete Batard 4 years, 1 month ago
Most of the ACPI sources being used for the Raspberry Pi 4 are
actually very similar to the Raspberty Pi 3 ones, barring a few
constant changes (base addresses, interrupts) or leftover binary
blobs that could be converted to formal ASLC.

As a result, with the goal of simplifying maintenance as well as
helping make the ACPI differences between the two platforms more
prominent, we see it as a very desireable effort to try to merge
the two separate AcpiTables section into a common factorized one.

This patch series accomplishes just that by:
* Removing the hardcoded numeric values from the ACPI tables and
  moving them to more appropriate headers.
* Cleaning up the existing ACPI tables and removing most of the
  leftover binary blobs.
* Adding a small amount of block conditionals needed to ensure
  that our ACPI tables can serve both platforms.
* Factorizing the now common ACPI code.

The commits from this patchset can also be viewed on GitHub at:
https://github.com/pftf/edk2-platforms/commits/acpi_factorization

Pete Batard (15):
  Platform/RPi: Move DW USB base address to Silicon
  Silicon/Bcm283x: Add missing peripherals constants
  Silicon/Bcm283x: Add GPU/VideoCore and Power Management constants
  Silicon/BcmGenet: Add missing I/O mapping length and clean up
  Platform/RPi4: Use Silicon constants in ACPI headers
  Platform/RPi3: Use Silicon constants in ACPI headers
  Platform/RPi3: Switch to .aslc for serial related ACPI tables
  Platform/RPi3: Update CSRT table to ACPI 5.1
  Platform/RPi3: Use proper aslc for FADT, GTDT and MADT tables
    generation
  Platform/RPi4: Add RPI_MODEL constant and replace PL011_ENABLE
  Platform/RPi4: Move ACPI interrupts definitions to AcpiTables.h
  Platform/RPi3: Move ACPI interrupts definitions to AcpiTables.h
  Platform/RPi4: Prepare ACPI code for factorization
  Platform/RPi3: Merge ACPI code from RPi4
  Platform/RPi: Factorize ACPI tables

 Platform/RaspberryPi/AcpiTables/AcpiTables.h                      | 164 ++++++
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/AcpiTables.inf         |   9 +-
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Csrt.aslc              |   7 +-
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Dbg2.aslc              |   2 +-
 Platform/RaspberryPi/AcpiTables/Dsdt.asl                          | 567 ++++++++++++++++++++
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Fadt.aslc              |   0
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Gtdt.aslc              |   1 -
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Madt.aslc              |  15 +
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.asl                |   0
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.c                  |   0
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.h                  |   0
 Platform/RaspberryPi/{RPi3 => }/AcpiTables/Rhpx.asl               |   0
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Sdhc.asl               |  32 +-
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Spcr.aslc              |   3 +-
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Uart.asl               |  79 +--
 Platform/RaspberryPi/{RPi4 => }/AcpiTables/Xhci.asl               |   2 +
 Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.c          |   3 +-
 Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h                 |   6 +-
 Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.h                 |  76 ---
 Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.inf               |  40 --
 Platform/RaspberryPi/RPi3/AcpiTables/Csrt.aslc                    | 326 -----------
 Platform/RaspberryPi/RPi3/AcpiTables/Dbg2.aslc                    |  28 -
 Platform/RaspberryPi/RPi3/AcpiTables/Dsdt.asl                     | 505 -----------------
 Platform/RaspberryPi/RPi3/AcpiTables/Fadt.aslc                    |  46 --
 Platform/RaspberryPi/RPi3/AcpiTables/Gtdt.aslc                    |  27 -
 Platform/RaspberryPi/RPi3/AcpiTables/Madt.aslc                    |  56 --
 Platform/RaspberryPi/RPi3/AcpiTables/Pep.asl                      |  89 ---
 Platform/RaspberryPi/RPi3/AcpiTables/Pep.c                        |  78 ---
 Platform/RaspberryPi/RPi3/AcpiTables/Pep.h                        | 120 -----
 Platform/RaspberryPi/RPi3/AcpiTables/Sdhc.asl                     |  99 ----
 Platform/RaspberryPi/RPi3/AcpiTables/Spcr.asl                     |  47 --
 Platform/RaspberryPi/RPi3/AcpiTables/Uart.asl                     | 152 ------
 Platform/RaspberryPi/RPi3/RPi3.dsc                                |  10 +-
 Platform/RaspberryPi/RPi3/RPi3.fdf                                |   2 +-
 Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h                 |  92 ----
 Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl                     | 535 ------------------
 Platform/RaspberryPi/RPi4/AcpiTables/Rhpx.asl                     | 195 -------
 Platform/RaspberryPi/RPi4/RPi4.dsc                                |   6 +-
 Platform/RaspberryPi/RPi4/RPi4.fdf                                |   2 +-
 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h       |  46 +-
 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Gpio.h   |   6 +-
 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Gpu.h    |  48 ++
 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Pwm.h    |  34 ++
 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836SdHost.h |   6 +-
 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Sdio.h   |  44 +-
 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.h                  |   3 +-
 Silicon/Broadcom/Drivers/Net/BcmNet.dec                           |   3 +
 47 files changed, 1000 insertions(+), 2611 deletions(-)
 create mode 100644 Platform/RaspberryPi/AcpiTables/AcpiTables.h
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/AcpiTables.inf (82%)
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Csrt.aslc (94%)
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Dbg2.aslc (97%)
 create mode 100644 Platform/RaspberryPi/AcpiTables/Dsdt.asl
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Fadt.aslc (100%)
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Gtdt.aslc (95%)
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Madt.aslc (74%)
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.asl (100%)
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.c (100%)
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Pep.h (100%)
 rename Platform/RaspberryPi/{RPi3 => }/AcpiTables/Rhpx.asl (100%)
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Sdhc.asl (64%)
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Spcr.aslc (95%)
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Uart.asl (62%)
 rename Platform/RaspberryPi/{RPi4 => }/AcpiTables/Xhci.asl (96%)
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.h
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.inf
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Csrt.aslc
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Dbg2.aslc
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Dsdt.asl
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Fadt.aslc
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Gtdt.aslc
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Madt.aslc
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Pep.asl
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Pep.c
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Pep.h
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Sdhc.asl
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Spcr.asl
 delete mode 100644 Platform/RaspberryPi/RPi3/AcpiTables/Uart.asl
 delete mode 100644 Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h
 delete mode 100644 Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl
 delete mode 100644 Platform/RaspberryPi/RPi4/AcpiTables/Rhpx.asl
 create mode 100644 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Gpu.h
 create mode 100644 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Pwm.h

-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#55063): https://edk2.groups.io/g/devel/message/55063
Mute This Topic: https://groups.io/mt/71605838/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms][PATCH 00/15] Platform/RPi: Clean up and factorize ACPI
Posted by Ard Biesheuvel 4 years, 1 month ago
Hi Pete,

On Fri, 28 Feb 2020 at 11:39, Pete Batard <pete@akeo.ie> wrote:
>

TL;DR:

>  47 files changed, 1000 insertions(+), 2611 deletions(-)

\o/

Thanks for doing this cleanup. I'll go through these more carefully
early next week, no need to send a v2 before that.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#55090): https://edk2.groups.io/g/devel/message/55090
Mute This Topic: https://groups.io/mt/71605838/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms][PATCH 00/15] Platform/RPi: Clean up and factorize ACPI
Posted by Ard Biesheuvel 4 years, 1 month ago
On Fri, 28 Feb 2020 at 13:17, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> Hi Pete,
>
> On Fri, 28 Feb 2020 at 11:39, Pete Batard <pete@akeo.ie> wrote:
> >
>
> TL;DR:
>
> >  47 files changed, 1000 insertions(+), 2611 deletions(-)
>
> \o/
>
> Thanks for doing this cleanup. I'll go through these more carefully
> early next week, no need to send a v2 before that.

For the series,

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Pushed as a8c0a75ea748..e168252531c7 (with the 'Include' change
applied as discussed)

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#55166): https://edk2.groups.io/g/devel/message/55166
Mute This Topic: https://groups.io/mt/71605838/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-