From patchwork Sun Nov 13 13:55:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jit Loon Lim X-Patchwork-Id: 1703234 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=WdBOA6dZ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N9DVt30L1z20KC for ; Mon, 14 Nov 2022 00:56:04 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2342285160; Sun, 13 Nov 2022 14:55:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="WdBOA6dZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8406D84D45; Sun, 13 Nov 2022 14:55:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 824B584B0C for ; Sun, 13 Nov 2022 14:55:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668347748; x=1699883748; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=91CHGLNsZls4c8SS3sFVZ53x9VSyf/l1mBdGOn+Z8zg=; b=WdBOA6dZkiBlwQkqdR76peHE9oEIZaU1mdULiLUslGkqhXXKmkwcfoZd sWfzGS+2tZLWNCuaDTzj8qDSpsrSTRC9gD80hYFzO06XBiX0DI3EJNVxu GNkItay4QW96X8vpOO/+Kr0qR57i34S+WYDvbYu+LuABm+l7XUSX8k7XZ WwvzYcSQPitGtOWSqXjIMsL4PjgKGYVmnbuJHYvqYBsk+zMeYhi9wehKD bcIPnr8yFCp4FQd9LUt1BAbbsl6MZPOQcqDU0UehCiQb5C5r0jMrLGBux 6LPquyahTAklZClS2pqkWU3ekJw/3C/LH2J/9MRLkLKzgc/3dFVN0OH2D g==; X-IronPort-AV: E=McAfee;i="6500,9779,10529"; a="292211347" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="292211347" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2022 05:55:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10529"; a="763166441" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="763166441" Received: from pglmail07.png.intel.com ([10.221.193.207]) by orsmga004.jf.intel.com with ESMTP; 13 Nov 2022 05:55:41 -0800 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id 4428D4837; Sun, 13 Nov 2022 21:55:41 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id 2FBB8E0094D; Sun, 13 Nov 2022 21:55:41 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang , Ley Foon Tan Subject: [PATCH 1/4] makefile: tools: socfpgaimage: update padding flow Date: Sun, 13 Nov 2022 21:55:33 +0800 Message-Id: <20221113135536.9920-1-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Ley Foon Tan HSD #1508690657-2: The existing socfpgaimage always pads the image to the maximum size of OCRAM size. This will break in the encryption flow where it expects the image to be un-padded. The encryption tool will do the encryption for the whole image and append the signature key at end of the image. The signature key will append to beyond the size of OCRAM if the image is padded with the maximum size before encryption. Move the padding step from socfpgaimage to Makefile and pads with objcopy command. socfpgaimage will pad the image with 16 bytes aligned (including CRC word), this is a requirement in encryption flow. Signed-off-by: Ley Foon Tan Signed-off-by: Jit Loon Lim --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ff25f92974..04914a8bec 100644 --- a/Makefile +++ b/Makefile @@ -1606,8 +1606,14 @@ spl/u-boot-splx4.sfp: spl/u-boot-spl.sfp FORCE $(call if_changed,gensplx4) quiet_cmd_socboot = SOCBOOT $@ -cmd_socboot = cat spl/u-boot-splx4.sfp u-boot.img > $@ || { rm -f $@; false; } -u-boot-with-spl.sfp: spl/u-boot-splx4.sfp u-boot.img FORCE +cmd_socboot = $(OBJCOPY) -I binary -O binary --gap-fill=0x0 \ + --pad-to=$(CONFIG_SPL_PAD_TO) \ + spl/u-boot-spl.sfp spl/u-boot-spl.sfp && \ + cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp > spl/u-boot-splx4.sfp ; \ + cat spl/u-boot-splx4.sfp u-boot.img > $@ || rm -f $@ +u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE $(call if_changed,socboot) quiet_cmd_gensplpadx4 = GENSPLPADX4 $@ From patchwork Sun Nov 13 13:55:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jit Loon Lim X-Patchwork-Id: 1703236 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=UlmtJNGo; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N9DWR42tbz20KC for ; Mon, 14 Nov 2022 00:56:35 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D96D885173; Sun, 13 Nov 2022 14:56:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="UlmtJNGo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 04C5B85174; Sun, 13 Nov 2022 14:55:59 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7126E85169 for ; Sun, 13 Nov 2022 14:55:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668347749; x=1699883749; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CXCuFP5Z24a/CWEuEE9yuB7yossMaM892T7vBvdG5mg=; b=UlmtJNGos79GX6mLjWHBcegfDVSbX+giD6hu6fZniF4RzPEqEVFFPaHG iTgjrI5AlCHZcxSxlIalWz7nEUD2RpZTCjDlXHsyh1aTiqAsmhhfCwbdy +oHVils8rn1RXIdMgZNT+DziOsk/WhGg26lnf+nZmzt7wuySCrtaTZDQ9 COhbwadnapv+E0BJDqtaZK5FxkCkZD58tX+Cmj03fTmH8W4BNfDKkxrkN h2wYrl8+Aykdn2foOFGwmkauOKCYJJAWNBmP/QUapNTnGXg1AcUxAZWgP zlvYu3SQJwldW+LducteTfGVvqz2ZXZKKzve1iEAdeF1fJyacz8qsCXka w==; X-IronPort-AV: E=McAfee;i="6500,9779,10529"; a="292211349" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="292211349" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2022 05:55:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10529"; a="763166443" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="763166443" Received: from pglmail07.png.intel.com ([10.221.193.207]) by orsmga004.jf.intel.com with ESMTP; 13 Nov 2022 05:55:42 -0800 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id D3F014838; Sun, 13 Nov 2022 21:55:41 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id D3300E0094D; Sun, 13 Nov 2022 21:55:41 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang , Ley Foon Tan Subject: [PATCH 2/4] doc: README.socfpga: Add guide for mkimage Date: Sun, 13 Nov 2022 21:55:34 +0800 Message-Id: <20221113135536.9920-2-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20221113135536.9920-1-jit.loon.lim@intel.com> References: <20221113135536.9920-1-jit.loon.lim@intel.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Ley Foon Tan HSD #1508690657-3: Add guide for mkimage for Cyclone V, Arria V and Arria 10. Signed-off-by: Ley Foon Tan Signed-off-by: Jit Loon Lim --- doc/README.socfpga | 317 +++++++++++++++++++++++++++------------------ 1 file changed, 193 insertions(+), 124 deletions(-) diff --git a/doc/README.socfpga b/doc/README.socfpga index 4d73398eb9..a469cc7e41 100644 --- a/doc/README.socfpga +++ b/doc/README.socfpga @@ -1,178 +1,247 @@ ----------------------------------------- +--------------------------------------------------------------------- SOCFPGA Documentation for U-Boot and SPL ----------------------------------------- +--------------------------------------------------------------------- + +This README is about U-Boot and SPL support for Intel SOCFPGA. +To know more about the hardware itself, please refer to +https://www.intel.com/content/www/us/en/products/programmable/soc.html + + +Table of Contents +--------------------------------------------------------------------- + 1. Device Family Support vs Tested Intel Quartus + 2. Feature Support + 3. Major Changes and Known Issues + 4. Cyclone V / Arria V generating the handoff header files for U-Boot SPL + 5. Arria10 generating the handoff header files for U-Boot SPL + 6. mkimage for Cyclone V, Arria V and Arria 10 -This README is about U-Boot and SPL support for Altera's ARM Cortex-A9MPCore -based SOCFPGA. To know more about the hardware itself, please refer to -www.altera.com. +1. Device Family Support vs Tested Intel Quartus +--------------------------------------------------------------------- -socfpga_dw_mmc --------------- + Processor SOCFPGA Device Family Intel Quartus Prime Pro Edition Intel Quartus Prime Standard Edition + -------------------------------------------------------------------------------------------------------------------------------------------- + Dual-core ARM Cortex-A9 Cyclone V N/A 20.1 + Arria V N/A 20.1 + Arria 10 20.1, 20.3 20.1 -Here are macro and detailed configuration required to enable DesignWare SDMMC -controller support within SOCFPGA + Quad-core ARM Cortex-A53 Stratix 10 20.1, 20.2, 20.3 N/A + Agilex 20.1, 20.2, 20.3 N/A + Diamond Mesa Early access N/A -#define CONFIG_SYS_MMC_MAX_BLK_COUNT 256 --> Using smaller max blk cnt to avoid flooding the limited stack in OCRAM +2. Feature Support --------------------------------------------------------------------- -Cyclone 5 / Arria 5 generating the handoff header files for U-Boot SPL + + Hardware Feature Cyclone V Arria 10 Stratix 10 Agilex Diamond Mesa + Arria V + -------------------------------------------------------------------------------------------------------------------- + SDRAM Yes Yes Yes Yes Yes + HPS bridge (LWH2F, H2F, F2S) Yes Yes Yes Yes Yes + HPS cold/warm reset Yes Yes Yes Yes Yes + FPGA configuration Yes Yes Yes Yes No + Partial reconfiguration No No Yes No No + Ethernet (Synopsys EMAC controller) Yes Yes Yes Yes Yes + Synopsys GPIO controller Yes Yes Yes Yes Yes + Synopsys UART controller Yes Yes Yes Yes Yes + Synopsys USB controller Yes Yes Yes Yes Yes + Synopsys Watchdog timer Yes Yes Yes Yes Yes + Synopsys I2C master controller Yes No Yes Yes Yes + Synopsys SDMMC controller Yes Yes Yes Yes Yes + Cadence QSPI controller Yes Yes Yes Yes Yes + Denali NAND controller No Yes Yes Yes Yes + --------------------------------------------------------------------------------------------------------------------- + + Software Feature Cyclone V Arria 10 Stratix 10 Agilex Diamond Mesa + Arria V + --------------------------------------------------------------------------------------------------------------------- + Remote System Update (RSU) No No Yes Yes No + ARM Trusted Firmware (ATF) No No Yes Yes Yes + Vendor Authorized Boot (VAB) No No No No Yes + --------------------------------------------------------------------------------------------------------------------- + + +3. Major Changes and Known Issues --------------------------------------------------------------------- -This text is assuming quartus 16.1, but newer versions will probably work just fine too; -verified with DE1_SOC_Linux_FB demo project (https://github.com/VCTLabs/DE1_SOC_Linux_FB). -Updated/working projects should build using either process below. + 3.1 Support 'vab' command to perform vendor authentication. + + Command format: vab addr len + Authorize 'len' bytes starting at 'addr' via vendor public key -Note: it *should* work from Quartus 14.0.200 onwards, however, the current vendor demo -projects must have the IP cores updated as shown below. + 3.2 Support SDRAM secure region in U-boot-ATF flow -Rebuilding your Quartus project -------------------------------- + First 1 MiB of SDRAM is configured as secure region, other + address spaces are non-secure regions. Only software executing + at secure state EL3 (eg: U-boot SPL) and secure masters are + allowed access to secure region. -Choose one of the follwing methods, either command line or GUI. -Using the command line -~~~~~~~~~~~~~~~~~~~~~~ +4. Cyclone V / Arria V generating the handoff header files for U-Boot SPL +--------------------------------------------------------------------- -First run the embedded command shell, using your path to the Quartus install: + Rebuilding your Quartus project + ------------------------------- - $ /path/to/intelFPGA/16.1/embedded/embedded_command_shell.sh + Choose one of the follwing methods, either command line or GUI. -Then (if necessary) update the IP cores in the project, generate HDL code, and -build the project: + Using the command line + ~~~~~~~~~~~~~~~~~~~~~~ - $ cd path/to/project/dir - $ qsys-generate soc_system.qsys --upgrade-ip-cores - $ qsys-generate soc_system.qsys --synthesis=[VERILOG|VHDL] - $ quartus_sh --flow compile + First run the embedded command shell, using your path to the Quartus install: -Convert the resulting .sof file (SRAM object file) to .rbf file (Raw bit file): + $ /path/to/intelFPGA/16.1/embedded/embedded_command_shell.sh - $ quartus_cpf -c .sof soc_system.rbf + Then (if necessary) update the IP cores in the project, generate HDL code, and + build the project: + $ cd path/to/project/dir + $ qsys-generate soc_system.qsys --upgrade-ip-cores + $ qsys-generate soc_system.qsys --synthesis=[VERILOG|VHDL] + $ quartus_sh --flow compile -Generate BSP handoff files -~~~~~~~~~~~~~~~~~~~~~~~~~~ + Convert the resulting .sof file (SRAM object file) to .rbf file (Raw bit file): -You can run the bsp editor GUI below, or run the following command from the -project directory: + $ quartus_cpf -c .sof soc_system.rbf - $ /path/to/bsb/tools/bsp-create-settings --type spl --bsp-dir build \ - --preloader-settings-dir hps_isw_handoff/soc_system_hps_0/ \ - --settings build/settings.bsp -You should use the bsp "build" directory above (ie, where the settings.bsp file is) -in the following u-boot command to update the board headers. Once these headers -are updated for a given project build, u-boot should be configured for the -project board (eg, de0-nano-sockit) and then build the normal spl build. + Generate BSP handoff files + ~~~~~~~~~~~~~~~~~~~~~~~~~~ -Now you can skip the GUI section. + You can run the bsp editor GUI below, or run the following command from the + project directory: + $ /path/to/bsb/tools/bsp-create-settings --type spl --bsp-dir build \ + --preloader-settings-dir hps_isw_handoff/soc_system_hps_0/ \ + --settings build/settings.bsp -Using the Qsys GUI -~~~~~~~~~~~~~~~~~~ + You should use the bsp "build" directory above (ie, where the settings.bsp file is) + in the following u-boot command to update the board headers. Once these headers + are updated for a given project build, u-boot should be configured for the + project board (eg, de0-nano-sockit) and then build the normal spl build. -1. Navigate to your project directory -2. Run Quartus II -3. Open Project (Ctrl+J), select .qpf -4. Run QSys [Tools->QSys] - 4.1 In the Open dialog, select '.qsys' - 4.2 In the Open System dialog, wait until completion and press 'Close' - 4.3 In the Qsys window, click on 'Generate HDL...' in bottom right corner - 4.3.1 In the 'Generation' window, click 'Generate' - 4.3.2 In the 'Generate' dialog, wait until completion and click 'Close' - 4.4 In the QSys window, click 'Finish' - 4.4.1 In the 'Quartus II' pop up window, click 'OK' -5. Back in Quartus II main window, do the following - 5.1 Use Processing -> Start -> Start Analysis & Synthesis (Ctrl+K) - 5.2 Use Processing -> Start Compilation (Ctrl+L) + Now you can skip the GUI section. - ... this may take some time, have patience ... -6. Start the embedded command shell as shown in the previous section - 6.1 Change directory to 'software/spl_bsp' - 6.2 Prepare BSP by launching the BSP editor from ECS - => bsp-editor - 6.3 In BSP editor - 6.3.1 Use File -> Open - 6.3.2 Select 'settings.bsp' file - 6.3.3 Click Generate - 6.3.4 Click Exit + Using the Qsys GUI + ~~~~~~~~~~~~~~~~~~ + 1. Navigate to your project directory + 2. Run Quartus II + 3. Open Project (Ctrl+J), select .qpf + 4. Run QSys [Tools->QSys] + 4.1 In the Open dialog, select '.qsys' + 4.2 In the Open System dialog, wait until completion and press 'Close' + 4.3 In the Qsys window, click on 'Generate HDL...' in bottom right corner + 4.3.1 In the 'Generation' window, click 'Generate' + 4.3.2 In the 'Generate' dialog, wait until completion and click 'Close' + 4.4 In the QSys window, click 'Finish' + 4.4.1 In the 'Quartus II' pop up window, click 'OK' + 5. Back in Quartus II main window, do the following + 5.1 Use Processing -> Start -> Start Analysis & Synthesis (Ctrl+K) + 5.2 Use Processing -> Start Compilation (Ctrl+L) -Post handoff generation -~~~~~~~~~~~~~~~~~~~~~~~ + ... this may take some time, have patience ... -Now that the handoff files are generated, U-Boot can be used to process -the handoff files generated by the bsp-editor. For this, please use the -following script from the u-boot source tree: + 6. Start the embedded command shell as shown in the previous section - $ ./arch/arm/mach-socfpga/qts-filter.sh \ - \ - \ - \ - + $ /path/to/bsb/tools/bsp-create-settings --type spl --bsp-dir build \ + --preloader-settings-dir hps_isw_handoff/soc_system_hps_0/ \ + --settings build/settings.bsp -Process QTS-generated files into U-Boot compatible ones. - soc_type - Type of SoC, either 'cyclone5' or 'arria5'. - input_qts_dir - Directory with compiled Quartus project - and containing the Quartus project file (QPF). - input_bsp_dir - Directory with generated bsp containing - the settings.bsp file. - output_dir - Directory to store the U-Boot compatible - headers. + Post handoff generation + ~~~~~~~~~~~~~~~~~~~~~~~ -This will generate (or update) the following 4 files: + Now that the handoff files are generated, U-Boot can be used to process + the handoff files generated by the bsp-editor. For this, please use the + following script from the u-boot source tree: - iocsr_config.h - pinmux_config.h - pll_config.h - sdram_config.h + $ ./arch/arm/mach-socfpga/qts-filter.sh \ + \ + \ + \ + -These files should be copied into "qts" directory in the board directory -(see output argument of qts-filter.sh command above). + Process QTS-generated files into U-Boot compatible ones. -Here is an example for the DE-0 Nano SoC after the above rebuild process: + soc_type - Type of SoC, either 'cyclone5' or 'arria5'. + input_qts_dir - Directory with compiled Quartus project + and containing the Quartus project file (QPF). + input_bsp_dir - Directory with generated bsp containing + the settings.bsp file. + output_dir - Directory to store the U-Boot compatible + headers. - $ ll board/terasic/de0-nano-soc/qts/ - total 36 - -rw-r--r-- 1 sarnold sarnold 8826 Mar 21 18:11 iocsr_config.h - -rw-r--r-- 1 sarnold sarnold 4398 Mar 21 18:11 pinmux_config.h - -rw-r--r-- 1 sarnold sarnold 3190 Mar 21 18:11 pll_config.h - -rw-r--r-- 1 sarnold sarnold 9022 Mar 21 18:11 sdram_config.h + This will generate (or update) the following 4 files: -Note: file sizes will differ slightly depending on the selected board. + iocsr_config.h + pinmux_config.h + pll_config.h + sdram_config.h -Now your board is ready for full mainline support including U-Boot SPL. -The Preloader will not be needed any more. + These files should be copied into "qts" directory in the board directory + (see output argument of qts-filter.sh command above). + Here is an example for the DE-0 Nano SoC after the above rebuild process: + + $ ll board/terasic/de0-nano-soc/qts/ + total 36 + -rw-r--r-- 1 sarnold sarnold 8826 Mar 21 18:11 iocsr_config.h + -rw-r--r-- 1 sarnold sarnold 4398 Mar 21 18:11 pinmux_config.h + -rw-r--r-- 1 sarnold sarnold 3190 Mar 21 18:11 pll_config.h + -rw-r--r-- 1 sarnold sarnold 9022 Mar 21 18:11 sdram_config.h + + Note: file sizes will differ slightly depending on the selected board. + For SoC devkit please refer to https://rocketboards.org/foswiki/Documentation/BuildingBootloader#Cyclone_V_SoC_45_Boot_from_SD_Card + + Now your board is ready for full mainline support including U-Boot SPL. + The Preloader will not be needed any more. + + +5. Arria10 generating the handoff header files for U-Boot SPL ---------------------------------------------------------- -Arria 10 generating the handoff header files for U-Boot SPL ----------------------------------------------------------- -A header file for inclusion in a devicetree for Arria10 can be generated -by the qts-filter-a10.sh script directly from the hps_isw_handoff/hps.xml -file generated during the FPGA project compilation. The header contains -all PLL, clock, pinmux, and bridge configurations required. + A header file for inclusion in a devicetree for Arria10 can be generated + by the qts-filter-a10.sh script directly from the hps_isw_handoff/hps.xml + file generated during the FPGA project compilation. The header contains + all PLL, clock, pinmux, and bridge configurations required. + + Please look at the socfpga_arria10_socdk_sdmmc-u-boot.dtsi for an example + that includes use of the generated handoff header. + + Devicetree header generation + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Please look at the socfpga_arria10_socdk_sdmmc-u-boot.dtsi for an example -that includes use of the generated handoff header. + The qts-filter-a10.sh script can process the compile time genetated hps.xml + to create the appropriate devicetree header. -Devicetree header generation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The qts-filter-a10.sh script can process the compile time genetated hps.xml -to create the appropriate devicetree header. + $ ./arch/arm/mach-socfpga/qts-filter-a10.sh \ + \ + + + hps_xml - hps_isw_handoff/hps.xml from Quartus project + output_file - Output filename and location for header file + + The script generates a single header file names that should + be placed in arch/arm/dts. + +6. mkimage for Cyclone V, Arria V and Arria 10 +---------------------------------------------------------- + + The mkimage tool creates an Intel BootROM compatible image of the + Cyclone V SoC, Arria V SoC or Arria 10 SoC bootloader. mkimage is invoked + automatically in default U-boot building proccess. To create BootROM + compatible image manually, user can run example below: + ./tools/mkimage -T -d - $ ./arch/arm/mach-socfpga/qts-filter-a10.sh \ - \ - + Cyclone V and Arria V: + ./tools/mkimage -T socfpgaimage -d spl/u-boot-spl.bin spl/u-boot-spl.sfp - hps_xml - hps_isw_handoff/hps.xml from Quartus project - output_file - Output filename and location for header file + Arria 10: + ./tools/mkimage -T socfpgaimage_v1 -d spl/u-boot-spl.bin spl/u-boot-spl.sfp -The script generates a single header file names that should -be placed in arch/arm/dts. + For more inforation, run "./tools/mkimage --help". \ No newline at end of file From patchwork Sun Nov 13 13:55:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jit Loon Lim X-Patchwork-Id: 1703237 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=emHCI1bE; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N9DWg2Ydmz20KC for ; Mon, 14 Nov 2022 00:56:47 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3A46C85174; Sun, 13 Nov 2022 14:56:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="emHCI1bE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9AA6B8517B; Sun, 13 Nov 2022 14:55:57 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7FDB385170 for ; Sun, 13 Nov 2022 14:55:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668347750; x=1699883750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5YnHdZXCLgraHKtHyfFJFdGlOPGWRj3zWyYniakJUz0=; b=emHCI1bEQbgyCSmCGfo1DICqZ9lgk4evDio8yp8cznUArm6HeD/yfDBZ T8tdiOTzWtr7RlHzof8now8yR04TUSy6Er1xWxaHc1HKqIyXpGqDRGlkY hf6ukpnhy/bVaXvVz+k07QbfvJ1sZMHOD5M6r+ea2q4wx3v6EAMkhamUp LT5FcsIbNBG37CmVuDgEAM+UUtfEFzGV3whme+O1++tK3Tf+1Up2NTG7o WiXN37utmv89uUxl8u8nm5QO/YOTc9LWfge10Yve+lTCXu8woph33UXrr ZfIHjKfqTuK9sHf4nBpU4DXmous95x+ES41Ct7SG9lJSAap/N+h1ZiCt0 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10529"; a="292211352" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="292211352" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2022 05:55:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10529"; a="763166447" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="763166447" Received: from pglmail07.png.intel.com ([10.221.193.207]) by orsmga004.jf.intel.com with ESMTP; 13 Nov 2022 05:55:43 -0800 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id 8B4123559; Sun, 13 Nov 2022 21:55:42 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id 8A95AE0094D; Sun, 13 Nov 2022 21:55:42 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang , Lokanathan@ecsmtp.png.intel.com Subject: [PATCH 3/4] doc: README.socfpga: Update for U-boot 2022.04 Date: Sun, 13 Nov 2022 21:55:35 +0800 Message-Id: <20221113135536.9920-3-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20221113135536.9920-1-jit.loon.lim@intel.com> References: <20221113135536.9920-1-jit.loon.lim@intel.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: "Lokanathan, Raaj" Update the tested Intel Quartus Software versions and highlight the major changes in this U-boot version. Signed-off-by: Lokanathan, Raaj Signed-off-by: Jit Loon Lim --- doc/README.socfpga | 104 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 82 insertions(+), 22 deletions(-) diff --git a/doc/README.socfpga b/doc/README.socfpga index a469cc7e41..362361e014 100644 --- a/doc/README.socfpga +++ b/doc/README.socfpga @@ -15,6 +15,8 @@ Table of Contents 4. Cyclone V / Arria V generating the handoff header files for U-Boot SPL 5. Arria10 generating the handoff header files for U-Boot SPL 6. mkimage for Cyclone V, Arria V and Arria 10 + 7. SDRAM secure region in U-boot ATF flow + 8. binman for U-boot ATF flow 1. Device Family Support vs Tested Intel Quartus @@ -22,19 +24,18 @@ Table of Contents Processor SOCFPGA Device Family Intel Quartus Prime Pro Edition Intel Quartus Prime Standard Edition -------------------------------------------------------------------------------------------------------------------------------------------- - Dual-core ARM Cortex-A9 Cyclone V N/A 20.1 - Arria V N/A 20.1 - Arria 10 20.1, 20.3 20.1 + Dual-core ARM Cortex-A9 Cyclone V N/A 21.1 + Arria 10 22.1 N/A - Quad-core ARM Cortex-A53 Stratix 10 20.1, 20.2, 20.3 N/A - Agilex 20.1, 20.2, 20.3 N/A - Diamond Mesa Early access N/A + Quad-core ARM Cortex-A53 Stratix 10 22.1 N/A + Agilex 22.1 N/A + eASIC N5X 22.1 N/A 2. Feature Support --------------------------------------------------------------------- - Hardware Feature Cyclone V Arria 10 Stratix 10 Agilex Diamond Mesa + Hardware Feature Cyclone V Arria 10 Stratix 10 Agilex eASIC N5X Arria V -------------------------------------------------------------------------------------------------------------------- SDRAM Yes Yes Yes Yes Yes @@ -53,29 +54,23 @@ Table of Contents Denali NAND controller No Yes Yes Yes Yes --------------------------------------------------------------------------------------------------------------------- - Software Feature Cyclone V Arria 10 Stratix 10 Agilex Diamond Mesa + Software Feature Cyclone V Arria 10 Stratix 10 Agilex eASIC N5X Arria V --------------------------------------------------------------------------------------------------------------------- - Remote System Update (RSU) No No Yes Yes No - ARM Trusted Firmware (ATF) No No Yes Yes Yes + Remote System Update (RSU) [1] No No Yes Yes No + ARM Trusted Firmware (ATF) [2] No No Yes Yes Yes Vendor Authorized Boot (VAB) No No No No Yes --------------------------------------------------------------------------------------------------------------------- + Notes: + [1] RSU SPT/CPB recovery features are supported with Quartus version 20.4 onwards + [2] ATF boot flow is supported with altera-opensource/arm-trusted-firmware branch:socfpga_v2.3 onwards + 3. Major Changes and Known Issues --------------------------------------------------------------------- - 3.1 Support 'vab' command to perform vendor authentication. - - Command format: vab addr len - Authorize 'len' bytes starting at 'addr' via vendor public key - - 3.2 Support SDRAM secure region in U-boot-ATF flow - - First 1 MiB of SDRAM is configured as secure region, other - address spaces are non-secure regions. Only software executing - at secure state EL3 (eg: U-boot SPL) and secure masters are - allowed access to secure region. + 3.1 Upgraded U-boot to version v2022.04 4. Cyclone V / Arria V generating the handoff header files for U-Boot SPL @@ -244,4 +239,69 @@ Table of Contents Arria 10: ./tools/mkimage -T socfpgaimage_v1 -d spl/u-boot-spl.bin spl/u-boot-spl.sfp - For more inforation, run "./tools/mkimage --help". \ No newline at end of file + For more inforation, run "./tools/mkimage --help". + +7. SDRAM secure region in U-boot ATF flow +---------------------------------------------------------- + + In boot flow that uses ATF (ARM trusted firmware), the first 1 MiB of SDRAM + is configured as secure region, other address spaces are non-secure regions. + Only software executing at secure state EL3 (eg: U-boot SPL, ATF) and secure + masters are allowed access to the secure region. + +8. binman for U-boot ATF flow +---------------------------------------------------------- + + Overview + ~~~~~~~~ + + Before v2021.04, we provide *.sh/*.its for user to generate FIT image using + 'mkimage' tool. To align with U-Boot community strategy to eliminate the custom + *.sh/*its script, we have removed all *.sh/*.its files and switched to use + 'binman' tool to generate FIT image for all SOC64 devices (Stratix 10, Agilex, + eASIC N5X) started in U-boot version v2021.04. + + FIT image content is defined in binman node in U-boot device tree (u-boot.dtb). + U-Boot v2021.04 support u-boot.itb and kernel.itb. + + With "CONFIG_BINMAN" enabled in deconfig, U-boot will always run 'binman' tool + before end of the code compilation. If the required input files exists in U-boot + folder, *.itb files defined in u-boot.dtb will be generated. Otherwise, 'binman' + will not generate the *.itb files. You can run 'binman' tool manually via command + line to generate the *.itb file. + + Input Files + ~~~~~~~~~~~ + + Input files for *_atf_defconfig FIT image generation: + To generate u-boot.itb: + u-boot-nodtb.bin + u-boot.dtb + bl31.bin + To generate kernel.itb: + Image + linux.dtb + + Input files for *_vab_defconfig FIT image generation: + To generate u-boot.itb: + signed-u-boot-nodtb.bin + signed-u-boot.dtb + signed-bl31.bin + + To generate kernel.itb: + signed-Image + signed-linux.dtb + + Command Line + ~~~~~~~~~~~~ + + Please use the following commands to generate the u-boot.itb and kernel.itb: + + $ /tools/binman/binman build -u -d u-boot.dtb -O . + This command generate all FIT images that defined in device tree. + + $ /tools/binman/binman build -u -d u-boot.dtb -O . -i u-boot + This command generate u-boot.itb only. + + $ /tools/binman/binman build -u -d u-boot.dtb -O . -i kernel + This command generate kernel.itb only. \ No newline at end of file From patchwork Sun Nov 13 13:55:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jit Loon Lim X-Patchwork-Id: 1703235 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=bKVg3HtB; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4N9DWK5drFz20KC for ; Mon, 14 Nov 2022 00:56:29 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B7C058516A; Sun, 13 Nov 2022 14:56:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="bKVg3HtB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 08DE585170; Sun, 13 Nov 2022 14:55:58 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8EDED85174 for ; Sun, 13 Nov 2022 14:55:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668347750; x=1699883750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2DAPlL0uzZLL+k/A1Wfo4pOrrsYf+VotWiCusbt4V7s=; b=bKVg3HtBpUt1pcJBzOErhuS0USh+Lq70R7SkpMcCYclFeGwOy6XG0Yz+ YXEDMAm/aHfnlu6uvo/aheqMcNTPEYxENx4yGmp6HdQdi1Q8kJzVaXior VjHj2brR9sfh/x/cRw4a0mqMxcOkx3ugBX5rdcpy9hM/D0o97xMWOZfQH pjvHvabMmydBEZqi2qTyMuYMZSqdW9gSPw3xhEN2cIjxq2YaBdQyYrfUa yZtlayJcR20sofsJ+U0W8uoDSgtxFsFPFV4EOQ6RvY+vUmqDP55/8Ao+s G6Ge0VUnOHogxNYTEThLMlJEOzs3f1E0V3KNhqc+nr6giGRRS4/1nmX8j Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10529"; a="292211354" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="292211354" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2022 05:55:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10529"; a="763166451" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="763166451" Received: from pglmail07.png.intel.com ([10.221.193.207]) by orsmga004.jf.intel.com with ESMTP; 13 Nov 2022 05:55:44 -0800 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id ABDEA355A; Sun, 13 Nov 2022 21:55:43 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id A937DE0094D; Sun, 13 Nov 2022 21:55:43 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang , Yau Wai Gan Subject: [PATCH 4/4] doc: README.socfpga: Add official boot flow support info Date: Sun, 13 Nov 2022 21:55:36 +0800 Message-Id: <20221113135536.9920-4-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20221113135536.9920-1-jit.loon.lim@intel.com> References: <20221113135536.9920-1-jit.loon.lim@intel.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Yau Wai Gan The official boot-up flow for SoC FPGA 64-bit is with Arm Trusted Firmware, ATF BL31. The non-ATF flow is legacy and is not supported officially moving forward. Update the README to include the information. Signed-off-by: Yau Wai Gan Signed-off-by: Jit Loon Lim --- doc/README.socfpga | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/doc/README.socfpga b/doc/README.socfpga index 362361e014..3f0ce8ce7b 100644 --- a/doc/README.socfpga +++ b/doc/README.socfpga @@ -17,6 +17,7 @@ Table of Contents 6. mkimage for Cyclone V, Arria V and Arria 10 7. SDRAM secure region in U-boot ATF flow 8. binman for U-boot ATF flow + 9. Official Boot-up Flow Support 1. Device Family Support vs Tested Intel Quartus @@ -304,4 +305,31 @@ Table of Contents This command generate u-boot.itb only. $ /tools/binman/binman build -u -d u-boot.dtb -O . -i kernel - This command generate kernel.itb only. \ No newline at end of file + This command generate kernel.itb only. + +9. Official Boot-up Flow Support +--------------------------------------------------------------------- + U-boot with Arm Trusted Firmware (ATF, TF-A) boot-up is the official supported + boot flow for Intel SoC FPGA Arm 64-bit architecture devices including + Stratix 10, Agilex and N5X. ATF is the secure runtime firmware running at EL3 + which handles secure accesses from U-boot proper and Linux running at EL2 and EL1. + + Official boot flow: + U-boot -> ATF BL31 -> U-boot proper -> Linux + + Legacy (aka non ATF) boot flow: + U-boot -> U-boot proper -> Linux + + U-boot version socfpga_v2021.07 and onwards change the defconfig name to match + the official boot flow. The non ATF flow defconfigs are renamed with _legacy_ + appended and is not officially supported moving forward. See details as follow. + + Legacy boot flow: + socfpga_agilex_defconfig -> socfpga_agilex_legacy_defconfig + socfpga_n5x_defconfig -> socfpga_n5x_legacy_defconfig + socfpga_stratix10_defconfig -> socfpga_stratix10_legacy_defconfig + + Official boot flow: + socfpga_agilex_atf_defconfig -> socfpga_agilex_defconfig + socfpga_n5x_atf_defconfig -> socfpga_n5x_defconfig + socfpga_stratix10_atf_defconfig -> socfpga_stratix10_defconfig \ No newline at end of file