From nobody Mon Feb 9 23:17:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+55074+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55074+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1582886368; cv=none; d=zohomail.com; s=zohoarc; b=lzYQvYVm9SxoNvPmbGcX2QIQG2IvILi1kBm21VbvKEzpV8LSVFMKGEV7k3bIUWFHtxI0H0h6h46Y9uSWadFQXjy2UVV9ppUCJRLkl+BAHmxCyGalMOPShMDeKAa07VNmWwDubTUwirUA99FbWF82+HSMMaq7v8ItlwOjOw0EJcM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582886368; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=N3ym6UXXzrUzgHsYN7OmxexDU7S1HsjRJqe06fJGbYQ=; b=Wc5vWI3bDdRDONh1kHrlJ22biDAt7VLYoeXFw9qkJMCYk3wXggrApb271tuctxAWJUzdVOOGslfy36sqaYH8EpywYrJsPzXH5CAjoAnz0APz3DygP4urW6uSjpYHliKEyGtWc5MIFqqJREp2xISGIdMW1yvlxYG4qHHBLbz/YWI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55074+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1582886368510280.50145466881986; Fri, 28 Feb 2020 02:39:28 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id a1j6YY1788612xXkH0EZ2KiL; Fri, 28 Feb 2020 02:39:27 -0800 X-Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.groups.io with SMTP id smtpd.web12.12402.1582886366455164576 for ; Fri, 28 Feb 2020 02:39:26 -0800 X-Received: by mail-wm1-f68.google.com with SMTP id d138so1044353wmd.5 for ; Fri, 28 Feb 2020 02:39:26 -0800 (PST) X-Gm-Message-State: mRsuL3Tc8eJKqXBljUBIbb8gx1787277AA= X-Google-Smtp-Source: APXvYqxUbCR/bL+9FUi3g/H3eHYhwff+2EC0v++TwQNwZ90SBWKNI8hoDE6o6m0+QW89nuIuxPXB5g== X-Received: by 2002:a7b:c183:: with SMTP id y3mr4027985wmi.45.1582886364449; Fri, 28 Feb 2020 02:39:24 -0800 (PST) X-Received: from localhost.localdomain ([84.203.56.244]) by smtp.gmail.com with ESMTPSA id s8sm12341061wrt.57.2020.02.28.02.39.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Feb 2020 02:39:23 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com Subject: [edk2-devel] [edk2-platforms][PATCH 11/15] Platform/RPi4: Move ACPI interrupts definitions to AcpiTables.h Date: Fri, 28 Feb 2020 10:38:51 +0000 Message-Id: <20200228103855.11352-12-pete@akeo.ie> In-Reply-To: <20200228103855.11352-1-pete@akeo.ie> References: <20200228103855.11352-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582886367; bh=pPnMqEz4GB8jk+dR96dyQk1bj+7PrgMmYWLhNKWQHIY=; h=Cc:Date:From:Reply-To:Subject:To; b=q9uOJbtVKy1MDdbrCfty9ir7aONfAAJ2IeBcl8gHg1a/QaFidP6ZDcpxTgydNKo3QTx 2o943yg9lhvEfU04wV7tIeCmaziAewBuJ9+gDE2Bk99GTuRNlQSDDMU4qiaftQvzZu4lu CJCfhrMW/57Rm8aYAkPUUGQNqkwZNvhbawM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The ACPI interrupts are not the same across different Raspberry Pi platforms therefore moving them into AcpiTables.h will help with ACPI code factorization. We also take this opportunity to move the serial interrupt definitions away from Silicon, since the ones defined in Bcm2836.h only applied to the Raspberry Pi 4. Signed-off-by: Pete Batard --- Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h | 28 +++++++++= ++++++ Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl | 36 +++++++++= +---------- Platform/RaspberryPi/RPi4/AcpiTables/Sdhc.asl | 4 +-- Platform/RaspberryPi/RPi4/AcpiTables/Uart.asl | 4 +-- Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h | 2 -- 5 files changed, 50 insertions(+), 24 deletions(-) diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h b/Platform/R= aspberryPi/RPi4/AcpiTables/AcpiTables.h index fcfad3b5d93b..3d1737aed41a 100644 --- a/Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h +++ b/Platform/RaspberryPi/RPi4/AcpiTables/AcpiTables.h @@ -97,4 +97,32 @@ typedef struct UINT32 UID; // 4 bytes } EFI_ACPI_5_1_CSRT_RESOURCE_DESCRIPTOR_HEADER; =20 +//------------------------------------------------------------------------ +// Interrupts. These are specific to each platform +//------------------------------------------------------------------------ +#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 // __ACPITABLES_H__ diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl b/Platform/Raspb= erryPi/RPi4/AcpiTables/Dsdt.asl index c505413bcba2..e1ddb742376a 100644 --- a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl +++ b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl @@ -87,7 +87,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2", 2) Name (RBUF, ResourceTemplate () { MEMORY32FIXED (ReadWrite, 0, BCM2836_USB_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x69 } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_USB_INTERRUPT } }) Method (_CRS, 0x0, Serialized) { @@ -111,32 +111,32 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2= ", 2) { // Memory and interrupt for the GPU MEMORY32FIXED (ReadWrite, 0, BCM2836_V3D_BUS_LENGTH, RM01) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x2A } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_V3D_BUS_INTERRUPT } =20 // HVS - Hardware Video Scalar MEMORY32FIXED (ReadWrite, 0, BCM2836_HVS_LENGTH, RM02) // The HVS interrupt is reserved by the VPU - // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x= 41 } + // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BC= M2836_HVS_INTERRUPT } =20 // PixelValve0 - DSI0 or DPI // MEMORY32FIXED (ReadWrite, BCM2836_PV0_BASE_ADDRESS, BCM2836_PV0= _LENGTH, RM03) - // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x= 4D } + // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BC= M2836_PV0_INTERRUPT } =20 // PixelValve1 - DS1 or SMI // MEMORY32FIXED (ReadWrite, BCM2836_PV1_BASE_ADDRESS, BCM2836_PV1= _LENGTH, RM04) - // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x= 4E } + // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BC= M2836_PV1_INTERRUPT } =20 // PixelValve2 - HDMI output - connected to HVS display FIFO 1 MEMORY32FIXED (ReadWrite, 0, BCM2836_PV2_LENGTH, RM05) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x4A } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_PV2_INTERRUPT } =20 // HDMI registers MEMORY32FIXED (ReadWrite, 0, BCM2836_HDMI0_LENGTH, RM06) MEMORY32FIXED (ReadWrite, 0, BCM2836_HDMI1_LENGTH, RM07) // hdmi_int[0] - // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x= 48 } + // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BC= M2836_HDMI0_INTERRUPT } // hdmi_int[1] - // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x= 49 } + // Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BC= M2836_HDMI1_INTERRUPT } =20 // HDMI DDC connection I2CSerialBus (0x50,, 100000,, "\\_SB.I2C2",,,,) // EDID @@ -214,7 +214,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2",= 2) Name (RBUF, ResourceTemplate () { MEMORY32FIXED (ReadWrite, 0, BCM2836_MBOX_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x61 } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_MBOX_INTERRUPT } }) =20 Method (_CRS, 0x0, Serialized) @@ -239,7 +239,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2",= 2) Name (RBUF, ResourceTemplate () { MEMORY32FIXED (ReadWrite, 0, BCM2836_VCHIQ_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x62 } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_VCHIQ_INTERRUPT } }) =20 Method (_CRS, 0x0, Serialized) @@ -277,7 +277,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2",= 2) Name (RBUF, ResourceTemplate () { MEMORY32FIXED (ReadWrite, 0, GPIO_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { 0x51, 0x= 53 } + Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2386_= GPIO_INTERRUPT0, BCM2386_GPIO_INTERRUPT1 } }) Method (_CRS, 0x0, Serialized) { @@ -302,7 +302,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2",= 2) { // No need for MEMORY32SETBASE on Genet as we have a straight ba= se address constant MEMORY32FIXED (ReadWrite, GENET_BASE_ADDRESS, GENET_LENGTH, ) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xB= D, 0xBE } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { GEN= ET_INTERRUPT0, GENET_INTERRUPT1 } }) Return (RBUF) } @@ -329,7 +329,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2",= 2) Name (RBUF, ResourceTemplate () { MEMORY32FIXED (ReadWrite, 0, BCM2836_I2C1_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { 0x55 } + Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_= I2C1_INTERRUPT } =20 // // MsftFunctionConfig is encoded as the VendorLong. @@ -368,7 +368,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2",= 2) Name (RBUF, ResourceTemplate() { MEMORY32FIXED (ReadWrite, 0, BCM2836_I2C2_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { 0x55 } + Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_= I2C2_INTERRUPT } }) =20 Method (_CRS, 0x0, Serialized) @@ -392,7 +392,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2",= 2) Name (RBUF, ResourceTemplate () { MEMORY32FIXED (ReadWrite, 0, BCM2836_SPI0_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { 0x56 } + Interrupt (ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_= SPI0_INTERRUPT } =20 // // MsftFunctionConfig is encoded as the VendorLong. @@ -459,7 +459,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2",= 2) Name (RBUF, ResourceTemplate () { MEMORY32FIXED (ReadWrite, 0, BCM2836_SPI1_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Shared,) { 0x3D } + Interrupt (ResourceConsumer, Level, ActiveHigh, Shared,) { BCM2836= _SPI1_INTERRUPT } =20 // // MsftFunctionConfig is encoded as the VendorLong. @@ -515,7 +515,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2",= 2) // Name (RBUF, ResourceTemplate () // { // MEMORY32FIXED (ReadWrite, BCM2836_SPI2_BASE_ADDRESS, BCM2836_= SPI2_LENGTH, RMEM) - // Interrupt (ResourceConsumer, Level, ActiveHigh, Shared,) { 0x= 3D } + // Interrupt (ResourceConsumer, Level, ActiveHigh, Shared,) { BC= M2836_SPI2_INTERRUPT } // }) // Return (RBUF) // } @@ -545,7 +545,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2",= 2) // PWM clock control MEMORY32FIXED (ReadWrite, 0, BCM2836_PWM_CLK_LENGTH, RM03) // Interrupt DMA channel 11 - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x3B } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM28= 36_DMA_INTERRUPT } // DMA channel 11, DREQ 5 for PWM FixedDMA (5, 11, Width32Bit, ) }) diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Sdhc.asl b/Platform/Raspb= erryPi/RPi4/AcpiTables/Sdhc.asl index 590c71edd484..0ab1ba27f2cf 100644 --- a/Platform/RaspberryPi/RPi4/AcpiTables/Sdhc.asl +++ b/Platform/RaspberryPi/RPi4/AcpiTables/Sdhc.asl @@ -37,7 +37,7 @@ Device (SDC1) Name (RBUF, ResourceTemplate () { MEMORY32FIXED (ReadWrite, 0, MMCHS1_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x9E } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_M= MCHS1_INTERRUPT } }) Method (_CRS, 0x0, Serialized) { @@ -81,7 +81,7 @@ Device (SDC2) Name (RBUF, ResourceTemplate () { MEMORY32FIXED (ReadWrite, 0, SDHOST_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x98 } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_S= DHOST_INTERRUPT } }) Method (_CRS, 0x0, Serialized) { diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Uart.asl b/Platform/Raspb= erryPi/RPi4/AcpiTables/Uart.asl index 1be285220ad7..c466247bb33b 100644 --- a/Platform/RaspberryPi/RPi4/AcpiTables/Uart.asl +++ b/Platform/RaspberryPi/RPi4/AcpiTables/Uart.asl @@ -28,7 +28,7 @@ Device (URT0) Name (RBUF, ResourceTemplate () { MEMORY32FIXED (ReadWrite, 0, BCM2836_PL011_UART_LENGTH, RMEM) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0x99 } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_P= L011_UART_INTERRUPT } }) Method (_CRS, 0x0, Serialized) { @@ -68,7 +68,7 @@ Device (URTM) Name (RBUF, ResourceTemplate () { MEMORY32FIXED (ReadWrite, 0, BCM2836_MINI_UART_LENGTH, RMEM) - Interrupt(ResourceConsumer, Level, ActiveHigh, Shared) { 0x7D } + Interrupt(ResourceConsumer, Level, ActiveHigh, Shared) { BCM2836_MINI_= UART_INTERRUPT } =20 // NTRAID#MSFT-7141401-2016/04/7-jordanrh - disable UART muxing // until a proper solution can be created for the dmap conflict. diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h b/= Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h index 0b402e9ac56e..a930c64af379 100644 --- a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h +++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h @@ -80,12 +80,10 @@ #define BCM2836_PL011_UART_OFFSET 0x00201000 #define BCM2836_PL011_UART_BASE_ADDRESS (BCM2836_SOC_R= EGISTERS + BCM2836_PL011_UART_OFFSET) #define BCM2836_PL011_UART_LENGTH 0x00001000 -#define BCM2836_PL011_UART_INTERRUPT 0x99 =20 #define BCM2836_MINI_UART_OFFSET 0x00215000 #define BCM2836_MINI_UART_BASE_ADDRESS (BCM2836_SOC_R= EGISTERS + BCM2836_MINI_UART_OFFSET) #define BCM2836_MINI_UART_LENGTH 0x00000070 -#define BCM2836_MINI_UART_INTERRUPT 0x7D =20 #define BCM2836_I2C0_OFFSET 0x00205000 #define BCM2836_I2C0_BASE_ADDRESS (BCM2836_SOC_R= EGISTERS + BCM2836_I2C0_OFFSET) --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55074): https://edk2.groups.io/g/devel/message/55074 Mute This Topic: https://groups.io/mt/71605850/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-