From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 934E7941EF9 for ; Wed, 19 Jun 2024 22:06:47 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=lA71NniKbGuhZ7IKb4vtrn2yR+krKkqb5+ctHwKJYCM=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1718834807; v=1; b=bZ7pDk0j5nMSEapQ2Yi3B30altQMqAvjtq5IOUw8nZ95x3tSl/ggwKxDOW1jb/JAWRfYZADx CKB6ira029Xo0SUtCwzIjLR3MXiZT1quPkaQP1pKfbzidd25X1/7U4L1iNcuIyeKW0soVr40rbR FNVFhlAvnRlolUeScizm+ntXUQQxdBhSqNMNuxtYWG9cdEtb6/VKlC4Km0W/DPzG9ki2GzzdOfV RW6fjFLwl3L85BOThXpJCi7ZWWY+tfTGOLk76o9EyHqb6arxDnj8aaytRX8ArY6ynhmavhHOkZv r4/syH8+nOVjhIrMq13EY5QNwMcZcrMF4EWDhrTp3CgLQ== X-Received: by 127.0.0.2 with SMTP id NKdtYY7687511xKeX9XKOpVm; Wed, 19 Jun 2024 15:06:45 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.33981.1718834804931318705 for ; Wed, 19 Jun 2024 15:06:45 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 43558DA7; Wed, 19 Jun 2024 15:07:09 -0700 (PDT) X-Received: from e126645.home (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 163273F64C; Wed, 19 Jun 2024 15:06:41 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Pierre Gondois , AbdulLateef Attar , Girish Mahadevan , Jeff Brasen , Jeshua Smith , Leif Lindholm , Meenakshi Aggarwal , Sami Mujawar , Sunil V L , Yeo Reum Yun Subject: [edk2-devel] [staging/dynamictables-reorg PATCH 00/15] Prepare libraries to support other archs Date: Thu, 20 Jun 2024 00:06:14 +0200 Message-Id: <20240619220629.1994362-1-pierre.gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 19 Jun 2024 15:06:45 -0700 Resent-From: pierre.gondois@arm.com Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 2AnwkQbXGcyXgS9Xn9FCL0xqx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=bZ7pDk0j; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io The DynamicTables framework has mainly been developed/tested against Arm architecture. While still trying to have re-usable libraries, opening the framework to other architectures implies some re-organization. The libraries that are generic enough to be directly re-used are moved to a Common/ directory. For some libraries, additional arch-specific hook= s have been added to allow architectures specific modifications. --- Changes can be seen at: https://github.com/pierregondois/edk2/tree/pg/dyntables_libraries_reorg --- References: 1. Staging branch creation: URL: https://edk2.groups.io/g/devel/message/114790 2. edk2-staging Repo URL: https://github.com/tianocore/edk2-staging.git Branch Name: dynamictables-reorg 3. edk2-platforms Repo URL: https://github.com/tianocore/edk2-platforms.git Branch Name: devel-dynamictables-reorg --- Cc: AbdulLateef Attar Cc: Girish Mahadevan Cc: Jeff Brasen Cc: Jeshua Smith Cc: Leif Lindholm Cc: Meenakshi Aggarwal Cc: Pierre Gondois Cc: Sami Mujawar Cc: Sunil V L Cc: Yeo Reum Yun Pierre Gondois (15): DynamicTablesPkg: Acpi: Move generic libraries to common folder DynamicTablesPkg: Acpi: Prepare common libraries to support other archs DynamicTablesPkg: AcpiFadtLib: Prepare to support other archs DynamicTablesPkg: AcpiDbg2Lib: Prepare to support other archs DynamicTablesPkg: AcpiSpcrLib: Prepare to support other archs DynamicTablesPkg: AcpiSratLib: Prepare to support other archs DynamicTablesPkg: AcpiSsdtCpuTopologyLib: Avoid dependency on GICC DynamicTablesPkg: DynamicTableManagerDxe: Refactor PresenceArray DynamicTablesPkg: FdtHwInfoParserLib: Move ARM parsers to Arm directory DynamicTablesPkg: FdtHwInfoParserLib: Refactor to prepare for other archs DynamicTablesPkg: FdtHwInfoParserLib: Make Pci parser arch neutral DynamicTablesPkg: FdtHwInfoParserLib: Make Serial Port parser arch neutral DynamicTablesPkg: FdtHwInfoParserLib: Move ArmLib.h to ArmGicCParser.c DynamicTablesPkg: FdtHwInfoParserLib: Move IRQ map to arch folder DynamicTablesPkg: FdtHwInfoParserLib: Create wrapper to get INTC addr cells .../Arm/ArmDynamicTableManagerDxe.c | 63 +++ .../Common/CommonDynamicTableManagerDxe.c | 58 +++ .../DynamicTableManagerDxe.c | 70 +-- .../DynamicTableManagerDxe.h | 63 +++ .../DynamicTableManagerDxe.inf | 7 + DynamicTablesPkg/DynamicTables.dsc.inc | 64 +-- .../SsdtCpuTopologyGenerator.h | 147 ------- .../AcpiDbg2Lib/AcpiDbg2Lib.inf} | 22 +- .../Common/AcpiDbg2Lib/Arm/ArmDbg2Generator.c | 67 +++ .../AcpiDbg2Lib/Common/CommonDbg2Generator.c | 59 +++ .../AcpiDbg2Lib}/Dbg2Generator.c | 24 +- .../Acpi/Common/AcpiDbg2Lib/Dbg2Generator.h | 56 +++ .../AcpiFadtLib/AcpiFadtLib.inf} | 16 +- .../Common/AcpiFadtLib/Arm/ArmFadtGenerator.c | 126 ++++++ .../AcpiFadtLib/Common/CommonFadtGenerator.c | 46 ++ .../AcpiFadtLib}/FadtGenerator.c | 86 +--- .../Acpi/Common/AcpiFadtLib/FadtGenerator.h | 35 ++ .../AcpiMcfgLib/AcpiMcfgLib.inf} | 9 +- .../AcpiMcfgLib}/McfgGenerator.c | 0 .../AcpiPcctLib/AcpiPcctLib.inf} | 2 +- .../AcpiPcctLib}/PcctGenerator.c | 0 .../AcpiPcctLib}/PcctGenerator.h | 0 .../AcpiPpttLib/AcpiPpttLib.inf} | 2 +- .../AcpiPpttLib}/PpttGenerator.c | 0 .../AcpiPpttLib}/PpttGenerator.h | 0 .../AcpiRawLib/AcpiRawLib.inf} | 9 +- .../AcpiRawLib}/RawGenerator.c | 0 .../AcpiSpcrLib/AcpiSpcrLib.inf} | 9 +- .../AcpiSpcrLib}/SpcrGenerator.c | 2 +- .../AcpiSratLib/AcpiSratLib.inf} | 9 +- .../Common/AcpiSratLib/Arm/ArmSratGenerator.c | 262 +++++++++++ .../AcpiSratLib/Common/CommonSratGenerator.c | 77 ++++ .../AcpiSratLib}/SratGenerator.c | 214 +-------- .../Acpi/Common/AcpiSratLib/SratGenerator.h | 59 +++ .../Arm/ArmSsdtCpuTopologyGenerator.c | 408 ++++++++++++++++++ .../SsdtCpuTopologyGenerator.c | 341 ++------------- .../SsdtCpuTopologyGenerator.h | 343 +++++++++++++++ .../SsdtCpuTopologyLib.inf} | 9 +- .../AcpiSsdtPcieLib}/SsdtPcieGenerator.c | 2 +- .../AcpiSsdtPcieLib}/SsdtPcieGenerator.h | 0 .../AcpiSsdtPcieLib/SsdtPcieLib.inf} | 2 +- .../SsdtSerialPortGenerator.c | 0 .../SsdtSerialPortLib.inf} | 6 +- .../Arm/ArmFdtHwInfoParser.c | 83 ++++ .../FdtHwInfoParserLib/Arm/ArmFdtUtility.c | 118 +++++ .../{ =3D> Arm}/BootArch/ArmBootArchParser.c | 2 +- .../{ =3D> Arm}/BootArch/ArmBootArchParser.h | 0 .../GenericTimer/ArmGenericTimerParser.c | 4 +- .../GenericTimer/ArmGenericTimerParser.h | 0 .../{ =3D> Arm}/Gic/ArmGicCParser.c | 5 +- .../{ =3D> Arm}/Gic/ArmGicCParser.h | 0 .../{ =3D> Arm}/Gic/ArmGicDParser.c | 4 +- .../{ =3D> Arm}/Gic/ArmGicDParser.h | 0 .../{ =3D> Arm}/Gic/ArmGicDispatcher.c | 12 +- .../{ =3D> Arm}/Gic/ArmGicDispatcher.h | 0 .../{ =3D> Arm}/Gic/ArmGicItsParser.c | 4 +- .../{ =3D> Arm}/Gic/ArmGicItsParser.h | 0 .../{ =3D> Arm}/Gic/ArmGicMsiFrameParser.c | 4 +- .../{ =3D> Arm}/Gic/ArmGicMsiFrameParser.h | 0 .../{ =3D> Arm}/Gic/ArmGicRParser.c | 4 +- .../{ =3D> Arm}/Gic/ArmGicRParser.h | 0 .../FdtHwInfoParserLib/FdtHwInfoParser.c | 78 +--- .../FdtHwInfoParserLib/FdtHwInfoParser.h | 27 ++ .../FdtHwInfoParserInclude.h | 1 - .../FdtHwInfoParserLib/FdtHwInfoParserLib.inf | 48 ++- .../Library/FdtHwInfoParserLib/FdtUtility.c | 71 --- .../Library/FdtHwInfoParserLib/FdtUtility.h | 30 ++ ...igSpaceParser.c =3D> PciConfigSpaceParser.c} | 19 +- ...igSpaceParser.h =3D> PciConfigSpaceParser.h} | 10 +- ...mSerialPortParser.c =3D> SerialPortParser.c} | 16 +- ...mSerialPortParser.h =3D> SerialPortParser.h} | 8 +- 71 files changed, 2248 insertions(+), 1074 deletions(-) create mode 100644 DynamicTablesPkg/Drivers/DynamicTableManagerDxe/Arm/A= rmDynamicTableManagerDxe.c create mode 100644 DynamicTablesPkg/Drivers/DynamicTableManagerDxe/Commo= n/CommonDynamicTableManagerDxe.c create mode 100644 DynamicTablesPkg/Drivers/DynamicTableManagerDxe/Dynam= icTableManagerDxe.h delete mode 100644 DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopology= LibArm/SsdtCpuTopologyGenerator.h rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiDbg2LibArm/AcpiDbg2LibArm.= inf =3D> Common/AcpiDbg2Lib/AcpiDbg2Lib.inf} (75%) create mode 100644 DynamicTablesPkg/Library/Acpi/Common/AcpiDbg2Lib/Arm/= ArmDbg2Generator.c create mode 100644 DynamicTablesPkg/Library/Acpi/Common/AcpiDbg2Lib/Comm= on/CommonDbg2Generator.c rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiDbg2LibArm =3D> Common/Acp= iDbg2Lib}/Dbg2Generator.c (93%) create mode 100644 DynamicTablesPkg/Library/Acpi/Common/AcpiDbg2Lib/Dbg2= Generator.h rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiFadtLibArm/AcpiFadtLibArm.= inf =3D> Common/AcpiFadtLib/AcpiFadtLib.inf} (75%) create mode 100644 DynamicTablesPkg/Library/Acpi/Common/AcpiFadtLib/Arm/= ArmFadtGenerator.c create mode 100644 DynamicTablesPkg/Library/Acpi/Common/AcpiFadtLib/Comm= on/CommonFadtGenerator.c rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiFadtLibArm =3D> Common/Acp= iFadtLib}/FadtGenerator.c (87%) create mode 100644 DynamicTablesPkg/Library/Acpi/Common/AcpiFadtLib/Fadt= Generator.h rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiMcfgLibArm/AcpiMcfgLibArm.= inf =3D> Common/AcpiMcfgLib/AcpiMcfgLib.inf} (85%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiMcfgLibArm =3D> Common/Acp= iMcfgLib}/McfgGenerator.c (100%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiPcctLibArm/AcpiPcctLibArm.= inf =3D> Common/AcpiPcctLib/AcpiPcctLib.inf} (90%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiPcctLibArm =3D> Common/Acp= iPcctLib}/PcctGenerator.c (100%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiPcctLibArm =3D> Common/Acp= iPcctLib}/PcctGenerator.h (100%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiPpttLibArm/AcpiPpttLibArm.= inf =3D> Common/AcpiPpttLib/AcpiPpttLib.inf} (90%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiPpttLibArm =3D> Common/Acp= iPpttLib}/PpttGenerator.c (100%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiPpttLibArm =3D> Common/Acp= iPpttLib}/PpttGenerator.h (100%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiRawLibArm/AcpiRawLibArm.in= f =3D> Common/AcpiRawLib/AcpiRawLib.inf} (85%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiRawLibArm =3D> Common/Acpi= RawLib}/RawGenerator.c (100%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiSpcrLibArm/AcpiSpcrLibArm.= inf =3D> Common/AcpiSpcrLib/AcpiSpcrLib.inf} (86%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiSpcrLibArm =3D> Common/Acp= iSpcrLib}/SpcrGenerator.c (96%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiSratLibArm/AcpiSratLibArm.= inf =3D> Common/AcpiSratLib/AcpiSratLib.inf} (74%) create mode 100644 DynamicTablesPkg/Library/Acpi/Common/AcpiSratLib/Arm/= ArmSratGenerator.c create mode 100644 DynamicTablesPkg/Library/Acpi/Common/AcpiSratLib/Comm= on/CommonSratGenerator.c rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiSratLibArm =3D> Common/Acp= iSratLib}/SratGenerator.c (75%) create mode 100644 DynamicTablesPkg/Library/Acpi/Common/AcpiSratLib/Srat= Generator.h create mode 100644 DynamicTablesPkg/Library/Acpi/Common/AcpiSsdtCpuTopol= ogyLib/Arm/ArmSsdtCpuTopologyGenerator.c rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiSsdtCpuTopologyLibArm =3D>= Common/AcpiSsdtCpuTopologyLib}/SsdtCpuTopologyGenerator.c (79%) create mode 100644 DynamicTablesPkg/Library/Acpi/Common/AcpiSsdtCpuTopol= ogyLib/SsdtCpuTopologyGenerator.h rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiSsdtCpuTopologyLibArm/Ssdt= CpuTopologyLibArm.inf =3D> Common/AcpiSsdtCpuTopologyLib/SsdtCpuTopologyL= ib.inf} (80%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiSsdtPcieLibArm =3D> Common= /AcpiSsdtPcieLib}/SsdtPcieGenerator.c (96%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiSsdtPcieLibArm =3D> Common= /AcpiSsdtPcieLib}/SsdtPcieGenerator.h (100%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiSsdtPcieLibArm/SsdtPcieLib= Arm.inf =3D> Common/AcpiSsdtPcieLib/SsdtPcieLib.inf} (91%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiSsdtSerialPortLibArm =3D> = Common/AcpiSsdtSerialPortLib}/SsdtSerialPortGenerator.c (100%) rename DynamicTablesPkg/Library/Acpi/{Arm/AcpiSsdtSerialPortLibArm/SsdtS= erialPortLibArm.inf =3D> Common/AcpiSsdtSerialPortLib/SsdtSerialPortLib.i= nf} (87%) create mode 100644 DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFd= tHwInfoParser.c create mode 100644 DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFd= tUtility.c rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/BootArch/= ArmBootArchParser.c (95%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/BootArch/= ArmBootArchParser.h (100%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/GenericTi= mer/ArmGenericTimerParser.c (95%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/GenericTi= mer/ArmGenericTimerParser.h (100%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cCParser.c (96%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cCParser.h (100%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cDParser.c (95%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cDParser.h (100%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cDispatcher.c (92%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cDispatcher.h (100%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cItsParser.c (95%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cItsParser.h (100%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cMsiFrameParser.c (95%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cMsiFrameParser.h (100%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cRParser.c (95%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/{ =3D> Arm}/Gic/ArmGi= cRParser.h (100%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/{ArmPciConfigSpac= eParser.c =3D> PciConfigSpaceParser.c} (95%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/{ArmPciConfigSpac= eParser.h =3D> PciConfigSpaceParser.h} (93%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/{ArmSerialPort= Parser.c =3D> SerialPortParser.c} (95%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/{ArmSerialPort= Parser.h =3D> SerialPortParser.h} (89%) --=20 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119632): https://edk2.groups.io/g/devel/message/119632 Mute This Topic: https://groups.io/mt/106770151/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-