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 15/15] Platform/RPi: Factorize ACPI tables
Date: Fri, 28 Feb 2020 10:38:55 +0000 [thread overview]
Message-ID: <20200228103855.11352-16-pete@akeo.ie> (raw)
In-Reply-To: <20200228103855.11352-1-pete@akeo.ie>
With the ACPI source for the Pi 3 and Pi 4 being identical, we can
finally factorize it.
Signed-off-by: Pete Batard <pete@akeo.ie>
---
Platform/RaspberryPi/{RPi3 => }/AcpiTables/AcpiTables.h | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/AcpiTables.inf | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Csrt.aslc | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Dbg2.aslc | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Dsdt.asl | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Fadt.aslc | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Gtdt.aslc | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Madt.aslc | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Pep.asl | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Pep.c | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Pep.h | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Rhpx.asl | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Sdhc.asl | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Spcr.aslc | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Uart.asl | 0
Platform/RaspberryPi/{RPi3 => }/AcpiTables/Xhci.asl | 0
Platform/RaspberryPi/RPi3/RPi3.dsc | 2 +-
Platform/RaspberryPi/RPi3/RPi3.fdf | 2 +-
Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h | 164 ------
Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.inf | 58 --
Platform/RaspberryPi/RPi4/AcpiTables/Csrt.aslc | 330 ------------
Platform/RaspberryPi/RPi4/AcpiTables/Dbg2.aslc | 105 ----
Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl | 569 --------------------
Platform/RaspberryPi/RPi4/AcpiTables/Fadt.aslc | 89 ---
Platform/RaspberryPi/RPi4/AcpiTables/Gtdt.aslc | 55 --
Platform/RaspberryPi/RPi4/AcpiTables/Madt.aslc | 80 ---
Platform/RaspberryPi/RPi4/AcpiTables/Pep.asl | 90 ----
Platform/RaspberryPi/RPi4/AcpiTables/Pep.c | 79 ---
Platform/RaspberryPi/RPi4/AcpiTables/Pep.h | 121 -----
Platform/RaspberryPi/RPi4/AcpiTables/Rhpx.asl | 195 -------
Platform/RaspberryPi/RPi4/AcpiTables/Sdhc.asl | 107 ----
Platform/RaspberryPi/RPi4/AcpiTables/Spcr.aslc | 97 ----
Platform/RaspberryPi/RPi4/AcpiTables/Uart.asl | 163 ------
Platform/RaspberryPi/RPi4/AcpiTables/Xhci.asl | 136 -----
Platform/RaspberryPi/RPi4/RPi4.dsc | 2 +-
Platform/RaspberryPi/RPi4/RPi4.fdf | 2 +-
36 files changed, 4 insertions(+), 2442 deletions(-)
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.h b/Platform/RaspberryPi/AcpiTables/AcpiTables.h
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.h
rename to Platform/RaspberryPi/AcpiTables/AcpiTables.h
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.inf b/Platform/RaspberryPi/AcpiTables/AcpiTables.inf
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.inf
rename to Platform/RaspberryPi/AcpiTables/AcpiTables.inf
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Csrt.aslc b/Platform/RaspberryPi/AcpiTables/Csrt.aslc
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Csrt.aslc
rename to Platform/RaspberryPi/AcpiTables/Csrt.aslc
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Dbg2.aslc b/Platform/RaspberryPi/AcpiTables/Dbg2.aslc
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Dbg2.aslc
rename to Platform/RaspberryPi/AcpiTables/Dbg2.aslc
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Dsdt.asl b/Platform/RaspberryPi/AcpiTables/Dsdt.asl
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Dsdt.asl
rename to Platform/RaspberryPi/AcpiTables/Dsdt.asl
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Fadt.aslc b/Platform/RaspberryPi/AcpiTables/Fadt.aslc
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Fadt.aslc
rename to Platform/RaspberryPi/AcpiTables/Fadt.aslc
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Gtdt.aslc b/Platform/RaspberryPi/AcpiTables/Gtdt.aslc
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Gtdt.aslc
rename to Platform/RaspberryPi/AcpiTables/Gtdt.aslc
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Madt.aslc b/Platform/RaspberryPi/AcpiTables/Madt.aslc
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Madt.aslc
rename to Platform/RaspberryPi/AcpiTables/Madt.aslc
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Pep.asl b/Platform/RaspberryPi/AcpiTables/Pep.asl
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Pep.asl
rename to Platform/RaspberryPi/AcpiTables/Pep.asl
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Pep.c b/Platform/RaspberryPi/AcpiTables/Pep.c
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Pep.c
rename to Platform/RaspberryPi/AcpiTables/Pep.c
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Pep.h b/Platform/RaspberryPi/AcpiTables/Pep.h
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Pep.h
rename to Platform/RaspberryPi/AcpiTables/Pep.h
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Rhpx.asl b/Platform/RaspberryPi/AcpiTables/Rhpx.asl
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Rhpx.asl
rename to Platform/RaspberryPi/AcpiTables/Rhpx.asl
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Sdhc.asl b/Platform/RaspberryPi/AcpiTables/Sdhc.asl
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Sdhc.asl
rename to Platform/RaspberryPi/AcpiTables/Sdhc.asl
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Spcr.aslc b/Platform/RaspberryPi/AcpiTables/Spcr.aslc
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Spcr.aslc
rename to Platform/RaspberryPi/AcpiTables/Spcr.aslc
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Uart.asl b/Platform/RaspberryPi/AcpiTables/Uart.asl
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Uart.asl
rename to Platform/RaspberryPi/AcpiTables/Uart.asl
diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Xhci.asl b/Platform/RaspberryPi/AcpiTables/Xhci.asl
similarity index 100%
rename from Platform/RaspberryPi/RPi3/AcpiTables/Xhci.asl
rename to Platform/RaspberryPi/AcpiTables/Xhci.asl
diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3/RPi3.dsc
index 10f02737dce1..304bc3dfeadf 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -550,7 +550,7 @@ [Components.common]
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
- Platform/RaspberryPi/$(PLATFORM_NAME)/AcpiTables/AcpiTables.inf
+ Platform/RaspberryPi/AcpiTables/AcpiTables.inf
#
# SMBIOS Support
diff --git a/Platform/RaspberryPi/RPi3/RPi3.fdf b/Platform/RaspberryPi/RPi3/RPi3.fdf
index 31730865601f..ec3742c83729 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.fdf
+++ b/Platform/RaspberryPi/RPi3/RPi3.fdf
@@ -242,7 +242,7 @@ [FV.FvMain]
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
- INF RuleOverride = ACPITABLE Platform/RaspberryPi/$(PLATFORM_NAME)/AcpiTables/AcpiTables.inf
+ INF RuleOverride = ACPITABLE Platform/RaspberryPi/AcpiTables/AcpiTables.inf
#
# SMBIOS Support
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h b/Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h
deleted file mode 100644
index 0b8a8494450c..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/** @file
- *
- * RPi defines for constructing ACPI tables
- *
- * Copyright (c) 2020, Pete Batard <pete@akeo.ie>
- * Copyright (c) 2019, ARM Ltd. All rights reserved.
- * Copyright (c) 2018, Andrei Warkentin <andrey.warkentin@gmail.com>
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-#ifndef __ACPITABLES_H__
-#define __ACPITABLES_H__
-
-#include <IndustryStandard/Acpi.h>
-
-// The ASL compiler can't perform arithmetic on MEMORY32SETBASE ()
-// parameters so you can't pass a constant like BASE + OFFSET (the
-// compiler just silently sets it to zero). So we need a macro that
-// can perform arithmetic base address update with an offset.
-#define MEMORY32SETBASE(BufName, MemName, VarName, Offset) \
- CreateDwordField (^BufName, ^MemName._BAS, VarName) \
- Add (BCM2836_SOC_REGISTERS, Offset, VarName)
-
-#if (RPI_MODEL == 3)
-#define EFI_ACPI_OEM_ID {'B','C','2','8','3','6'}
-#else
-#define EFI_ACPI_OEM_ID {'M','C','R','S','F','T'}
-#endif
-#define EFI_ACPI_OEM_TABLE_ID SIGNATURE_64 ('R','P','I','_','E','D','K','2')
-#define EFI_ACPI_OEM_REVISION 0x00000100
-#define EFI_ACPI_CREATOR_ID SIGNATURE_32 ('E','D','K','2')
-#define EFI_ACPI_CREATOR_REVISION 0x00000100
-
-#define EFI_ACPI_VENDOR_ID SIGNATURE_32 ('M','S','F','T')
-
-// A macro to initialise the common header part of EFI ACPI tables as defined by
-// EFI_ACPI_DESCRIPTION_HEADER structure.
-#define ACPI_HEADER(Signature, Type, Revision) { \
- Signature, /* UINT32 Signature */ \
- sizeof (Type), /* UINT32 Length */ \
- Revision, /* UINT8 Revision */ \
- 0, /* UINT8 Checksum */ \
- EFI_ACPI_OEM_ID, /* UINT8 OemId[6] */ \
- EFI_ACPI_OEM_TABLE_ID, /* UINT64 OemTableId */ \
- EFI_ACPI_OEM_REVISION, /* UINT32 OemRevision */ \
- EFI_ACPI_CREATOR_ID, /* UINT32 CreatorId */ \
- EFI_ACPI_CREATOR_REVISION /* UINT32 CreatorRevision */ \
- }
-
-#define EFI_ACPI_CSRT_REVISION 0x00000005
-#define EFI_ACPI_CSRT_DEVICE_ID_DMA 0x00000009 // Fixed id
-#define EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP 0x0 // Count up from 0
-
-#define RPI_DMA_CHANNEL_COUNT 10 // All 10 DMA channels are listed, including the reserved ones
-#define RPI_DMA_USED_CHANNEL_COUNT 5 // Use 5 DMA channels
-
-#if (RPI_MODEL == 3)
-#define RPI_SYSTEM_TIMER_BASE_ADDRESS 0x4000001C
-#elif (RPI_MODEL == 4)
-#define RPI_SYSTEM_TIMER_BASE_ADDRESS 0xFF80001C
-#endif
-
-#define EFI_ACPI_5_1_CSRT_REVISION 0x00000000
-
-typedef enum
-{
- EFI_ACPI_CSRT_RESOURCE_TYPE_RESERVED, // 0
- EFI_ACPI_CSRT_RESOURCE_TYPE_INTERRUPT, // 1
- EFI_ACPI_CSRT_RESOURCE_TYPE_TIMER, // 2
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA, // 3
- EFI_ACPI_CSRT_RESOURCE_TYPE_CACHE, // 4
-}
-CSRT_RESOURCE_TYPE;
-
-typedef enum
-{
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CHANNEL, // 0
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CONTROLLER // 1
-}
-CSRT_DMA_SUBTYPE;
-
-//------------------------------------------------------------------------
-// CSRT Resource Group header 24 bytes long
-//------------------------------------------------------------------------
-typedef struct
-{
- UINT32 Length; // Length
- UINT32 VendorID; // 4 bytes
- UINT32 SubVendorId; // 4 bytes
- UINT16 DeviceId; // 2 bytes
- UINT16 SubdeviceId; // 2 bytes
- UINT16 Revision; // 2 bytes
- UINT16 Reserved; // 2 bytes
- UINT32 SharedInfoLength; // 4 bytes
-} EFI_ACPI_5_1_CSRT_RESOURCE_GROUP_HEADER;
-
-//------------------------------------------------------------------------
-// CSRT Resource Descriptor 12 bytes total
-//------------------------------------------------------------------------
-typedef struct
-{
- UINT32 Length; // 4 bytes
- UINT16 ResourceType; // 2 bytes
- UINT16 ResourceSubType; // 2 bytes
- UINT32 UID; // 4 bytes
-} EFI_ACPI_5_1_CSRT_RESOURCE_DESCRIPTOR_HEADER;
-
-//------------------------------------------------------------------------
-// Interrupts. These are specific to each platform
-//------------------------------------------------------------------------
-#if (RPI_MODEL == 3)
-#define BCM2836_V3D_BUS_INTERRUPT 0x2A
-#define BCM2836_DMA_INTERRUPT 0x3B
-#define BCM2836_SPI1_INTERRUPT 0x3D
-#define BCM2836_SPI2_INTERRUPT 0x3D
-#define BCM2836_HVS_INTERRUPT 0x41
-#define BCM2836_HDMI0_INTERRUPT 0x48
-#define BCM2836_HDMI1_INTERRUPT 0x49
-#define BCM2836_PV2_INTERRUPT 0x4A
-#define BCM2836_PV0_INTERRUPT 0x4D
-#define BCM2836_PV1_INTERRUPT 0x4E
-#define BCM2836_MBOX_INTERRUPT 0x61
-#define BCM2836_VCHIQ_INTERRUPT 0x62
-#define BCM2386_GPIO_INTERRUPT0 0x51
-#define BCM2386_GPIO_INTERRUPT1 0x53
-#define BCM2836_I2C1_INTERRUPT 0x55
-#define BCM2836_I2C2_INTERRUPT 0x55
-#define BCM2836_SPI0_INTERRUPT 0x56
-#define BCM2836_USB_INTERRUPT 0x29
-#define BCM2836_SDHOST_INTERRUPT 0x58
-#define BCM2836_MMCHS1_INTERRUPT 0x5E
-#define BCM2836_MINI_UART_INTERRUPT 0x3D
-#define BCM2836_PL011_UART_INTERRUPT 0x59
-#elif (RPI_MODEL == 4)
-#define BCM2836_V3D_BUS_INTERRUPT 0x2A
-#define BCM2836_DMA_INTERRUPT 0x3B
-#define BCM2836_SPI1_INTERRUPT 0x3D
-#define BCM2836_SPI2_INTERRUPT 0x3D
-#define BCM2836_HVS_INTERRUPT 0x41
-#define BCM2836_HDMI0_INTERRUPT 0x48
-#define BCM2836_HDMI1_INTERRUPT 0x49
-#define BCM2836_PV2_INTERRUPT 0x4A
-#define BCM2836_PV0_INTERRUPT 0x4D
-#define BCM2836_PV1_INTERRUPT 0x4E
-#define BCM2836_MBOX_INTERRUPT 0x61
-#define BCM2836_VCHIQ_INTERRUPT 0x62
-#define BCM2386_GPIO_INTERRUPT0 0x51
-#define BCM2386_GPIO_INTERRUPT1 0x53
-#define BCM2836_I2C1_INTERRUPT 0x55
-#define BCM2836_I2C2_INTERRUPT 0x55
-#define BCM2836_SPI0_INTERRUPT 0x56
-#define BCM2836_USB_INTERRUPT 0x69
-#define BCM2836_SDHOST_INTERRUPT 0x98
-#define BCM2836_MMCHS1_INTERRUPT 0x9E
-#define BCM2836_MINI_UART_INTERRUPT 0x7D
-#define BCM2836_PL011_UART_INTERRUPT 0x99
-#define GENET_INTERRUPT0 0xBD
-#define GENET_INTERRUPT1 0xBE
-#endif
-
-#endif // __ACPITABLES_H__
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.inf b/Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.inf
deleted file mode 100644
index c95d75ed01bb..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.inf
+++ /dev/null
@@ -1,58 +0,0 @@
-#/** @file
-#
-# ACPI table data and ASL sources required to boot the platform.
-#
-# Copyright (c) 2019, ARM Limited. All rights reserved.
-# Copyright (c) 2017, Andrey Warkentin <andrey.warkentin@gmail.com>
-# Copyright (c) Microsoft Corporation. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#**/
-
-[Defines]
- INF_VERSION = 0x0001001A
- BASE_NAME = AcpiTables
- FILE_GUID = 7E374E25-8E01-4FEE-87F2-390C23C606CD
- MODULE_TYPE = USER_DEFINED
- VERSION_STRING = 1.0
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = AARCH64
-#
-
-[Sources]
- AcpiTables.h
- Madt.aslc
- Fadt.aslc
- Dbg2.aslc
- Gtdt.aslc
- Dsdt.asl
- Csrt.aslc
- Spcr.aslc
-
-[Packages]
- ArmPkg/ArmPkg.dec
- ArmPlatformPkg/ArmPlatformPkg.dec
- EmbeddedPkg/EmbeddedPkg.dec
- MdeModulePkg/MdeModulePkg.dec
- MdePkg/MdePkg.dec
- Silicon/Broadcom/Bcm27xx/Bcm27xx.dec
- Silicon/Broadcom/Bcm283x/Bcm283x.dec
- Silicon/Broadcom/Drivers/Net/BcmNet.dec
-
-[FixedPcd]
- gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
- gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
- gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
- gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
- gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
- gArmTokenSpaceGuid.PcdGicDistributorBase
- gBcm27xxTokenSpaceGuid.PcdBcm27xxPciCpuMmioAdr
- gBcm27xxTokenSpaceGuid.PcdBcm27xxPciRegBase
- gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress
- gBcmNetTokenSpaceGuid.PcdBcmGenetRegistersAddress
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
- gEmbeddedTokenSpaceGuid.PcdInterruptBaseAddress
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Csrt.aslc b/Platform/RaspberryPi/RPi4/AcpiTables/Csrt.aslc
deleted file mode 100644
index 03d888fffb8b..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Csrt.aslc
+++ /dev/null
@@ -1,330 +0,0 @@
-/** @file
- *
- * Core System Resource Table (CSRT)
- *
- * Copyright (c) 2019, ARM Ltd. All rights reserved.
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-#include <IndustryStandard/Acpi.h>
-#include <IndustryStandard/Bcm2836.h>
-
-#include "AcpiTables.h"
-
-#define RPI_DMA_MAX_REQ_LINES 32
-
-#pragma pack (push, 1)
-
-//------------------------------------------------------------------------
-// DMA Controller Vendor Data
-//------------------------------------------------------------------------
-typedef struct
-{
- UINT32 Length;
- UINT32 Type;
- UINT64 ChannelsBaseAddress;
- UINT32 ChannelsBaseSize;
- UINT64 ControllerBaseAddress;
- UINT32 ControllerBaseSize;
- UINT32 ChannelCount;
- UINT32 ControllerInterrupt;
- UINT32 MinimumRequestLine;
- UINT32 MaximumRequestLine;
- BOOLEAN CacheCoherent;
-} DMA_CONTROLLER_VENDOR_DATA;
-
-//------------------------------------------------------------------------
-// DMA Controller
-//------------------------------------------------------------------------
-typedef struct
-{
- EFI_ACPI_5_1_CSRT_RESOURCE_DESCRIPTOR_HEADER DmaControllerHeader;
- DMA_CONTROLLER_VENDOR_DATA ControllerVendorData;
-} RD_DMA_CONTROLLER;
-
-//------------------------------------------------------------------------
-// DMA Channel Vendor Data
-//------------------------------------------------------------------------
-typedef struct
-{
- UINT32 ChannelNumber;
- UINT32 ChannelInterrupt;
- UINT16 IsReservedChannel;
- UINT16 NoSrcNoDestAddrIncr;
-} DMA_CHANNEL_VENDOR_DATA;
-
-//------------------------------------------------------------------------
-// DMA Channel
-//------------------------------------------------------------------------
-typedef struct
-{
- EFI_ACPI_5_1_CSRT_RESOURCE_DESCRIPTOR_HEADER DmaChannelHeader;
- DMA_CHANNEL_VENDOR_DATA ChannelVendorData;
-} RD_DMA_CHANNEL;
-
-//------------------------------------------------------------------------
-// DMA Resource Group
-//------------------------------------------------------------------------
-
-typedef struct
-{
- EFI_ACPI_5_1_CSRT_RESOURCE_GROUP_HEADER ResGroupHeader;
- RD_DMA_CONTROLLER DmaController;
- RD_DMA_CHANNEL DmaChannels[RPI_DMA_CHANNEL_COUNT];
-} RG_DMA;
-
-//----------------------------------------------------------------------------
-// CSRT table structure - current revision only includes DMA
-//----------------------------------------------------------------------------
-typedef struct
-{
-// Standard ACPI Header
- EFI_ACPI_DESCRIPTION_HEADER CsrtHeader;
-
-// DMA Resource Group
- RG_DMA DmaResourceGroup;
-
-} EFI_ACPI_5_1_CSRT_TABLE;
-
-EFI_ACPI_5_1_CSRT_TABLE Csrt =
-{
- //------------------------------------------------------------------------
- // ACPI Table Header
- //------------------------------------------------------------------------
- {
- EFI_ACPI_5_1_CORE_SYSTEM_RESOURCE_TABLE_SIGNATURE, // Signature "CSRT"
- sizeof (EFI_ACPI_DESCRIPTION_HEADER) + sizeof (RG_DMA), // Length
- EFI_ACPI_5_1_CSRT_REVISION, // Revision
- 0x00, // Checksum calculated at runtime.
- EFI_ACPI_OEM_ID, // OEMID is a 6 bytes long field
- EFI_ACPI_OEM_TABLE_ID, // OEM table identification (8 bytes long)
- EFI_ACPI_OEM_REVISION, // OEM revision number.
- EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID.
- EFI_ACPI_CREATOR_REVISION // ASL compiler revision number.
- },
-
- //------------------------------------------------------------------------
- // DMA Resource Group
- //------------------------------------------------------------------------
- {
-
- //------------------------------------------------------------------------
- // DMA Resource Group Header
- //------------------------------------------------------------------------
- {
- sizeof (RG_DMA), // Resource Group Length
- EFI_ACPI_VENDOR_ID, // VendorId
- 0, // SubvendorId
- EFI_ACPI_CSRT_DEVICE_ID_DMA, // DeviceId 9
- 0, // SubdeviceId
- 0, // Revision
- 0, // Reserved
- 0 // SharedInfoLength
- },
-
- //-------------------------------------------------------------------------------
- // Resource Descriptor - DMA Controller
- //-------------------------------------------------------------------------------
- {
- {
- sizeof (RD_DMA_CONTROLLER), // Length of this Resource Descriptor
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA, // Type for this resource 3=DMA
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CONTROLLER, // Subtype for this resource 1=DMA Controller
- EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP + 0, // ResourceId - 1st DMA controller
- },
- {
- sizeof (DMA_CONTROLLER_VENDOR_DATA), // Controller vendor data here
- 1,
- BCM2836_DMA0_BASE_ADDRESS, // Base address for channels
- RPI_DMA_CHANNEL_COUNT * BCM2836_DMA_CHANNEL_LENGTH, // Base size = Number of channels x channel size
- BCM2836_DMA_CTRL_BASE_ADDRESS,// Base address for controller
- 8, // Base size = two registers
- RPI_DMA_USED_CHANNEL_COUNT,
- 0, // cannot use controller interrupt
- 0, // Minimum Request Line
- RPI_DMA_MAX_REQ_LINES - 1, // Maximum Request Line
- FALSE,
- },
- },
-
- //------------------------------------------------------------------------
- // Resource Descriptor(s) - DMA Channels 0 to n-1
- //------------------------------------------------------------------------
- {
-
- // Channel 0
- {
- {
- sizeof (RD_DMA_CHANNEL), // Length of this Resource Descriptor
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA, // Type for this resource 3=DMA
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CHANNEL, // Subtype for this resource 0=DMA Channel
- EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP + 1, // ResourceId
- },
- {
- 0, // Channel vendor data here
- 0x30, // 16+32 dma_int[0]
- 0,
- 0
- },
- },
-
- // Channel 1 reserved
- {
- {
- sizeof (RD_DMA_CHANNEL),
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA,
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CHANNEL,
- EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP + 2, // ResourceId
- },
- {
- 1, // Channel vendor data here
- 0x31, // 17+32 dma_int[1]
- 1,
- 0
- },
- },
-
- // Channel 2 - VC4 use only
- {
- {
- sizeof (RD_DMA_CHANNEL),
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA,
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CHANNEL,
- EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP + 3, // ResourceId
- },
- {
- 2, // Channel vendor data here
- 0x32, // 18+32 dma_int[2]
- 1,
- 0
- },
- },
-
- // Channel 3 - VC4 use only
- {
- {
- sizeof (RD_DMA_CHANNEL),
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA,
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CHANNEL,
- EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP + 4,
- },
- {
- 3, // Channel vendor data here
- 0x33, // 19+32 dma_int[3]
- 1,
- 0
- },
- },
-
- // channel 4
- {
- {
- sizeof (RD_DMA_CHANNEL),
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA,
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CHANNEL,
- EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP + 5,
- },
- {
- 4, // Channel vendor data here
- 0x34, // 20+32 dma_int[4]
- 0,
- 1 // SD host controller candidate
- },
- },
-
- // Channel 5
- {
- {
- sizeof (RD_DMA_CHANNEL),
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA,
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CHANNEL,
- EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP + 6,
- },
- {
- 5, // Channel vendor data here
- 0x35, // 21+32 dma_int[5]
- 0,
- 0
- },
- },
-
- // Channel 6 is reserved
- {
- {
- sizeof (RD_DMA_CHANNEL),
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA,
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CHANNEL,
- EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP + 7,
- },
- {
- 6, // Channel vendor data here
- 0x36, // 22+32 dma_int[6]
- 1,
- 0
- },
- },
-
- // Channel 7 is reserved
- {
- {
- sizeof (RD_DMA_CHANNEL),
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA,
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CHANNEL,
- EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP + 8,
- },
- {
- 7, // Channel vendor data here
- 0x37, // 23+32 dma_int[7]
- 1,
- 0
- },
- },
-
- // Channel 8
- {
- {
- sizeof (RD_DMA_CHANNEL),
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA,
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CHANNEL,
- EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP + 9,
- },
- {
- 8, // Channel vendor data here
- 0x38, // 24+32 dma_int[8]
- 0,
- 0
- },
- },
-
- // Channel 9
- {
- {
- sizeof (RD_DMA_CHANNEL),
- EFI_ACPI_CSRT_RESOURCE_TYPE_DMA,
- EFI_ACPI_CSRT_RESOURCE_SUBTYPE_DMA_CHANNEL,
- EFI_ACPI_CSRT_RESOURCE_ID_IN_DMA_GRP + 10,
- },
- {
- 9, // channel vendor data here
- 0x39, // 25+32 dma_int[9]
- 0,
- 0
- },
- }
-
- } // End DMA Channels 0 to 14
-
- } // End DMA Resource group
-
-};
-
-#pragma pack(pop)
-
-//
-// Reference the table being generated to prevent the optimizer from removing the
-// data structure from the executable
-//
-VOID* CONST ReferenceAcpiTable = &Csrt;
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Dbg2.aslc b/Platform/RaspberryPi/RPi4/AcpiTables/Dbg2.aslc
deleted file mode 100644
index c3d5994f8e97..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Dbg2.aslc
+++ /dev/null
@@ -1,105 +0,0 @@
-/** @file
- *
- * Debug Port Table (DBG2)
- *
- * Copyright (c) 2019, Pete Batard <pete@akeo.ie>
- * Copyright (c) 2012-2016, ARM Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-#include <IndustryStandard/Acpi.h>
-#include <IndustryStandard/Bcm2836.h>
-#include <IndustryStandard/DebugPort2Table.h>
-#include <Library/AcpiLib.h>
-#include <Library/PcdLib.h>
-
-#include "AcpiTables.h"
-
-#pragma pack(1)
-
-#define RPI_DBG2_NUM_DEBUG_PORTS 1
-#define RPI_DBG2_NUMBER_OF_GENERIC_ADDRESS_REGISTERS 1
-#define RPI_DBG2_NAMESPACESTRING_FIELD_SIZE 10
-
-#if (RPI_MODEL == 4)
-#define RPI_UART_INTERFACE_TYPE EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART
-#define RPI_UART_BASE_ADDRESS BCM2836_PL011_UART_BASE_ADDRESS
-#define RPI_UART_LENGTH BCM2836_PL011_UART_LENGTH
-#define RPI_UART_STR { '\\', '_', 'S', 'B', '.', 'U', 'R', 'T', '0', 0x00 }
-#else
-#define RPI_UART_INTERFACE_TYPE EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_BCM2835_UART
-#define RPI_UART_BASE_ADDRESS BCM2836_MINI_UART_BASE_ADDRESS
-#define RPI_UART_LENGTH BCM2836_MINI_UART_LENGTH
-//
-// RPI_UART_STR should match the value used Uart.asl
-//
-#define RPI_UART_STR { '\\', '_', 'S', 'B', '.', 'U', 'R', 'T', 'M', 0x00 }
-#endif
-
-typedef struct {
- EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT Dbg2Device;
- EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE BaseAddressRegister;
- UINT32 AddressSize;
- UINT8 NameSpaceString[RPI_DBG2_NAMESPACESTRING_FIELD_SIZE];
-} DBG2_DEBUG_DEVICE_INFORMATION;
-
-typedef struct {
- EFI_ACPI_DEBUG_PORT_2_DESCRIPTION_TABLE Description;
- DBG2_DEBUG_DEVICE_INFORMATION Dbg2DeviceInfo[RPI_DBG2_NUM_DEBUG_PORTS];
-} DBG2_TABLE;
-
-
-#define DBG2_DEBUG_PORT_DDI(NumReg, SubType, UartBase, UartAddrLen, UartNameStr) { \
- { \
- EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION, /* UINT8 Revision */ \
- sizeof (DBG2_DEBUG_DEVICE_INFORMATION), /* UINT16 Length */ \
- NumReg, /* UINT8 NumberofGenericAddressRegisters */ \
- RPI_DBG2_NAMESPACESTRING_FIELD_SIZE, /* UINT16 NameSpaceStringLength */ \
- OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, NameSpaceString), /* UINT16 NameSpaceStringOffset */ \
- 0, /* UINT16 OemDataLength */ \
- 0, /* UINT16 OemDataOffset */ \
- EFI_ACPI_DBG2_PORT_TYPE_SERIAL, /* UINT16 Port Type */ \
- SubType, /* UINT16 Port Subtype */ \
- {EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE}, /* UINT8 Reserved[2] */ \
- OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, BaseAddressRegister), /* UINT16 BaseAddressRegister Offset */ \
- OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, AddressSize) /* UINT16 AddressSize Offset */ \
- }, \
- ARM_GAS32 (UartBase), /* EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE BaseAddressRegister */ \
- UartAddrLen, /* UINT32 AddressSize */ \
- UartNameStr /* UINT8 NameSpaceString[MAX_DBG2_NAME_LEN] */ \
- }
-
-
-STATIC DBG2_TABLE Dbg2 = {
- {
- ACPI_HEADER (
- EFI_ACPI_5_1_DEBUG_PORT_2_TABLE_SIGNATURE,
- DBG2_TABLE,
- EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION
- ),
- OFFSET_OF (DBG2_TABLE, Dbg2DeviceInfo),
- RPI_DBG2_NUM_DEBUG_PORTS /* UINT32 NumberDbgDeviceInfo */
- },
- {
- /*
- * Kernel Debug Port
- */
- DBG2_DEBUG_PORT_DDI (
- RPI_DBG2_NUMBER_OF_GENERIC_ADDRESS_REGISTERS,
- RPI_UART_INTERFACE_TYPE,
- RPI_UART_BASE_ADDRESS,
- RPI_UART_LENGTH,
- RPI_UART_STR
- ),
- }
-};
-
-#pragma pack()
-
-//
-// Reference the table being generated to prevent the optimizer from removing
-// the data structure from the executable
-//
-VOID* CONST ReferenceAcpiTable = &Dbg2;
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl
deleted file mode 100644
index c2775088b5a2..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl
+++ /dev/null
@@ -1,569 +0,0 @@
-/** @file
- *
- * Differentiated System Definition Table (DSDT)
- *
- * Copyright (c) 2020, Pete Batard <pete@akeo.ie>
- * Copyright (c) 2018, Andrey Warkentin <andrey.warkentin@gmail.com>
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-#include <BcmGenetDxe/Genet.h>
-#include <IndustryStandard/Bcm2836.h>
-#include <IndustryStandard/Bcm2836Gpio.h>
-#include <IndustryStandard/Bcm2836Gpu.h>
-#include <IndustryStandard/Bcm2836Pwm.h>
-
-#include "AcpiTables.h"
-
-#define BCM_ALT0 0x4
-#define BCM_ALT1 0x5
-#define BCM_ALT2 0x6
-#define BCM_ALT3 0x7
-#define BCM_ALT4 0x3
-#define BCM_ALT5 0x2
-
-DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2", 2)
-{
- Scope (\_SB_)
- {
- include ("Sdhc.asl")
- include ("Pep.asl")
-#if (RPI_MODEL == 4)
- include ("Xhci.asl")
-#endif
-
- Device (CPU0)
- {
- Name (_HID, "ACPI0007")
- Name (_UID, 0x0)
- Method (_STA)
- {
- Return (0xf)
- }
- }
-
- Device (CPU1)
- {
- Name (_HID, "ACPI0007")
- Name (_UID, 0x1)
- Method (_STA)
- {
- Return (0xf)
- }
- }
-
- Device (CPU2)
- {
- Name (_HID, "ACPI0007")
- Name (_UID, 0x2)
- Method (_STA)
- {
- Return (0xf)
- }
- }
-
- Device (CPU3)
- {
- Name (_HID, "ACPI0007")
- Name (_UID, 0x3)
- Method (_STA)
- {
- Return (0xf)
- }
- }
-
- // DWC OTG Controller
- Device (USB0)
- {
- Name (_HID, "BCM2848")
- Name (_CID, Package() { "DWC_OTG", "DWC2_OTG"})
- Name (_UID, 0x0)
- Name (_CCA, 0x0)
- Method (_STA)
- {
- Return (0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- MEMORY32FIXED (ReadWrite, 0, BCM2836_USB_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_USB_INTERRUPT }
- })
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_USB_OFFSET)
- Return (^RBUF)
- }
- }
-
- // Video Core 4 GPU
- Device (GPU0)
- {
- Name (_HID, "BCM2850")
- Name (_CID, "VC4")
- Name (_UID, 0x0)
- Name (_CCA, 0x0)
- Method (_STA)
- {
- Return(0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- // Memory and interrupt for the GPU
- MEMORY32FIXED (ReadWrite, 0, BCM2836_V3D_BUS_LENGTH, RM01)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_V3D_BUS_INTERRUPT }
-
- // HVS - Hardware Video Scalar
- MEMORY32FIXED (ReadWrite, 0, BCM2836_HVS_LENGTH, RM02)
- // The HVS interrupt is reserved by the VPU
- // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_HVS_INTERRUPT }
-
- // PixelValve0 - DSI0 or DPI
- // MEMORY32FIXED (ReadWrite, BCM2836_PV0_BASE_ADDRESS, BCM2836_PV0_LENGTH, RM03)
- // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_PV0_INTERRUPT }
-
- // PixelValve1 - DS1 or SMI
- // MEMORY32FIXED (ReadWrite, BCM2836_PV1_BASE_ADDRESS, BCM2836_PV1_LENGTH, RM04)
- // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_PV1_INTERRUPT }
-
- // PixelValve2 - HDMI output - connected to HVS display FIFO 1
- MEMORY32FIXED (ReadWrite, 0, BCM2836_PV2_LENGTH, RM05)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_PV2_INTERRUPT }
-
- // HDMI registers
- MEMORY32FIXED (ReadWrite, 0, BCM2836_HDMI0_LENGTH, RM06)
- MEMORY32FIXED (ReadWrite, 0, BCM2836_HDMI1_LENGTH, RM07)
- // hdmi_int[0]
- // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_HDMI0_INTERRUPT }
- // hdmi_int[1]
- // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_HDMI1_INTERRUPT }
-
- // HDMI DDC connection
- I2CSerialBus (0x50,, 100000,, "\\_SB.I2C2",,,,) // EDID
- I2CSerialBus (0x30,, 100000,, "\\_SB.I2C2",,,,) // E-DDC Segment Pointer
- })
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RM01, RB01, BCM2836_V3D_BUS_OFFSET)
- MEMORY32SETBASE (RBUF, RM02, RB02, BCM2836_HVS_OFFSET)
- MEMORY32SETBASE (RBUF, RM05, RB05, BCM2836_PV2_OFFSET)
- MEMORY32SETBASE (RBUF, RM06, RB06, BCM2836_HDMI0_OFFSET)
- MEMORY32SETBASE (RBUF, RM07, RB07, BCM2836_HDMI1_OFFSET)
- Return (^RBUF)
- }
-
- // GPU Power Management Component Data
- // Reference : https://github.com/Microsoft/graphics-driver-samples/wiki/Install-Driver-in-a-Windows-VM
- Method (PMCD, 0, Serialized)
- {
- Name (RBUF, Package ()
- {
- 1, // Version
- 1, // Number of graphics power components
- Package () // Power components package
- {
- Package () // GPU component package
- {
- 0, // Component Index
- 0, // DXGK_POWER_COMPONENT_MAPPING.ComponentType (0 = DXGK_POWER_COMPONENT_ENGINE)
- 0, // DXGK_POWER_COMPONENT_MAPPING.NodeIndex
-
- Buffer () // DXGK_POWER_RUNTIME_COMPONENT.ComponentGuid
- { // 9B2D1E26-1575-4747-8FC0-B9EB4BAA2D2B
- 0x26, 0x1E, 0x2D, 0x9B, 0x75, 0x15, 0x47, 0x47,
- 0x8f, 0xc0, 0xb9, 0xeb, 0x4b, 0xaa, 0x2d, 0x2b
- },
-
- "VC4_Engine_00",// DXGK_POWER_RUNTIME_COMPONENT.ComponentName
- 2, // DXGK_POWER_RUNTIME_COMPONENT.StateCount
-
- Package () // DXGK_POWER_RUNTIME_COMPONENT.States[] package
- {
- Package () // F0
- {
- 0, // DXGK_POWER_RUNTIME_STATE.TransitionLatency
- 0, // DXGK_POWER_RUNTIME_STATE.ResidencyRequirement
- 1210000, // DXGK_POWER_RUNTIME_STATE.NominalPower (microwatt)
- },
-
- Package () // F1 - Placeholder
- {
- 10000, // DXGK_POWER_RUNTIME_STATE.TransitionLatency
- 10000, // DXGK_POWER_RUNTIME_STATE.ResidencyRequirement
- 4, // DXGK_POWER_RUNTIME_STATE.NominalPower
- },
- }
- }
- }
- })
- Return (RBUF)
- }
- }
-
- // PiQ Mailbox Driver
- Device (RPIQ)
- {
- Name (_HID, "BCM2849")
- Name (_CID, "RPIQ")
- Name (_UID, 0)
- Name (_CCA, 0x0)
- Method (_STA)
- {
- Return (0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- MEMORY32FIXED (ReadWrite, 0, BCM2836_MBOX_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_MBOX_INTERRUPT }
- })
-
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_MBOX_OFFSET)
- Return (^RBUF)
- }
- }
-
- // VCHIQ Driver
- Device (VCIQ)
- {
- Name (_HID, "BCM2835")
- Name (_CID, "VCIQ")
- Name (_UID, 0)
- Name (_CCA, 0x0)
- Name (_DEP, Package() { \_SB.RPIQ })
- Method (_STA)
- {
- Return (0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- MEMORY32FIXED (ReadWrite, 0, BCM2836_VCHIQ_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_VCHIQ_INTERRUPT }
- })
-
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_VCHIQ_OFFSET)
- Return (^RBUF)
- }
- }
-
- // VC Shared Memory Driver
- Device (VCSM)
- {
- Name (_HID, "BCM2856")
- Name (_CID, "VCSM")
- Name (_UID, 0)
- Name (_CCA, 0x0)
- Name (_DEP, Package() { \_SB.VCIQ })
- Method (_STA)
- {
- Return (0xf)
- }
- }
-
- // Description: GPIO
- Device (GPI0)
- {
- Name (_HID, "BCM2845")
- Name (_CID, "BCMGPIO")
- Name (_UID, 0x0)
- Name (_CCA, 0x0)
- Method (_STA)
- {
- Return(0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- MEMORY32FIXED (ReadWrite, 0, GPIO_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2386_GPIO_INTERRUPT0, BCM2386_GPIO_INTERRUPT1 }
- })
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, GPIO_OFFSET)
- Return (^RBUF)
- }
- }
-
-#if (RPI_MODEL == 4)
- Device (ETH0)
- {
- Name (_HID, "BCM6E4E")
- Name (_CID, "BCM6E4E")
- Name (_UID, 0x0)
- Name (_CCA, 0x0)
- Method (_STA)
- {
- Return (0xf)
- }
- Method (_CRS, 0x0, Serialized)
- {
- Name (RBUF, ResourceTemplate ()
- {
- // No need for MEMORY32SETBASE on Genet as we have a straight base address constant
- MEMORY32FIXED (ReadWrite, GENET_BASE_ADDRESS, GENET_LENGTH, )
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { GENET_INTERRUPT0, GENET_INTERRUPT1 }
- })
- Return (RBUF)
- }
- Name (_DSD, Package () {
- ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
- Package () {
- Package () { "brcm,max-dma-burst-size", 0x08 },
- Package () { "phy-mode", "rgmii-rxid" },
- }
- })
- }
-#endif
-
- // Description: I2C
- Device (I2C1)
- {
- Name (_HID, "BCM2841")
- Name (_CID, "BCMI2C")
- Name (_UID, 0x1)
- Name (_CCA, 0x0)
- Method (_STA)
- {
- Return(0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- MEMORY32FIXED (ReadWrite, 0, BCM2836_I2C1_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_I2C1_INTERRUPT }
-
- //
- // MsftFunctionConfig is encoded as the VendorLong.
- //
- // MsftFunctionConfig (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, ResourceConsumer,) {2, 3}
- //
- VendorLong () // Length = 0x31
- {
- /* 0000 */ 0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60, // .`D....`
- /* 0008 */ 0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD, // J...-#0.
- /* 0010 */ 0x2F, 0x8D, 0x1D, 0x00, 0x01, 0x10, 0x00, 0x01, // /.......
- /* 0018 */ 0x04, 0x00, 0x12, 0x00, 0x00, 0x16, 0x00, 0x20, // ........
- /* 0020 */ 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x5C, // ........
- /* 0028 */ 0x5F, 0x53, 0x42, 0x2E, 0x47, 0x50, 0x49, 0x30, // _SB.GPI0
- /* 0030 */ 0x00 // .
- }
- })
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_I2C1_OFFSET)
- Return (^RBUF)
- }
- }
-
- // I2C2 is the HDMI DDC connection
- Device (I2C2)
- {
- Name (_HID, "BCM2841")
- Name (_CID, "BCMI2C")
- Name (_UID, 0x2)
- Name (_CCA, 0x0)
- Method (_STA)
- {
- Return (0xf)
- }
- Name (RBUF, ResourceTemplate()
- {
- MEMORY32FIXED (ReadWrite, 0, BCM2836_I2C2_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_I2C2_INTERRUPT }
- })
-
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_I2C2_OFFSET)
- Return (^RBUF)
- }
- }
-
- // SPI
- Device (SPI0)
- {
- Name (_HID, "BCM2838")
- Name (_CID, "BCMSPI0")
- Name (_UID, 0x0)
- Name (_CCA, 0x0)
- Method (_STA)
- {
- Return (0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- MEMORY32FIXED (ReadWrite, 0, BCM2836_SPI0_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_SPI0_INTERRUPT }
-
- //
- // MsftFunctionConfig is encoded as the VendorLong.
- //
- // MsftFunctionConfig (Exclusive, PullDown, BCM_ALT0, "\\_SB.GPI0", 0, ResourceConsumer, ) {9, 10, 11} // MISO, MOSI, SCLK
- VendorLong () // Length = 0x33
- {
- /* 0000 */ 0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60, // .`D....`
- /* 0008 */ 0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD, // J...-#0.
- /* 0010 */ 0x2F, 0x8D, 0x1F, 0x00, 0x01, 0x10, 0x00, 0x02, // /.......
- /* 0018 */ 0x04, 0x00, 0x12, 0x00, 0x00, 0x18, 0x00, 0x22, // ......."
- /* 0020 */ 0x00, 0x00, 0x00, 0x09, 0x00, 0x0A, 0x00, 0x0B, // ........
- /* 0028 */ 0x00, 0x5C, 0x5F, 0x53, 0x42, 0x2E, 0x47, 0x50, // .\_SB.GP
- /* 0030 */ 0x49, 0x30, 0x00 // I0.
- }
-
- //
- // MsftFunctionConfig is encoded as the VendorLong.
- //
- // MsftFunctionConfig (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, ResourceConsumer, ) {8} // CE0
- VendorLong () // Length = 0x2F
- {
- /* 0000 */ 0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60, // .`D....`
- /* 0008 */ 0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD, // J...-#0.
- /* 0010 */ 0x2F, 0x8D, 0x1B, 0x00, 0x01, 0x10, 0x00, 0x01, // /.......
- /* 0018 */ 0x04, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x1E, // ........
- /* 0020 */ 0x00, 0x00, 0x00, 0x08, 0x00, 0x5C, 0x5F, 0x53, // .....\_S
- /* 0028 */ 0x42, 0x2E, 0x47, 0x50, 0x49, 0x30, 0x00 // B.GPI0.
- }
-
- //
- // MsftFunctionConfig is encoded as the VendorLong.
- //
- // MsftFunctionConfig (Exclusive, PullUp, BCM_ALT0, "\\_SB.GPI0", 0, ResourceConsumer, ) {7} // CE1
- VendorLong () // Length = 0x2F
- {
- /* 0000 */ 0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60, // .`D....`
- /* 0008 */ 0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD, // J...-#0.
- /* 0010 */ 0x2F, 0x8D, 0x1B, 0x00, 0x01, 0x10, 0x00, 0x01, // /.......
- /* 0018 */ 0x04, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x1E, // ........
- /* 0020 */ 0x00, 0x00, 0x00, 0x07, 0x00, 0x5C, 0x5F, 0x53, // .....\_S
- /* 0028 */ 0x42, 0x2E, 0x47, 0x50, 0x49, 0x30, 0x00 // B.GPI0.
- }
- })
-
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_SPI0_OFFSET)
- Return (^RBUF)
- }
- }
-
- Device (SPI1)
- {
- Name (_HID, "BCM2839")
- Name (_CID, "BCMAUXSPI")
- Name (_UID, 0x1)
- Name (_CCA, 0x0)
- Name (_DEP, Package() { \_SB.RPIQ })
- Method (_STA)
- {
- Return (0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- MEMORY32FIXED (ReadWrite, 0, BCM2836_SPI1_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Shared,) { BCM2836_SPI1_INTERRUPT }
-
- //
- // MsftFunctionConfig is encoded as the VendorLong.
- //
- // MsftFunctionConfig(Exclusive, PullDown, BCM_ALT4, "\\_SB.GPI0", 0, ResourceConsumer, ) {19, 20, 21} // MISO, MOSI, SCLK
- VendorLong () // Length = 0x33
- {
- /* 0000 */ 0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60, // .`D....`
- /* 0008 */ 0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD, // J...-#0.
- /* 0010 */ 0x2F, 0x8D, 0x1F, 0x00, 0x01, 0x10, 0x00, 0x02, // /.......
- /* 0018 */ 0x03, 0x00, 0x12, 0x00, 0x00, 0x18, 0x00, 0x22, // ......."
- /* 0020 */ 0x00, 0x00, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15, // ........
- /* 0028 */ 0x00, 0x5C, 0x5F, 0x53, 0x42, 0x2E, 0x47, 0x50, // .\_SB.GP
- /* 0030 */ 0x49, 0x30, 0x00 // I0.
- }
-
- //
- // MsftFunctionConfig is encoded as the VendorLong.
- //
- // MsftFunctionConfig(Exclusive, PullDown, BCM_ALT4, "\\_SB.GPI0", 0, ResourceConsumer, ) {16} // CE2
- VendorLong () // Length = 0x2F
- {
- /* 0000 */ 0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60, // .`D....`
- /* 0008 */ 0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD, // J...-#0.
- /* 0010 */ 0x2F, 0x8D, 0x1B, 0x00, 0x01, 0x10, 0x00, 0x02, // /.......
- /* 0018 */ 0x03, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x1E, // ........
- /* 0020 */ 0x00, 0x00, 0x00, 0x10, 0x00, 0x5C, 0x5F, 0x53, // .....\_S
- /* 0028 */ 0x42, 0x2E, 0x47, 0x50, 0x49, 0x30, 0x00 // B.GPI0.
- }
- })
-
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_SPI1_OFFSET)
- Return (^RBUF)
- }
- }
-
- // SPI2 has no pins on GPIO header
- // Device (SPI2)
- // {
- // Name (_HID, "BCM2839")
- // Name (_CID, "BCMAUXSPI")
- // Name (_UID, 0x2)
- // Name (_CCA, 0x0)
- // Name (_DEP, Package() { \_SB.RPIQ })
- // Method (_STA)
- // {
- // Return (0xf) // Disabled
- // }
- // Method (_CRS, 0x0, Serialized)
- // {
- // Name (RBUF, ResourceTemplate ()
- // {
- // MEMORY32FIXED (ReadWrite, BCM2836_SPI2_BASE_ADDRESS, BCM2836_SPI2_LENGTH, RMEM)
- // Interrupt (ResourceConsumer, Level, ActiveHigh, Shared,) { BCM2836_SPI2_INTERRUPT }
- // })
- // Return (RBUF)
- // }
- // }
-
- // PWM Driver
- Device (PWM0)
- {
- Name (_HID, "BCM2844")
- Name (_CID, "BCM2844")
- Name (_UID, 0)
- Name (_CCA, 0x0)
- Method (_STA)
- {
- Return (0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- // DMA channel 11 control
- MEMORY32FIXED (ReadWrite, 0, BCM2836_PWM_DMA_LENGTH, RM01)
- // PWM control
- MEMORY32FIXED (ReadWrite, 0, BCM2836_PWM_CTRL_LENGTH, RM02)
- // PWM control bus
- MEMORY32FIXED (ReadWrite, BCM2836_PWM_BUS_BASE_ADDRESS, BCM2836_PWM_BUS_LENGTH, )
- // PWM control uncached
- MEMORY32FIXED (ReadWrite, BCM2836_PWM_CTRL_UNCACHED_BASE_ADDRESS, BCM2836_PWM_CTRL_UNCACHED_LENGTH, )
- // PWM clock control
- MEMORY32FIXED (ReadWrite, 0, BCM2836_PWM_CLK_LENGTH, RM03)
- // Interrupt DMA channel 11
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_DMA_INTERRUPT }
- // DMA channel 11, DREQ 5 for PWM
- FixedDMA (5, 11, Width32Bit, )
- })
-
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RM01, RB01, BCM2836_PWM_DMA_OFFSET)
- MEMORY32SETBASE (RBUF, RM02, RB02, BCM2836_PWM_CTRL_OFFSET)
- MEMORY32SETBASE (RBUF, RM03, RB03, BCM2836_PWM_CLK_OFFSET)
- Return (^RBUF)
- }
- }
-
- include ("Uart.asl")
- include ("Rhpx.asl")
- }
-}
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Fadt.aslc b/Platform/RaspberryPi/RPi4/AcpiTables/Fadt.aslc
deleted file mode 100644
index ebf58fb7fc3c..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Fadt.aslc
+++ /dev/null
@@ -1,89 +0,0 @@
-/** @file
- *
- * Fixed ACPI Description Table (FADT)
- *
- * Copyright (c) 2019, Pete Batard <pete@akeo.ie>
- * Copyright (c) 2018, Andrey Warkentin <andrey.warkentin@gmail.com>
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-#include <IndustryStandard/Acpi.h>
-#include <Library/AcpiLib.h>
-#include <Library/PcdLib.h>
-
-#include "AcpiTables.h"
-
-/*
- * Note: Use ACPI 5.1 since we need to match MADT ACPI requirements
- */
-EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE Fadt = {
- ACPI_HEADER (
- EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
- EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE,
- EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_REVISION
- ),
- 0, // UINT32 FirmwareCtrl
- 0, // UINT32 Dsdt
- EFI_ACPI_RESERVED_BYTE, // UINT8 Reserved0
- EFI_ACPI_5_1_PM_PROFILE_APPLIANCE_PC, // UINT8 PreferredPmProfile
- 0, // UINT16 SciInt
- 0, // UINT32 SmiCmd
- 0, // UINT8 AcpiEnable
- 0, // UINT8 AcpiDisable
- 0, // UINT8 S4BiosReq
- 0, // UINT8 PstateCnt
- 0, // UINT32 Pm1aEvtBlk
- 0, // UINT32 Pm1bEvtBlk
- 0, // UINT32 Pm1aCntBlk
- 0, // UINT32 Pm1bCntBlk
- 0, // UINT32 Pm2CntBlk
- 0, // UINT32 PmTmrBlk
- 0, // UINT32 Gpe0Blk
- 0, // UINT32 Gpe1Blk
- 0, // UINT8 Pm1EvtLen
- 0, // UINT8 Pm1CntLen
- 0, // UINT8 Pm2CntLen
- 0, // UINT8 PmTmrLen
- 0, // UINT8 Gpe0BlkLen
- 0, // UINT8 Gpe1BlkLen
- 0, // UINT8 Gpe1Base
- 0, // UINT8 CstCnt
- 0, // UINT16 PLvl2Lat
- 0, // UINT16 PLvl3Lat
- 0, // UINT16 FlushSize
- 0, // UINT16 FlushStride
- 0, // UINT8 DutyOffset
- 0, // UINT8 DutyWidth
- 0, // UINT8 DayAlrm
- 0, // UINT8 MonAlrm
- 0, // UINT8 Century
- EFI_ACPI_RESERVED_WORD, // UINT16 IaPcBootArch (Reserved on ARM)
- EFI_ACPI_RESERVED_BYTE, // UINT8 Reserved1
- EFI_ACPI_5_1_WBINVD | EFI_ACPI_5_1_SLP_BUTTON | // UINT32 Flags
- EFI_ACPI_5_1_HW_REDUCED_ACPI,
- NULL_GAS, // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ResetReg
- 0, // UINT8 ResetValue
- EFI_ACPI_5_1_ARM_PSCI_COMPLIANT, // UINT16 ArmBootArchFlags
- EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION, // UINT8 MinorRevision
- 0, // UINT64 XFirmwareCtrl
- 0, // UINT64 XDsdt
- NULL_GAS, // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk
- NULL_GAS, // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk
- NULL_GAS, // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk
- NULL_GAS, // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk
- NULL_GAS, // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk
- NULL_GAS, // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk
- NULL_GAS, // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe0Blk
- NULL_GAS, // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe1Blk
- NULL_GAS, // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepControlReg
- NULL_GAS // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepStatusReg
-};
-
-//
-// Reference the table being generated to prevent the optimizer from removing the
-// data structure from the executable
-//
-VOID* CONST ReferenceAcpiTable = &Fadt;
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Gtdt.aslc b/Platform/RaspberryPi/RPi4/AcpiTables/Gtdt.aslc
deleted file mode 100644
index 8453e487fb63..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Gtdt.aslc
+++ /dev/null
@@ -1,55 +0,0 @@
-/** @file
-* Generic Timer Description Table (GTDT)
-*
-* Copyright (c) 2018, Linaro Limited. All rights reserved.
-* Copyright (c) 2012 - 2016, ARM Limited. All rights reserved.
-*
-* SPDX-License-Identifier: BSD-2-Clause-Patent
-*
-**/
-
-#include <IndustryStandard/Acpi.h>
-#include <Library/AcpiLib.h>
-#include <Library/PcdLib.h>
-
-#include "AcpiTables.h"
-
-#define RPI_GTDT_GLOBAL_FLAGS 0
-#define RPI_GTDT_GTIMER_FLAGS EFI_ACPI_5_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY
-
-#pragma pack (1)
-
-typedef struct {
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt;
-} EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES;
-
-#pragma pack ()
-
-EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
- {
- ACPI_HEADER(
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLES,
- EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION
- ),
- RPI_SYSTEM_TIMER_BASE_ADDRESS, // UINT64 PhysicalAddress
- 0, // UINT32 Reserved
- FixedPcdGet32 (PcdArmArchTimerSecIntrNum), // UINT32 SecurePL1TimerGSIV
- RPI_GTDT_GTIMER_FLAGS, // UINT32 SecurePL1TimerFlags
- FixedPcdGet32 (PcdArmArchTimerIntrNum), // UINT32 NonSecurePL1TimerGSIV
- RPI_GTDT_GTIMER_FLAGS, // UINT32 NonSecurePL1TimerFlags
- FixedPcdGet32 (PcdArmArchTimerVirtIntrNum), // UINT32 VirtualTimerGSIV
- RPI_GTDT_GTIMER_FLAGS, // UINT32 VirtualTimerFlags
- FixedPcdGet32 (PcdArmArchTimerHypIntrNum), // UINT32 NonSecurePL2TimerGSIV
- RPI_GTDT_GTIMER_FLAGS, // UINT32 NonSecurePL2TimerFlags
- 0xFFFFFFFFFFFFFFFF, // UINT64 CntReadBasePhysicalAddress
- 0, // UINT32 PlatformTimerCount
- 0 // UINT32 PlatfromTimerOffset
- },
-};
-
-//
-// Reference the table being generated to prevent the optimizer
-// from removing the data structure from the executable
-//
-VOID* CONST ReferenceAcpiTable = &Gtdt;
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Madt.aslc b/Platform/RaspberryPi/RPi4/AcpiTables/Madt.aslc
deleted file mode 100644
index 4029cd191ab5..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Madt.aslc
+++ /dev/null
@@ -1,80 +0,0 @@
-/** @file
-* Multiple APIC Description Table (MADT)
-*
-* Copyright (c) 2016 Linaro Ltd. All rights reserved.
-* Copyright (c) 2012 - 2015, ARM Limited. All rights reserved.
-*
-* SPDX-License-Identifier: BSD-2-Clause-Patent
-*
-**/
-
-#include <IndustryStandard/Acpi.h>
-#include <Library/AcpiLib.h>
-#include <Library/ArmLib.h>
-#include <Library/PcdLib.h>
-
-#include "AcpiTables.h"
-
-//
-// Multiple APIC Description Table
-//
-#pragma pack (1)
-
-typedef struct {
- EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header;
- EFI_ACPI_5_1_GIC_STRUCTURE GicInterfaces[4];
-#if (RPI_MODEL != 3)
- EFI_ACPI_5_1_GIC_DISTRIBUTOR_STRUCTURE GicDistributor;
-#endif
-} PI_MULTIPLE_APIC_DESCRIPTION_TABLE;
-
-#pragma pack ()
-
-PI_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
- {
- ACPI_HEADER (
- EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE,
- PI_MULTIPLE_APIC_DESCRIPTION_TABLE,
- EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION
- ),
- //
- // MADT specific fields
- //
- 0, // LocalApicAddress
- 0, // Flags
- },
- {
-#if (RPI_MODEL == 3)
- EFI_ACPI_5_1_GICC_STRUCTURE_INIT(
- 0, 0, GET_MPID(0, 0), EFI_ACPI_5_1_GIC_ENABLED, 0x09, 0x40000000, 0, 0, 0, 0),
- EFI_ACPI_5_1_GICC_STRUCTURE_INIT(
- 1, 1, GET_MPID(0, 1), EFI_ACPI_5_1_GIC_ENABLED, 0x09, 0x40000000, 0, 0, 0, 0),
- EFI_ACPI_5_1_GICC_STRUCTURE_INIT(
- 2, 2, GET_MPID(0, 2), EFI_ACPI_5_1_GIC_ENABLED, 0x09, 0x40000000, 0, 0, 0, 0),
- EFI_ACPI_5_1_GICC_STRUCTURE_INIT(
- 3, 3, GET_MPID(0, 3), EFI_ACPI_5_1_GIC_ENABLED, 0x09, 0x40000000, 0, 0, 0, 0),
-#elif (RPI_MODEL == 4)
- EFI_ACPI_5_1_GICC_STRUCTURE_INIT(
- 0, 0, GET_MPID(0, 0), EFI_ACPI_5_1_GIC_ENABLED, 48, FixedPcdGet64 (PcdGicInterruptInterfaceBase),
- 0xFF846000, 0xFF844000, 0x19, 0),
- EFI_ACPI_5_1_GICC_STRUCTURE_INIT(
- 1, 1, GET_MPID(0, 1), EFI_ACPI_5_1_GIC_ENABLED, 49, FixedPcdGet64 (PcdGicInterruptInterfaceBase),
- 0xFF846000, 0xFF844000, 0x19, 0),
- EFI_ACPI_5_1_GICC_STRUCTURE_INIT(
- 2, 2, GET_MPID(0, 2), EFI_ACPI_5_1_GIC_ENABLED, 50, FixedPcdGet64 (PcdGicInterruptInterfaceBase),
- 0xFF846000, 0xFF844000, 0x19, 0),
- EFI_ACPI_5_1_GICC_STRUCTURE_INIT(
- 3, 3, GET_MPID(0, 3), EFI_ACPI_5_1_GIC_ENABLED, 51, FixedPcdGet64 (PcdGicInterruptInterfaceBase),
- 0xFF846000, 0xFF844000, 0x19, 0),
-#endif
- },
-#if (RPI_MODEL != 3)
- EFI_ACPI_5_0_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet64 (PcdGicDistributorBase), 0)
-#endif
-};
-
-//
-// Reference the table being generated to prevent the optimizer from removing the
-// data structure from the executable
-//
-VOID* CONST ReferenceAcpiTable = &Madt;
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Pep.asl b/Platform/RaspberryPi/RPi4/AcpiTables/Pep.asl
deleted file mode 100644
index 8a0a44e1c4c9..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Pep.asl
+++ /dev/null
@@ -1,90 +0,0 @@
-/** @file
- *
- * Platform Extension Plugin (PEP).
- *
- * Copyright (c) 2019, ARM Ltd. All rights reserved.
- * Copyright (c) 2018, Andrey Warkentin <andrey.warkentin@gmail.com>
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-Device(PEPD)
-{
- //
- // PEP virtual device.
- //
- Name (_HID, "BCM2854") // Note: Since PEP on RPi is a virtual device,
- Name (_CID, "BCM2854") // its device id needs to be generated by Microsoft
- Name (_UID, 0x0)
- Name (_CRS, ResourceTemplate ()
- {
- // No hardware resources for PEP driver are needed.
- })
-
- //
- // Processor info. PEP proprietary method to return
- // PEP_PROCESSOR_TABLE_PLAT structure.
- //
- // See Pep.h and Pep.c.
- //
- Name (_GPI, Buffer()
- {
- 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x5F, 0x00, 0x53,
- 0x00, 0x42, 0x00, 0x2E, 0x00, 0x43, 0x00, 0x50, 0x00, 0x55, 0x00, 0x30,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
- })
-
- //
- // Coordinated state info. PEP proprietary method to return
- // PEP_COORDINATED_STATE_TABLE_PLAT structure.
- //
- // See Pep.h and Pep.c.
- //
- Name (_GCI, Buffer()
- {
- 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00
- })
-
- //
- // Device info. PEP proprietary method to return
- // PEP_DEVICE_TABLE_PLAT structure.
- //
- // See Pep.h and Pep.c.
- //
- Name (_GDI, Buffer()
- {
- 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x5F, 0x00, 0x53,
- 0x00, 0x42, 0x00, 0x2E, 0x00, 0x49, 0x00, 0x32, 0x00, 0x43, 0x00, 0x30,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
- 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
- })
-}
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Pep.c b/Platform/RaspberryPi/RPi4/AcpiTables/Pep.c
deleted file mode 100644
index f452580c703d..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Pep.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/** @file
- *
- * PEP device tables
- *
- * Copyright (c) 2019, ARM Ltd. All rights reserved.
- * Copyright (c) 2018, Andrei Warkentin <andrey.warkentin@gmail.com>
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-#include "Pep.h"
-
-PEP_PROCESSOR_TABLE_PLAT RpiProcessors = {
- 1, // Version
- 1, // NumberProcessors
- { // ProcessorInfo
- { // [0]
- L"\\_SB.CPU0", // DevicePath, wchar_t[16]
- 0, // FeedbackCounterCount
- 0x00000000, // Flags
- 0, // NumberIdleStates
- 0, // NumberPerfStates
- { // IdleInfo
- },
- { // perfinfo
- }
- }
- }
-};
-
-PEP_COORDINATED_STATE_TABLE_PLAT RpiCoordinatedStates = {
- 1, // Version
- 1, // CoordinatedStateCount
- { // CordinatedStates[]
- { // [0]
- { // DependencyInfo
- { // [0]
- 1, // ExpectedState
- 0, // TargetProcessor
- 0x0 | 0x2 | 0x4, // LooseDependency = FALSE, InitialState = TRUE, DependentState = TRUE
- }
- },
- SOC_STATE_TYPE, // StateType
- 0x1, // Flags
- 0, // Latency
- 0, // BreakEvenDuration
- 1, // DependencyCount
- 1, // MaximumDependencySize
- }
- }
-};
-
-PEP_DEVICE_TABLE_PLAT RpiDevices = {
- 1, // Version
- 1, // NumberDevices
- { // DeviceInfo
- { // [1]
- L"\\_SB.I2C0", // DevicePath, wchar_t[16]
- 0x1 | (1 << 3), // DStateSupportMask (D0 and D3)
- 1, // NumberCompoenents
- { // DStateRequirement
- { // [0]
- PowerDeviceD3 // DState
- }
- },
- { // FStateRequirement
- { // [0]
- { // FState
- { // [0]
- 0
- }
- }
- }
- }
- }
- }
-};
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Pep.h b/Platform/RaspberryPi/RPi4/AcpiTables/Pep.h
deleted file mode 100644
index 30f6768f12a5..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Pep.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/** @file
- *
- * PEP device defines
- *
- * Copyright (c) 2019, ARM Ltd. All rights reserved.
- * Copyright (c) 2018, Andrei Warkentin <andrey.warkentin@gmail.com>
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-/*
- * Note: Not everything is here. At least SOC_STATE_TYPE is missing.
- */
-
-#ifndef _RPI_PEP_H_INCLUDED_
-#define _RPI_PEP_H_INCLUDED_
-
-#include <IndustryStandard/Acpi.h>
-
-#define PEP_MAX_DEPENDENCIES_PER_STATE 16
-#define MAX_PROCESSOR_PATH_LENGTH 16
-#define MAX_DEVICE_PATH_LENGTH 32
-#define MAX_COMPONENT_COUNT 8
-#define P_NUMBER_PROCESSORS 1
-#define P_NUMBER_IDLE_STATES 1
-#define P_NUMBER_PERF_STATES 0
-#define P_NUMBER_DEVICES 1
-#define P_NUMBER_COORDINATED_STATS 1
-
-typedef struct _PEP_PROCESSOR_IDLE_STATE_INFO {
- UINT32 Ulong;
- UINT32 Latency;
- UINT32 BreakEvenDuration;
-} PEP_PROCESSOR_IDLE_STATE_INFO, *PEP_PROCESSOR_IDLE_STATE_INFO;
-
-typedef struct _PEP_PROCESSOR_IDLE_INFO_PLAT {
- //
- // Processor idle states.
- //
- PEP_PROCESSOR_IDLE_STATE_INFO IdleStates[P_NUMBER_IDLE_STATES];
-} PEP_PROCESSOR_IDLE_INFO_PLAT, *PPEP_PROCESSOR_IDLE_INFO_PLAT;
-
-typedef struct COORDINATED_DEPENDENCY_INFO {
- UINT32 ExpectedState;
- UINT32 TargetProcessor;
- UINT32 Ulong;
-} COORDINATED_DEPENDENCY_INFO, *PCOORDINATED_DEPENDENCY_INFO;
-
-typedef struct {
- COORDINATED_DEPENDENCY_INFO DependencyInfo[PEP_MAX_DEPENDENCIES_PER_STATE];
- UINT32 StateType;
- UINT32 Ulong;
- UINT32 Latency;
- UINT32 BreakEvenDuration;
- UINT32 DependencyCount;
- UINT32 MaximumDependencySize;
-} COORDINATED_STATE_INFO;
-
-typedef struct {
- UINT32 Unused;
-} PEP_PROCESSOR_PERF_INFO;
-
-typedef struct {
- UINT32 FState[MAX_COMPONENT_COUNT];
-} COORDINATED_FSTATE_REQUIREMENT;
-
-typedef struct {
- UINT32 DState;
-} COORDINATED_DSTATE_REQUIREMENT;
-
-//
-// Top level device table
-// *N.B. The exact length of the structure is determined by the NumberIdleStates/NumberPerfStates variables.
-//
-
-typedef struct _PEP_PROCESSOR_INFO_PLAT {
- WCHAR DevicePath[MAX_PROCESSOR_PATH_LENGTH]; // Null-terminated ACPI name
- ULONG FeedbackCounterCount;
- ULONG Flags;
-
- //
- // We are putting the idle/perf state count here (instead
- // of the PEP_PROCESSOR_xxx_INFO structure for the ease of parsing.
- //
- ULONG NumberIdleStates;
- ULONG NumberPerfStates;
-
- PEP_PROCESSOR_IDLE_INFO_PLAT IdleInfo;
- PEP_PROCESSOR_PERF_INFO PerfInfo;
-} PEP_PROCESSOR_INFO_PLAT, *PPEP_PROCESSOR_INFO_PLAT;
-
-typedef struct _PEP_PROCESSOR_TABLE_PLAT {
- UINT32 Version;
- UINT32 NumberProcessors;
- PEP_PROCESSOR_INFO_PLAT ProcessorInfo[P_NUMBER_PROCESSORS];
-} PEP_PROCESSOR_TABLE_PLAT;
-
-typedef struct _PEP_COORDINATED_STATE_TABLE_PLAT {
- ULONG Version;
- ULONG CoordinatedStateCount;
- COORDINATED_STATE_INFO CoordinatedStates[P_NUMBER_COORDINATED_STATS];
-} PEP_COORDINATED_STATE_TABLE_PLAT, *PPEP_COORDINATED_STATE_TABLE_PLAT;
-
-typedef struct _PEP_DEVICE_INFO_PLAT {
- WCHAR DevicePath[MAX_DEVICE_PATH_LENGTH]; // Null-terminated ACPI name
- ULONG DStateSupportMask;
- ULONG NumberComponents;
-
- COORDINATED_DSTATE_REQUIREMENT DStateRequirement[P_NUMBER_COORDINATED_STATS];
- COORDINATED_FSTATE_REQUIREMENT FStateRequirement[P_NUMBER_COORDINATED_STATS];
-} PEP_DEVICE_INFO_PLAT, *PPEP_DEVICE_INFO_PLAT;
-
-typedef struct _PEP_DEVICE_TABLE_PLAT {
- ULONG Version;
- ULONG NumberDevices;
- PEP_DEVICE_INFO_PLAT DeviceInfo[P_NUMBER_DEVICES];
-} PEP_DEVICE_TABLE_PLAT, *PPEP_DEVICE_TABLE_PLAT;
-
-#endif // _RPI_PEP_H_INCLUDED_
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Rhpx.asl b/Platform/RaspberryPi/RPi4/AcpiTables/Rhpx.asl
deleted file mode 100644
index 0971e13ee013..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Rhpx.asl
+++ /dev/null
@@ -1,195 +0,0 @@
-/** @file
- *
- * [DSDT] RHProxy device to enable WinRT API (RHPX)
- *
- * Copyright (c) 2018, Andrey Warkentin <andrey.warkentin@gmail.com>
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-Device (RHPX)
-{
- Name (_HID, "MSFT8000")
- Name (_CID, "MSFT8000")
- Name (_UID, 1)
-
- Name(_CRS, ResourceTemplate ()
- {
- // Index 0
- SPISerialBus ( // SCKL - GPIO 11 - Pin 23
- // MOSI - GPIO 10 - Pin 19
- // MISO - GPIO 9 - Pin 21
- // CE0 - GPIO 8 - Pin 24
- 0, // Device selection (CE0)
- PolarityLow, // Device selection polarity
- FourWireMode, // WireMode
- 8, // DataBit len
- ControllerInitiated, // Slave mode
- 4000000, // Connection speed
- ClockPolarityLow, // Clock polarity
- ClockPhaseFirst, // Clock phase
- "\\_SB.SPI0", // ResourceSource: SPI bus controller name
- 0, // ResourceSourceIndex
- // Resource usage
- // DescriptorName: creates name for offset of resource descriptor
- ) // Vendor Data
-
- // Index 1
- SPISerialBus ( // SCKL - GPIO 11 - Pin 23
- // MOSI - GPIO 10 - Pin 19
- // MISO - GPIO 9 - Pin 21
- // CE1 - GPIO 7 - Pin 26
- 1, // Device selection (CE1)
- PolarityLow, // Device selection polarity
- FourWireMode, // WireMode
- 8, // DataBit len
- ControllerInitiated, // Slave mode
- 4000000, // Connection speed
- ClockPolarityLow, // Clock polarity
- ClockPhaseFirst, // Clock phase
- "\\_SB.SPI0", // ResourceSource: SPI bus controller name
- 0, // ResourceSourceIndex
- // Resource usage
- // DescriptorName: creates name for offset of resource descriptor
- ) // Vendor Data
-
- // Index 2
- I2CSerialBus ( // Pin 3 (GPIO2, SDA1), 5 (GPIO3, SCL1)
- 0xFFFF, // SlaveAddress: placeholder
- , // SlaveMode: default to ControllerInitiated
- 0, // ConnectionSpeed: placeholder
- , // Addressing Mode: default to 7 bit
- "\\_SB.I2C1", // ResourceSource: I2C bus controller name
- ,
- ,
- , // Descriptor Name: creates name for offset of resource descriptor
- ) // Vendor Data
-
- // Index 3
- SPISerialBus ( // SPI1_SCLK - GPIO21
- // SPI1_MOSI - GPIO20
- // SPI1_MISO - GPIO19
- // SPI1_CE2_N - GPIO16
- 2, // Device selection (CE2)
- PolarityLow, // Device selection polarity
- FourWireMode, // WireMode
- 8, // DataBit len
- ControllerInitiated, // Slave mode
- 4000000, // Connection speed
- ClockPolarityLow, // Clock polarity
- ClockPhaseFirst, // Clock phase
- "\\_SB.SPI1", // ResourceSource: SPI bus controller name
- 0, // ResourceSourceIndex
- // Resource usage
- // DescriptorName: creates name for offset of resource descriptor
- ) // Vendor Data
-
- // GPIO 2
- GpioIO (Shared, PullUp, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 2 }
- GpioInt (Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.GPI0",) { 2 }
- // GPIO 3
- GpioIO (Shared, PullUp, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 3 }
- GpioInt (Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.GPI0",) { 3 }
- // GPIO 4
- GpioIO (Shared, PullUp, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 4 }
- GpioInt (Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.GPI0",) { 4 }
- // GPIO 5
- GpioIO (Shared, PullUp, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 5 }
- GpioInt (Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.GPI0",) { 5 }
- // GPIO 6
- GpioIO (Shared, PullUp, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 6 }
- GpioInt (Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.GPI0",) { 6 }
- // GPIO 7
- GpioIO (Shared, PullUp, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 7 }
- GpioInt (Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.GPI0",) { 7 }
- // GPIO 8
- GpioIO (Shared, PullUp, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 8 }
- GpioInt (Edge, ActiveBoth, Shared, PullUp, 0, "\\_SB.GPI0",) { 8 }
- // GPIO 9
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 9 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 9 }
- // GPIO 10
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 10 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 10 }
- // GPIO 11
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 11 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 11 }
- // GPIO 12
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 12 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 12 }
- // GPIO 13
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 13 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 13 }
- // NTRAID#MSFT-7141401-2016/04/7-jordanrh - disable UART muxing
- // until a proper solution can be created for the dmap conflict
- // GPIO 14 - UART TX
- // GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 14 }
- // GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 14 }
- // GPIO 15 - UART RX
- // GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 15 }
- // GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 15 }
- // GPIO 16
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 16 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 16 }
- // GPIO 17
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 17 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 17 }
- // GPIO 18
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 18 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 18 }
- // GPIO 19
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 19 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 19 }
- // GPIO 20
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 20 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 20 }
- // GPIO 21
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 21 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 21 }
- // GPIO 22
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 22 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 22 }
- // GPIO 23
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 23 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 23 }
- // GPIO 24
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 24 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 24 }
- // GPIO 25
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 25 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 25 }
- // GPIO 26
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 26 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 26 }
- // GPIO 27
- GpioIO (Shared, PullDown, 0, 0, IoRestrictionNone, "\\_SB.GPI0", 0, ResourceConsumer,,) { 27 }
- GpioInt (Edge, ActiveBoth, Shared, PullDown, 0, "\\_SB.GPI0",) { 27 }
- })
-
- Name (_DSD, Package()
- {
- ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
- Package ()
- {
- // Reference http://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md
- // SPI 0
- Package (2) { "bus-SPI-SPI0", Package() { 0, 1 } }, // Index 0 & 1
- Package (2) { "SPI0-MinClockInHz", 7629 }, // 7629 Hz
- Package (2) { "SPI0-MaxClockInHz", 125000000 }, // 125 MHz
- Package (2) { "SPI0-SupportedDataBitLengths", Package() { 8 } }, // Data Bit Length
- // I2C1
- Package (2) { "bus-I2C-I2C1", Package() { 2 } },
- // GPIO Pin Count and supported drive modes
- Package (2) { "GPIO-PinCount", 54 },
- Package (2) { "GPIO-UseDescriptorPinNumbers", 1 },
- Package (2) { "GPIO-SupportedDriveModes", 0xf }, // InputHighImpedance, InputPullUp, InputPullDown, OutputCmos
- // SPI 1
- Package (2) { "bus-SPI-SPI1", Package() { 3 }}, // Index 3
- Package (2) { "SPI1-MinClockInHz", 30511 }, // 30.5 kHz
- Package (2) { "SPI1-MaxClockInHz", 20000000 }, // 20 MHz
- Package (2) { "SPI1-SupportedDataBitLengths", Package() { 8 } }, // Data Bit Length
- }
- })
-}
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Sdhc.asl b/Platform/RaspberryPi/RPi4/AcpiTables/Sdhc.asl
deleted file mode 100644
index 0ab1ba27f2cf..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Sdhc.asl
+++ /dev/null
@@ -1,107 +0,0 @@
-/** @file
- *
- * [DSDT] SD controller/card definition (SDHC)
- *
- * Copyright (c) 2020, Pete Batard <pete@akeo.ie>
- * Copyright (c) 2018, Andrey Warkentin <andrey.warkentin@gmail.com>
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-#include <IndustryStandard/Bcm2836SdHost.h>
-#include <IndustryStandard/Bcm2836Sdio.h>
-
-#include "AcpiTables.h"
-
-//
-// Note: UEFI can use either SDHost or Arasan. We expose both to the OS.
-//
-
-// ArasanSD 3.0 SD Host Controller.
-Device (SDC1)
-{
- Name (_HID, "BCM2847")
- Name (_CID, "ARASAN")
- Name (_UID, 0x0)
- Name (_CCA, 0x0)
- Name (_S1D, 0x1)
- Name (_S2D, 0x1)
- Name (_S3D, 0x1)
- Name (_S4D, 0x1)
- Method (_STA)
- {
- Return(0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- MEMORY32FIXED (ReadWrite, 0, MMCHS1_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_MMCHS1_INTERRUPT }
- })
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, MMCHS1_OFFSET)
- Return (^RBUF)
- }
-
- //
- // A child device that represents the
- // sd card, which is marked as non-removable.
- //
- Device (SDMM)
- {
- Method (_ADR)
- {
- Return (0)
- }
- Method (_RMV) // Is removable
- {
- Return (0) // 0 - fixed
- }
- }
-}
-
-
-// Broadcom SDHost 2.0 SD Host Controller
-Device (SDC2)
-{
- Name (_HID, "BCM2855")
- Name (_CID, "SDHST")
- Name (_UID, 0x0)
- Name (_CCA, 0x0)
- Name (_S1D, 0x1)
- Name (_S2D, 0x1)
- Name (_S3D, 0x1)
- Name (_S4D, 0x1)
- Method (_STA)
- {
- Return (0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- MEMORY32FIXED (ReadWrite, 0, SDHOST_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_SDHOST_INTERRUPT }
- })
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, SDHOST_OFFSET)
- Return (^RBUF)
- }
-
- //
- // A child device that represents the
- // sd card, which is marked as non-removable.
- //
- Device (SDMM)
- {
- Method (_ADR)
- {
- Return (0)
- }
- Method (_RMV) // Is removable
- {
- Return (0) // 0 - fixed
- }
- }
-}
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Spcr.aslc b/Platform/RaspberryPi/RPi4/AcpiTables/Spcr.aslc
deleted file mode 100644
index bec4ad660ec9..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Spcr.aslc
+++ /dev/null
@@ -1,97 +0,0 @@
-/** @file
-* SPCR Table
-*
-* Copyright (c) 2019 Pete Batard <pete@akeo.ie>
-* Copyright (c) 2014-2016, ARM Limited. All rights reserved.
-*
-* SPDX-License-Identifier: BSD-2-Clause-Patent
-*
-**/
-
-#include <IndustryStandard/Acpi.h>
-#include <IndustryStandard/Bcm2836.h>
-#include <IndustryStandard/SerialPortConsoleRedirectionTable.h>
-#include <Library/AcpiLib.h>
-#include <Library/PcdLib.h>
-
-#include "AcpiTables.h"
-
-#define RPI_UART_FLOW_CONTROL_NONE 0
-
-// Prefer PL011 serial output on the Raspberry Pi 4
-#if (RPI_MODEL == 4)
-#define RPI_UART_INTERFACE_TYPE EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_ARM_PL011_UART
-#define RPI_UART_BASE_ADDRESS BCM2836_PL011_UART_BASE_ADDRESS
-#define RPI_UART_INTERRUPT BCM2836_PL011_UART_INTERRUPT
-#else
-#define RPI_UART_INTERFACE_TYPE EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_BCM2835_UART
-#define RPI_UART_BASE_ADDRESS BCM2836_MINI_UART_BASE_ADDRESS
-#define RPI_UART_INTERRUPT BCM2836_MINI_UART_INTERRUPT
-#endif
-STATIC EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE Spcr = {
- ACPI_HEADER (
- EFI_ACPI_5_1_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE,
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE,
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION
- ),
- // UINT8 InterfaceType;
- RPI_UART_INTERFACE_TYPE,
- // UINT8 Reserved1[3];
- {
- EFI_ACPI_RESERVED_BYTE,
- EFI_ACPI_RESERVED_BYTE,
- EFI_ACPI_RESERVED_BYTE
- },
- // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE BaseAddress;
- ARM_GAS32 (RPI_UART_BASE_ADDRESS),
- // UINT8 InterruptType;
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_GIC,
- // UINT8 Irq;
- 0, // Not used on ARM
- // UINT32 GlobalSystemInterrupt;
- RPI_UART_INTERRUPT,
- // UINT8 BaudRate;
-#if (FixedPcdGet64 (PcdUartDefaultBaudRate) == 9600)
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_9600,
-#elif (FixedPcdGet64 (PcdUartDefaultBaudRate) == 19200)
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_19200,
-#elif (FixedPcdGet64 (PcdUartDefaultBaudRate) == 57600)
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_57600,
-#elif (FixedPcdGet64 (PcdUartDefaultBaudRate) == 115200)
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200,
-#else
-#error Unsupported SPCR Baud Rate
-#endif
- // UINT8 Parity;
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY,
- // UINT8 StopBits;
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1,
- // UINT8 FlowControl;
- RPI_UART_FLOW_CONTROL_NONE,
- // UINT8 TerminalType;
- EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT_UTF8,
- // UINT8 Reserved2;
- EFI_ACPI_RESERVED_BYTE,
- // UINT16 PciDeviceId;
- 0xFFFF,
- // UINT16 PciVendorId;
- 0xFFFF,
- // UINT8 PciBusNumber;
- 0x00,
- // UINT8 PciDeviceNumber;
- 0x00,
- // UINT8 PciFunctionNumber;
- 0x00,
- // UINT32 PciFlags;
- 0x00000000,
- // UINT8 PciSegment;
- 0x00,
- // UINT32 Reserved3;
- EFI_ACPI_RESERVED_DWORD
-};
-
-//
-// Reference the table being generated to prevent the optimizer from removing the
-// data structure from the executable
-//
-VOID* CONST ReferenceAcpiTable = &Spcr;
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Uart.asl b/Platform/RaspberryPi/RPi4/AcpiTables/Uart.asl
deleted file mode 100644
index c466247bb33b..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Uart.asl
+++ /dev/null
@@ -1,163 +0,0 @@
-/** @file
- *
- * [DSDT] Serial devices (UART).
- *
- * Copyright (c) 2020, Pete Batard <pete@akeo.ie>
- * Copyright (c) 2018, Andrey Warkentin <andrey.warkentin@gmail.com>
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-#include <IndustryStandard/Bcm2836.h>
-
-#include "AcpiTables.h"
-
-// PL011 based UART.
-Device (URT0)
-{
- Name (_HID, "BCM2837")
- Name (_CID, "ARMH0011")
- Name (_UID, 0x4)
- Name (_CCA, 0x0)
- Method (_STA)
- {
- Return (0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- MEMORY32FIXED (ReadWrite, 0, BCM2836_PL011_UART_LENGTH, RMEM)
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_PL011_UART_INTERRUPT }
- })
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_PL011_UART_OFFSET)
- Return (^RBUF)
- }
-
- Name (CLCK, 48000000)
-
- Name (_DSD, Package ()
- {
- ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package ()
- {
- Package (2) { "clock-frequency", CLCK },
- }
- })
-}
-
-//
-// UART Mini.
-//
-// This device is referenced in the DBG2 table, which will cause the system to
-// not start the driver when the debugger is enabled and to mark the device
-// with problem code 53 (CM_PROB_USED_BY_DEBUGGER).
-//
-
-Device (URTM)
-{
- Name (_HID, "BCM2836")
- Name (_CID, "MINIUART")
- Name (_UID, 0x0)
- Name (_CCA, 0x0)
- Method (_STA)
- {
- Return (0xf)
- }
- Name (RBUF, ResourceTemplate ()
- {
- MEMORY32FIXED (ReadWrite, 0, BCM2836_MINI_UART_LENGTH, RMEM)
- Interrupt(ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_MINI_UART_INTERRUPT }
-
- // NTRAID#MSFT-7141401-2016/04/7-jordanrh - disable UART muxing
- // until a proper solution can be created for the dmap conflict.
- // When muxing is enabled, must consider DBG2 table conflict.
- // The alternate function resource needs to be reserved when
- // the kernel debugger is enabled to prevent another client
- // from muxing the pins away.
-
- //
- // MsftFunctionConfig is encoded as the VendorLong.
- //
- // MsftFunctionConfig(Exclusive, PullDown, BCM_ALT5, "\\_SB.GPI0", 0, ResourceConsumer, ) {14, 15}
- // VendorLong () // Length = 0x31
- // {
- // /* 0000 */ 0x00, 0x60, 0x44, 0xD5, 0xF3, 0x1F, 0x11, 0x60, // .`D....`
- // /* 0008 */ 0x4A, 0xB8, 0xB0, 0x9C, 0x2D, 0x23, 0x30, 0xDD, // J...-#0.
- // /* 0010 */ 0x2F, 0x8D, 0x1D, 0x00, 0x01, 0x10, 0x00, 0x02, // /.......
- // /* 0018 */ 0x02, 0x00, 0x12, 0x00, 0x00, 0x16, 0x00, 0x20, // .......
- // /* 0020 */ 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0F, 0x00, 0x5C, // .......\
- // /* 0028 */ 0x5F, 0x53, 0x42, 0x2E, 0x47, 0x50, 0x49, 0x30, // _SB.GPI0
- // /* 0030 */ 0x00 // .
- //}
-
- })
- Method (_CRS, 0x0, Serialized)
- {
- MEMORY32SETBASE (RBUF, RMEM, RBAS, BCM2836_MINI_UART_OFFSET)
- Return (^RBUF)
- }
-}
-
-//
-// Multifunction serial bus device to support Bluetooth function.
-//
-Device(BTH0)
-{
- Name (_HID, "BCM2EA6")
- Name (_CID, "BCM2EA6")
- Method (_STA)
- {
- Return (0xf)
- }
- Method (_CRS, 0x0, Serialized)
- {
- Name (RBUF, ResourceTemplate ()
- {
- // BT UART: URT0 (PL011) or URTM (miniUART)
- UARTSerialBus(
- 115200, // InitialBaudRate: in BPS
- , // BitsPerByte: default to 8 bits
- , // StopBits: Defaults to one bit
- 0x00, // LinesInUse: 8 1-bit flags to
- // declare enabled control lines.
- // Raspberry Pi does not exposed
- // HW control signals -> not supported.
- // Optional bits:
- // - Bit 7 (0x80) Request To Send (RTS)
- // - Bit 6 (0x40) Clear To Send (CTS)
- // - Bit 5 (0x20) Data Terminal Ready (DTR)
- // - Bit 4 (0x10) Data Set Ready (DSR)
- // - Bit 3 (0x08) Ring Indicator (RI)
- // - Bit 2 (0x04) Data Carrier Detect (DTD)
- // - Bit 1 (0x02) Reserved. Must be 0.
- // - Bit 0 (0x01) Reserved. Must be 0.
- , // IsBigEndian:
- // default to LittleEndian.
- , // Parity: Defaults to no parity
- , // FlowControl: Defaults to
- // no flow control.
- 16, // ReceiveBufferSize
- 16, // TransmitBufferSize
-#if (RPI_MODEL == 4)
- "\\_SB.URTM", // ResourceSource:
-#else
- "\\_SB.URT0", // ResourceSource:
-#endif
- // UART bus controller name
- , // ResourceSourceIndex: assumed to be 0
- , // ResourceUsage: assumed to be
- // ResourceConsumer
- UAR0, // DescriptorName: creates name
- // for offset of resource descriptor
- ) // Vendor data
-
- //
- // RPIQ connection for BT_ON/OFF
- //
- GpioIO (Shared, PullUp, 0, 0, IoRestrictionNone, "\\_SB.RPIQ", 0, ResourceConsumer, , ) { 128 }
- })
- Return (RBUF)
- }
-}
diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Xhci.asl b/Platform/RaspberryPi/RPi4/AcpiTables/Xhci.asl
deleted file mode 100644
index 0083d1992936..000000000000
--- a/Platform/RaspberryPi/RPi4/AcpiTables/Xhci.asl
+++ /dev/null
@@ -1,136 +0,0 @@
-/** @file
- *
- * Copyright (c) 2019 Linaro, Limited. All rights reserved.
- * Copyright (c) 2019 Andrei Warkentin <andrey.warkentin@gmail.com>
- *
- * SPDX-License-Identifier: BSD-2-Clause-Patent
- *
- **/
-
-#include <IndustryStandard/Bcm2711.h>
-
-/*
- * The following can be used to remove parenthesis from
- * defined macros that the compiler complains about.
- */
-#define ISOLATE_ARGS(...) __VA_ARGS__
-#define REMOVE_PARENTHESES(x) ISOLATE_ARGS x
-
-#define SANITIZED_PCIE_CPU_MMIO_WINDOW REMOVE_PARENTHESES(PCIE_CPU_MMIO_WINDOW)
-#define SANITIZED_PCIE_REG_BASE REMOVE_PARENTHESES(PCIE_REG_BASE)
-
-/*
- * According to UEFI boot log for the VLI device on Pi 4.
- */
-#define XHCI_REG_LENGTH 0x1000
-
-Device (SCB0) {
- Name (_HID, "ACPI0004")
- Name (_UID, 0x0)
- Name (_CCA, 0x0)
-
- Method (_CRS, 0, Serialized) { // _CRS: Current Resource Settings
- /*
- * Container devices with _DMA must have _CRS, meaning SCB0
- * to provide all resources that XHC0 consumes (except
- * interrupts).
- */
- Name (RBUF, ResourceTemplate () {
- QWordMemory (ResourceProducer,
- ,
- MinFixed,
- MaxFixed,
- NonCacheable,
- ReadWrite,
- 0x0,
- SANITIZED_PCIE_CPU_MMIO_WINDOW, // MIN
- SANITIZED_PCIE_CPU_MMIO_WINDOW, // MAX
- 0x0,
- 0x1, // LEN
- ,
- ,
- MMIO
- )
- })
- CreateQwordField (RBUF, MMIO._MAX, MMBE)
- CreateQwordField (RBUF, MMIO._LEN, MMLE)
- Add (MMBE, XHCI_REG_LENGTH - 1, MMBE)
- Add (MMLE, XHCI_REG_LENGTH - 1, MMLE)
- Return (RBUF)
- }
-
- Name (_DMA, ResourceTemplate() {
- /*
- * XHC0 is limited to DMA to first 3GB. Note this
- * only applies to PCIe, not GENET or other devices
- * next to the A72.
- */
- QWordMemory (ResourceConsumer,
- ,
- MinFixed,
- MaxFixed,
- NonCacheable,
- ReadWrite,
- 0x0,
- 0x0, // MIN
- 0xbfffffff, // MAX
- 0x0, // TRA
- 0xc0000000, // LEN
- ,
- ,
- )
- })
-
- Device (XHC0)
- {
- Name (_HID, "PNP0D10") // _HID: Hardware ID
- Name (_UID, 0x0) // _UID: Unique ID
- Name (_CCA, 0x0) // _CCA: Cache Coherency Attribute
-
- Method (_CRS, 0, Serialized) { // _CRS: Current Resource Settings
- Name (RBUF, ResourceTemplate () {
- QWordMemory (ResourceConsumer,
- ,
- MinFixed,
- MaxFixed,
- NonCacheable,
- ReadWrite,
- 0x0,
- SANITIZED_PCIE_CPU_MMIO_WINDOW, // MIN
- SANITIZED_PCIE_CPU_MMIO_WINDOW, // MAX
- 0x0,
- 0x1, // LEN
- ,
- ,
- MMIO
- )
- Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, ) {
- 175
- }
- })
- CreateQwordField (RBUF, MMIO._MAX, MMBE)
- CreateQwordField (RBUF, MMIO._LEN, MMLE)
- Add (MMBE, XHCI_REG_LENGTH - 1, MMBE)
- Add (MMLE, XHCI_REG_LENGTH - 1, MMLE)
- Return (RBUF)
- }
-
- Method (_INI, 0, Serialized) {
- OperationRegion (PCFG, SystemMemory, SANITIZED_PCIE_REG_BASE + PCIE_EXT_CFG_DATA, 0x1000)
- Field (PCFG, AnyAcc, NoLock, Preserve) {
- Offset (0),
- VNID, 16, // Vendor ID
- DVID, 16, // Device ID
- CMND, 16, // Command register
- STAT, 16, // Status register
- }
-
- // Set command register to:
- // 1) decode MMIO (set bit 1)
- // 2) enable DMA (set bit 2)
- // 3) enable interrupts (clear bit 10)
- Debug = "xHCI enable"
- Store (0x6, CMND)
- }
- }
-}
diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4/RPi4.dsc
index 09bd19e3b724..c039f6df2eb4 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc
@@ -576,7 +576,7 @@ [Components.common]
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
- Platform/RaspberryPi/$(PLATFORM_NAME)/AcpiTables/AcpiTables.inf
+ Platform/RaspberryPi/AcpiTables/AcpiTables.inf
#
# SMBIOS Support
diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4/RPi4.fdf
index 52ae1e5b65cb..b2a6ac9e6c66 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.fdf
+++ b/Platform/RaspberryPi/RPi4/RPi4.fdf
@@ -238,7 +238,7 @@ [FV.FvMain]
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
- INF RuleOverride = ACPITABLE Platform/RaspberryPi/$(PLATFORM_NAME)/AcpiTables/AcpiTables.inf
+ INF RuleOverride = ACPITABLE Platform/RaspberryPi/AcpiTables/AcpiTables.inf
#
# SMBIOS Support
--
2.21.0.windows.1
next prev parent 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 [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 ` Pete Batard [this message]
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-16-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