Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E42FC432BE for ; Thu, 26 Aug 2021 21:42:26 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 54CAF60F14 for ; Thu, 26 Aug 2021 21:42:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 54CAF60F14 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F27918322F; Thu, 26 Aug 2021 23:42:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="tx7Bk4xw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E03B083219; Thu, 26 Aug 2021 23:42:18 +0200 (CEST) Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B8B4D83189 for ; Thu, 26 Aug 2021 23:42:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.nuke.me@gmail.com Received: by mail-oi1-x233.google.com with SMTP id p2so6963131oif.1 for ; Thu, 26 Aug 2021 14:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6/U8fpsizUlxMo93B6zjaOhUbiNPd47Hqguk+/NK9DU=; b=tx7Bk4xwDdmxSR+Ozd2ehOh26RupqfdDdZxRMrPpPBAGg1yY8myG1A2RFyujn05sRP THE1+q1HNnu/3CwQ5GpeBxjuPmSaiGeQHeAREydXBC3QNkVRpyA2USEN8/BApPaXsC2w ZM6JsHIufdgoaAwpZ3mV/98dbUUj99ZjRxiHQ6UPMZ13fyxtSKga0NQn9lvewRHhZ3yv +Swb67sTKrjtTMk5t4s+AraBKmvlB5cNHMswRAl7UMXJmrC+Qg3TkcU7xTpung4pJ8Xb EFTjlwFlUHl/CSn29mgje2YUevTZT0ofRuO/PWAc8huZ7ALGqfchbN2N2H7ivSpY+JOT NxWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6/U8fpsizUlxMo93B6zjaOhUbiNPd47Hqguk+/NK9DU=; b=m0BETfdJaYScDkOfKFx70Ku4YDBSbKSC9SBCC3QBNEHh30FUMW+2aGHS0n22pv2joA YQDysb3mxZmyE+PPtPdvDyPBadhlcxQSuqHXWKyXpfHoXzMeM28Un4uFqHhQVzcFKYJW VVBUDgDpKBe2gqrf+FZc2+o4GacaPcGRyGRsS6cnKplPkvAPRN9njkBqAuwmUGpwp7TX wsdianyJFPbctfddRr7m+VzmY+Ig0baeGcaxeyloZIHP/FYgzQVjDd+enjGIeKatudZt T5UblIkKwt9YG9NSR25etsvaTk42v2viS3pQGB+qCHqFBHeIGuc+00TLChmCAIiDd2D4 FmLg== X-Gm-Message-State: AOAM533RC8qCVpVP3/04dzCABp/rlu2j+h+qvlzvtc5AIuBPGIhsBKpY Si3M6UgMp2Qv3ZpreHvaMdGLKITxXdE= X-Google-Smtp-Source: ABdhPJxULjiuic837weNZb+BH2e9gn7NSc6fGm1fULutYj3/2PqqhQhWpLSgsiClYjzjWlXYKB+Kgw== X-Received: by 2002:aca:2206:: with SMTP id b6mr12261950oic.88.1630014132748; Thu, 26 Aug 2021 14:42:12 -0700 (PDT) Received: from nuclearis3.lan (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id 14sm858852otl.78.2021.08.26.14.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Aug 2021 14:42:12 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de Cc: patrick.delaunay@foss.st.com, marex@denx.de, Alexandru Gagniuc Subject: [PATCH 00/10] stm32mp1: Support falcon mode with OP-TEE payloads Date: Thu, 26 Aug 2021 16:41:59 -0500 Message-Id: <20210826214209.254461-1-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean My goal when I started on this project a year ago was to get to linux userspace within a second from power on. Oh, and it had to be secure! Contrast that to the two minutes it took the STLinux demo to come up. It was obvious that the accepted way of running an FSBL, then SSBL was going to blow the time budget. There really wasn't a good solution, and traditional falcon mode with "spl export" command was not secure. I chose to use SPL with a FIT payload. We have to add certain logic to SPL, as well as some FDT modifications that would be normally done in u-boot. The boot flow is SPL -> OP-TEE -> Linux Incidentally, these patches are some of the earlier ones I wrote for this project. It didn't make sense to publish them at the time, as the supporting infrastructure was not in place then I decided not to separate these patches into mini-series. Alexandru Gagniuc (10): stm32mp1: Add support for baudrates higher than 115200 stm32mp1: Add support for falcon mode boot from SD card board: stm32mp1: Implement board_fit_config_name_match() for SPL fdt_support: Implement fdt_ethernet_set_macaddr() arm: stm32mp: bsec: Do not skip .probe() for SPL arm: stm32mp: Factor out reading MAC address from OTP stm32mp1: spl: Configure MAC address when booting OP-TEE lib: Makefile: Make optee library available in SPL ARM: dts: stm32mp: Add OP-TEE "/firmware" node to SPL dtb stm32mp1: spl: Copy optee nodes to target FDT for OP-TEE payloads arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 1 + arch/arm/mach-stm32mp/bsec.c | 2 +- arch/arm/mach-stm32mp/cpu.c | 59 ++++++++++++++----- .../arm/mach-stm32mp/include/mach/sys_proto.h | 3 + arch/arm/mach-stm32mp/spl.c | 3 + board/st/stm32mp1/spl.c | 49 +++++++++++++++ common/fdt_support.c | 30 ++++++++++ include/configs/stm32mp1.h | 17 ++++++ include/fdt_support.h | 17 ++++++ lib/Makefile | 2 +- 10 files changed, 167 insertions(+), 16 deletions(-) -- 2.31.1