From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.101.70; helo=foss.arm.com; envelope-from=chandni.cherukuri@arm.com; receiver=edk2-devel@lists.01.org Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id AF0C2210D93CE for ; Thu, 14 Jun 2018 22:55:50 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E8DDC80D; Thu, 14 Jun 2018 22:55:49 -0700 (PDT) Received: from usa.arm.com (a73437-lin.blr.arm.com [10.162.0.155]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 08E203F557; Thu, 14 Jun 2018 22:55:48 -0700 (PDT) From: Chandni Cherukuri To: edk2-devel@lists.01.org Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org Date: Fri, 15 Jun 2018 11:25:30 +0530 Message-Id: <1529042132-29377-1-git-send-email-chandni.cherukuri@arm.com> X-Mailer: git-send-email 2.7.4 Subject: [PATCH 0/2] ARM Dynamic Configuration X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2018 05:55:50 -0000 On SGI platforms, the trusted firmware executes prior to the SEC phase. It supplies to the SEC phase a pointer to a HW CONFIG fdt in the x1 which contains platform specific information such as part number and config number of the SGI platform. The HW CONFIG FDT would look as, /dts-v1/; / { /* compatible string */ compatible = "arm,sgi-isys3"; /* platform ID node */ system-id { platform-id = <0x03000783>; } }; In the very first step of the assembly code which executes in SEC phase the fdt pointer is stored in a global variable from the register. A PPI is created during the SEC phase which stores the global variable. During PEI phase, a Platform ID PEIM is installed which accessess the PPI and retrieves the platform information using FDT helper functions and a PlatformId HOB is created and populated with the information. During DXE phase the drivers can access the Platform ID HOB to get the platform information and perform platform specific functions based on the platform. Chandni Cherukuri (2): Platform/ARM/Sgi: Install a Platform ID HOB Platform/ARM/Sgi: Pick ACPI tables to install based on platform ID .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 25 +++++- .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf | 2 + Platform/ARM/SgiPkg/Include/SgiPlatform.h | 18 +++++ .../SgiPkg/Library/PlatformLib/AArch64/Helper.S | 7 ++ .../ARM/SgiPkg/Library/PlatformLib/PlatformLib.c | 10 +++ .../ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf | 3 + .../Library/SgiPlatformPeiLib/SgiPlatformPeiLib.c | 92 ++++++++++++++++++++++ .../SgiPlatformPeiLib/SgiPlatformPeiLib.inf | 40 ++++++++++ Platform/ARM/SgiPkg/SgiPlatform.dec | 5 ++ Platform/ARM/SgiPkg/SgiPlatform.dsc | 1 + Platform/ARM/SgiPkg/SgiPlatform.fdf | 1 + 11 files changed, 203 insertions(+), 1 deletion(-) create mode 100644 Platform/ARM/SgiPkg/Library/SgiPlatformPeiLib/SgiPlatformPeiLib.c create mode 100644 Platform/ARM/SgiPkg/Library/SgiPlatformPeiLib/SgiPlatformPeiLib.inf -- 2.7.4