From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mx.groups.io with SMTP id smtpd.web10.12434.1582886350413707251 for ; Fri, 28 Feb 2020 02:39:11 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=Ys4TbXXQ; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.128.44, mailfrom: pete@akeo.ie) Received: by mail-wm1-f44.google.com with SMTP id z12so2652821wmi.4 for ; Fri, 28 Feb 2020 02:39:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AVQr0b9kazUNA6YfTnu1Sa8JpCC78+yw4cbkh3x3nqk=; b=Ys4TbXXQOiw4yw6doiTECXL/HL4p6WJk2BX9WV/AsSAe1sdn1QXUZoZtGQ10S7QBb8 7SSiXoNx+YCTc1i3IcKV9FINF1gTlo+rxu0WszkPxbC8V2Syo/gvz6tYEIimeBt88xl4 e4R8XIm3JGduwE+04aZjRyei0cjmMWn8M8PTFZudaEQ5Q1vxl6oGobCNsU9rqiSysmke 6zmwkvAU10SY9T298Ei4IS/cUFXCbDaUQIrp9dYuShDAp+p9xs+3Uox/q4XdBqruj1gL QIyGUK/WK/3InC5tsXu/k7ub/BF7YE+25UUJs858QF59hZA9vkBNkAJ1GURB0thw+MhV bWIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AVQr0b9kazUNA6YfTnu1Sa8JpCC78+yw4cbkh3x3nqk=; b=BPrpSPRirIBSRjfmy4Adqe7A45QwkaI51PnXslSFw/4tl/8DD4QGOJ8N3nKhsOgRAn 7MgYONWbZzB2u6Kj5a47JvFDkvZXKTx3bk9ev5+YEttEucHA5MtMiHTleukHd5x0Ni5s ntPZOMIHDVkxoTMG1olyUYjNX5n4zhybvezDc33k3pum5jhh6WfzTN5ABjmAdCEILzTu yeE7UCL1gQGkUorklRUgBnMU9gXjYrq0tuE7Xe23OJlrx09E5N/ZEWBenLS5FqNsR0Zx HLORLrtWcb0II01kwwrs+VeQFJoc6HhgtmdiStJVBgtHJykhVSXosfCDkHqgVruL98vq vkGg== X-Gm-Message-State: APjAAAVV7hX/C7sDbASMVHyUEvSKzYF9UO583HOFjhjtvf8BDr9xoLmw rtMfcwCLlfez7ORU5reyKD27BDhJF6w= X-Google-Smtp-Source: APXvYqypkkp8BNNPCg8C6bwJFgzq99ZHFGIvk/eiFjCAd0B9iZbeOHI09tDhviujNP+onPYMHRMntQ== X-Received: by 2002:a1c:a789:: with SMTP id q131mr4318154wme.127.1582886347561; Fri, 28 Feb 2020 02:39:07 -0800 (PST) Return-Path: Received: from localhost.localdomain ([84.203.56.244]) by smtp.gmail.com with ESMTPSA id s8sm12341061wrt.57.2020.02.28.02.39.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Feb 2020 02:39:06 -0800 (PST) From: "Pete Batard" 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 Message-Id: <20200228103855.11352-1-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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