public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Pete Batard" <pete@akeo.ie>
To: devel@edk2.groups.io
Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com
Subject: [edk2-platforms][PATCH 00/15] Platform/RPi: Clean up and factorize ACPI
Date: Fri, 28 Feb 2020 10:38:40 +0000	[thread overview]
Message-ID: <20200228103855.11352-1-pete@akeo.ie> (raw)

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


             reply	other threads:[~2020-02-28 10:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 10:38 Pete Batard [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200228103855.11352-1-pete@akeo.ie \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox