From nobody Sun Feb 8 23:13:23 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+55071+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+55071+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1582886363; cv=none; d=zohomail.com; s=zohoarc; b=d/S0UV2fgXZlsG946Cz1gkHTQKuZGBocSgLy9+EOAW+putmh8VeXITP0Y1aMXIDIglkJMITu6IV5GqC/TgUJPTaqKEjHONz0rgsfIZKvnL+y9zYE+AfHaWVQvO3XHnHQu0HD5F3G1A5jJBfhECHhxAV3jIpAH1l4wftzgpH7NPg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582886363; 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=5x8dbuEuQzLg4TWsJJKiPpaztVNJKoHffw0fI+LD7ZE=; b=Bqfkl6SZxkFI//B9ppVjAQxk3iJs7sYS2zt2cehV+Sl/NJfSL6Noj9aic2bPp3WdMmFkqz7yru4oCmUpJ54CQmBaul4Z8amslE5qt6cTeXd3che1AlZgn2U3hyYDLE/5RIVAqyryXrUoXckwF80c6LL0tC/7prM0ivItxx+/wMI= 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+55071+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1582886363746877.5878534944143; Fri, 28 Feb 2020 02:39:23 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id bV06YY1788612xLdx5QMhEEW; Fri, 28 Feb 2020 02:39:22 -0800 X-Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web10.12438.1582886361900863563 for ; Fri, 28 Feb 2020 02:39:22 -0800 X-Received: by mail-wr1-f68.google.com with SMTP id x7so2426696wrr.0 for ; Fri, 28 Feb 2020 02:39:21 -0800 (PST) X-Gm-Message-State: 7hKaDx9hNcP4isHc1t9Sb0p4x1787277AA= X-Google-Smtp-Source: APXvYqxHPYyaw74nHnnESVKR5A7zi6PzKGf+1txZ731pqRzJkU4Qubhtxbejg6b/8GG+XzwRin+i6Q== X-Received: by 2002:adf:914e:: with SMTP id j72mr4296485wrj.109.1582886360165; Fri, 28 Feb 2020 02:39:20 -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.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Feb 2020 02:39:19 -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 08/15] Platform/RPi3: Update CSRT table to ACPI 5.1 Date: Fri, 28 Feb 2020 10:38:48 +0000 Message-Id: <20200228103855.11352-9-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=1582886362; bh=lYBoUSfOBw4gVWZPEEU+IEsWkFoVABJ/YkkXBkoBPqY=; h=Cc:Date:From:Reply-To:Subject:To; b=eN1uubnOjH7BTnbC1DB9fVt1SQXA9D9zCTwaaSd2dthJT+pkRrmxn3EYnBXUp50nl97 V7JEHHd746R0jeaDepTsr8oVXBRY0llp4M6Uj15YaoeUE3NiENXaxAiagasPpYn0Fh0Mn hwg/DVa9m8sYbfVCFr8hdoGgNprRuEcSm68= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" This brings this table in line with what we have for Pi 4 and will enable factorization of ACPI code between the two platforms. Signed-off-by: Pete Batard --- Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.h | 24 ++++++++++++++++---- Platform/RaspberryPi/RPi3/AcpiTables/Csrt.aslc | 14 ++++++------ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.h b/Platform/R= aspberryPi/RPi3/AcpiTables/AcpiTables.h index 3e68923d3c05..9c76624e4ac8 100644 --- a/Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.h +++ b/Platform/RaspberryPi/RPi3/AcpiTables/AcpiTables.h @@ -2,6 +2,7 @@ * * RPi3 defines for constructing ACPI tables * + * Copyright (c) 2019, ARM Ltd. All rights reserved. * Copyright (c) 2018, Andrei Warkentin * Copyright (c) Microsoft Corporation. All rights reserved. * @@ -12,7 +13,7 @@ #ifndef __ACPITABLES_H__ #define __ACPITABLES_H__ =20 -#include +#include =20 // The ASL compiler can't perform arithmetic on MEMORY32SETBASE () // parameters so you can't pass a constant like BASE + OFFSET (the @@ -29,6 +30,21 @@ #define EFI_ACPI_CREATOR_REVISION 0x00000097 =20 #define EFI_ACPI_VENDOR_ID SIGNATURE_32 ('M','S','F','T= ') + +// A macro to initialise the common header part of EFI ACPI tables as defi= ned 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 @@ -36,7 +52,7 @@ #define RPI3_DMA_CHANNEL_COUNT 10 // All 10 DMA channels ar= e listed, including the reserved ones #define RPI3_DMA_USED_CHANNEL_COUNT 5 // Use 5 DMA channels =20 -#define EFI_ACPI_5_0_CSRT_REVISION 0x00000000 +#define EFI_ACPI_5_1_CSRT_REVISION 0x00000000 =20 typedef enum { @@ -68,7 +84,7 @@ typedef struct UINT16 Revision; // 2 bytes UINT16 Reserved; // 2 bytes UINT32 SharedInfoLength; // 4 bytes -} EFI_ACPI_5_0_CSRT_RESOURCE_GROUP_HEADER; +} EFI_ACPI_5_1_CSRT_RESOURCE_GROUP_HEADER; =20 //------------------------------------------------------------------------ // CSRT Resource Descriptor 12 bytes total @@ -79,6 +95,6 @@ typedef struct UINT16 ResourceType; // 2 bytes UINT16 ResourceSubType; // 2 bytes UINT32 UID; // 4 bytes -} EFI_ACPI_5_0_CSRT_RESOURCE_DESCRIPTOR_HEADER; +} EFI_ACPI_5_1_CSRT_RESOURCE_DESCRIPTOR_HEADER; =20 #endif // __ACPITABLES_H__ diff --git a/Platform/RaspberryPi/RPi3/AcpiTables/Csrt.aslc b/Platform/Rasp= berryPi/RPi3/AcpiTables/Csrt.aslc index 62f1a1fbdf19..0a8393a8076b 100644 --- a/Platform/RaspberryPi/RPi3/AcpiTables/Csrt.aslc +++ b/Platform/RaspberryPi/RPi3/AcpiTables/Csrt.aslc @@ -39,7 +39,7 @@ typedef struct //------------------------------------------------------------------------ typedef struct { - EFI_ACPI_5_0_CSRT_RESOURCE_DESCRIPTOR_HEADER DmaControllerHeader; + EFI_ACPI_5_1_CSRT_RESOURCE_DESCRIPTOR_HEADER DmaControllerHeader; DMA_CONTROLLER_VENDOR_DATA ControllerVendorData; } RD_DMA_CONTROLLER; =20 @@ -59,7 +59,7 @@ typedef struct //------------------------------------------------------------------------ typedef struct { - EFI_ACPI_5_0_CSRT_RESOURCE_DESCRIPTOR_HEADER DmaChannelHeader; + EFI_ACPI_5_1_CSRT_RESOURCE_DESCRIPTOR_HEADER DmaChannelHeader; DMA_CHANNEL_VENDOR_DATA ChannelVendorData; } RD_DMA_CHANNEL; =20 @@ -69,7 +69,7 @@ typedef struct =20 typedef struct { - EFI_ACPI_5_0_CSRT_RESOURCE_GROUP_HEADER ResGroupHeader; + EFI_ACPI_5_1_CSRT_RESOURCE_GROUP_HEADER ResGroupHeader; RD_DMA_CONTROLLER DmaController; RD_DMA_CHANNEL DmaChannels[RPI3_DMA_CHANNEL_COUNT]; } RG_DMA; @@ -85,17 +85,17 @@ typedef struct // DMA Resource Group RG_DMA DmaResourceGroup; =20 -} EFI_ACPI_5_0_CSRT_TABLE; +} EFI_ACPI_5_1_CSRT_TABLE; =20 -EFI_ACPI_5_0_CSRT_TABLE Csrt =3D +EFI_ACPI_5_1_CSRT_TABLE Csrt =3D { //----------------------------------------------------------------------= -- // ACPI Table Header //----------------------------------------------------------------------= -- { - EFI_ACPI_5_0_CORE_SYSTEM_RESOURCE_TABLE_SIGNATURE, // Signature = "CSRT" + EFI_ACPI_5_1_CORE_SYSTEM_RESOURCE_TABLE_SIGNATURE, // Signature = "CSRT" sizeof (EFI_ACPI_DESCRIPTION_HEADER) + sizeof (RG_DMA), // Length - EFI_ACPI_5_0_CSRT_REVISION, // Revision + EFI_ACPI_5_1_CSRT_REVISION, // Revision 0x00, // Checksum calculated at runtime. EFI_ACPI_OEM_ID, // OEMID is a 6 bytes long field "BC28= 36" EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes lo= ng) "RPI3EDK2" --=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 (#55071): https://edk2.groups.io/g/devel/message/55071 Mute This Topic: https://groups.io/mt/71605846/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-