public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms][PATCH 00/15] Platform/RPi: Clean up and factorize ACPI
@ 2020-02-28 10:38 Pete Batard
  2020-02-28 10:38 ` [edk2-platforms][PATCH 01/15] Platform/RPi: Move DW USB base address to Silicon Pete Batard
                   ` (15 more replies)
  0 siblings, 16 replies; 23+ messages in thread
From: Pete Batard @ 2020-02-28 10:38 UTC (permalink / raw)
  To: devel; +Cc: ard.biesheuvel, leif, philmd

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


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-03-02 11:21 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-28 10:38 [edk2-platforms][PATCH 00/15] Platform/RPi: Clean up and factorize ACPI Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 01/15] Platform/RPi: Move DW USB base address to Silicon Pete Batard
2020-03-02 11:21   ` Philippe Mathieu-Daudé
2020-02-28 10:38 ` [edk2-platforms][PATCH 02/15] Silicon/Bcm283x: Add missing peripherals constants Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 03/15] Silicon/Bcm283x: Add GPU/VideoCore and Power Management constants Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 04/15] Silicon/BcmGenet: Add missing I/O mapping length and clean up Pete Batard
2020-02-28 10:45   ` Ard Biesheuvel
2020-02-28 10:51     ` Pete Batard
2020-02-28 10:58       ` Ard Biesheuvel
2020-02-28 11:01         ` Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 05/15] Platform/RPi4: Use Silicon constants in ACPI headers Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 06/15] Platform/RPi3: " Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 07/15] Platform/RPi3: Switch to .aslc for serial related ACPI tables Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 08/15] Platform/RPi3: Update CSRT table to ACPI 5.1 Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 09/15] Platform/RPi3: Use proper aslc for FADT, GTDT and MADT tables generation Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 10/15] Platform/RPi4: Add RPI_MODEL constant and replace PL011_ENABLE Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 11/15] Platform/RPi4: Move ACPI interrupts definitions to AcpiTables.h Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 12/15] Platform/RPi3: " Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 13/15] Platform/RPi4: Prepare ACPI code for factorization Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 14/15] Platform/RPi3: Merge ACPI code from RPi4 Pete Batard
2020-02-28 10:38 ` [edk2-platforms][PATCH 15/15] Platform/RPi: Factorize ACPI tables Pete Batard
2020-02-28 12:17 ` [edk2-platforms][PATCH 00/15] Platform/RPi: Clean up and factorize ACPI Ard Biesheuvel
2020-03-02 11:14   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox