From mboxrd@z Thu Jan 1 00:00:00 1970 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=-22.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 E2614C48BE0 for ; Fri, 11 Jun 2021 14:08:44 +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 3BE3E613C8 for ; Fri, 11 Jun 2021 14:08:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3BE3E613C8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 573408031F; Fri, 11 Jun 2021 16:08:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="WtZtMeuX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E7800803B9; Fri, 11 Jun 2021 16:08:40 +0200 (CEST) Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (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 8FEC1801DE for ; Fri, 11 Jun 2021 16:08:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82f.google.com with SMTP id v6so2624158qta.9 for ; Fri, 11 Jun 2021 07:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=cFS3VRLTIiX/WyLcHyy9FzCZ60ZiemNSE9smsOtiM+M=; b=WtZtMeuXp0YDqoQlEOZBr/s2m4dvnzyNUuXRrm34U7RRa07tXEjIFTFf1Nvj3aRq+0 nbfukATRizluPZxfYgzQ3tUKJ2wAy9qoImjsJ8Vxp876BWDXBX5aUeNDOkolcl5zQvR5 4ce7gHakp8yOvbHTodviFufHrAIClVHNdCG70= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=cFS3VRLTIiX/WyLcHyy9FzCZ60ZiemNSE9smsOtiM+M=; b=i2bm6TrAaeOHGeE5toVpJksdMlxdMAMnI0WxBiOa7jGqjfNJd+xgszkFqJgfhBS9Bx iaJU0gcy7NUGH63wQCozfXOSzA0Ir0Xfq/7kV9efL6GBqK5/qBIoYLLj/NmhfSLTpyv5 RyJzPcYBRLIGp4ABmeKJen/5quK2SAQkZ35YAEEG9bGMLp5azpRudsoYkmhcY7p7Cvtq pazRbaR44s5IZUImEIEx9LYXLAQB3wIPAZVcqaEP5dliSjltZh2oD53MpAmovN/Qz/rA qe4+WTK4kqB2z3ZsviQXHpx49eGxY2rbmW8rgL5lWd4IobnzRIe0DghlpWUHcDycauPU L/pA== X-Gm-Message-State: AOAM533b0R/cfH72N4YDPesRVk7RiVr9WcrhYg8JpAHeZ2UcyNuMN/2y KKCXKcefrp7YwqlKfkrlU0O9OQ== X-Google-Smtp-Source: ABdhPJyOo6D4TLA8dBTV0I5957jIWHufVV+tC5SpqtC2t+2Q4ToiZFckxaSMFBWQYkjebokIud8few== X-Received: by 2002:ac8:5ad0:: with SMTP id d16mr1980744qtd.49.1623420514270; Fri, 11 Jun 2021 07:08:34 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-a919-72df-8fd4-9925.res6.spectrum.com. [2603:6081:7b01:cbda:a919:72df:8fd4:9925]) by smtp.gmail.com with ESMTPSA id l3sm4154331qth.87.2021.06.11.07.08.32 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jun 2021 07:08:33 -0700 (PDT) Date: Fri, 11 Jun 2021 10:08:31 -0400 From: Tom Rini To: Lokesh Vutla Cc: Jan Kiszka , U-Boot Mailing List , Le Jin , Bao Cheng Su , Nian Gao , Chao Zeng , Simon Glass Subject: Re: [PATCH v2 4/5] watchdog: rti_wdt: Add support for loading firmware Message-ID: <20210611140831.GU9516@bill-the-cat> References: <88d7d3e323c27417d7109b8a92bf53a08ad77654.1622626660.git.jan.kiszka@siemens.com> <96039724-9a5f-dbb8-d46b-b268a0d9a8c2@ti.com> <20210607114007.GD9516@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="w1d+AIiKduYp7JzL" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) 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 --w1d+AIiKduYp7JzL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 11, 2021 at 07:14:21PM +0530, Lokesh Vutla wrote: > Hi Tom, >=20 > On 09/06/21 6:47 pm, Jan Kiszka wrote: > > On 07.06.21 13:44, Jan Kiszka wrote: > >> On 07.06.21 13:40, Tom Rini wrote: > >>> On Mon, Jun 07, 2021 at 03:33:52PM +0530, Lokesh Vutla wrote: > >>>> +Tom, > >>>> > >>>> Hi Tom, > >>>> > >>>> On 02/06/21 3:07 pm, Jan Kiszka wrote: > >>>>> From: Jan Kiszka > >>>>> > >>>>> To avoid the need of extra boot scripting on AM65x for loading a > >>>>> watchdog firmware, add the required rproc init and loading logic fo= r the > >>>>> first R5F core to the watchdog start handler. In case the R5F clust= er is > >>>>> in lock-step mode, also initialize the second core. The firmware it= self > >>>>> is embedded into U-Boot binary to ease access to it and ensure it is > >>>>> properly hashed in case of secure boot. > >>>>> > >>>>> One possible firmware source is https://github.com/siemens/k3-rti-w= dt. > >>>>> > >>>>> Signed-off-by: Jan Kiszka > >>>>> --- > >>>>> drivers/watchdog/Kconfig | 20 ++++++++++++ > >>>>> drivers/watchdog/Makefile | 5 +++ > >>>>> drivers/watchdog/rti_wdt.c | 58 +++++++++++++++++++++++++++++++= +++- > >>>>> drivers/watchdog/rti_wdt_fw.S | 20 ++++++++++++ > >>>>> 4 files changed, 102 insertions(+), 1 deletion(-) > >>>>> create mode 100644 drivers/watchdog/rti_wdt_fw.S > >>>>> > >>>>> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig > >>>>> index f0ff2612a6..1a1fddfe9f 100644 > >>>>> --- a/drivers/watchdog/Kconfig > >>>>> +++ b/drivers/watchdog/Kconfig > >>>>> @@ -209,6 +209,26 @@ config WDT_K3_RTI > >>>>> Say Y here if you want to include support for the K3 watchdog > >>>>> timer (RTI module) available in the K3 generation of processors. > >>>>> =20 > >>>>> +if WDT_K3_RTI > >>>>> + > >>>>> +config WDT_K3_RTI_LOAD_FW > >>>>> + bool "Load watchdog firmware" > >>>>> + depends on REMOTEPROC > >>>>> + help > >>>>> + Automatically load the specified firmware image into the MCU R5F > >>>>> + core 0. On the AM65x, this firmware is supposed to handle the e= xpiry > >>>>> + of the watchdog timer, typically by resetting the system. > >>>>> + > >>>>> +config WDT_K3_RTI_FW_FILE > >>>>> + string "Watchdog firmware image file" > >>>>> + default "k3-rti-wdt.fw" > >>>>> + depends on WDT_K3_RTI_LOAD_FW > >>>>> + help > >>>>> + Firmware image to be embedded into U-Boot and loaded on watchdog > >>>>> + start. > >>>> > >>>> I need your input on this proach. Is it okay to include the linker f= ile unders > >>>> drivers? > >>> > >>> Maybe? I suppose the first thing that springs to mind is why aren't = we > >>> using binman and including this blob (which I happily see is GPLv2) > >>> similar to how we do things with x86 for one example. > >>> > >> > >> See https://www.mail-archive.com/u-boot@lists.denx.de/msg377894.html > >> > >> Jan > >> > >=20 > > Did this help to answer open questions? Otherwise, please let me know. > >=20 > > I'd also like to avoid that his patch alone blocks 1-3 of the series > > needless - but I would also not mind getting everything in at once. >=20 > Can you provide your reviewed-by if you are okay with this approach? I was kind of hoping Simon would chime in here on binman usage. So, re-re-reading the above URL, yes, fsloader wouldn't be the right choice for watchdog firmware. But I think binman_entry_find() and related could work, in general, for this case of "need firmware blob embedded in to image". That said, this isn't just any firmware blob, it's the watchdog firmware. The less reliance on other things the safer it is. That means this would be an exception to the general firmware blob loading rule and yeah, OK, we can do it this way. Sorry for the delay. Reviewed-by: Tom Rini --=20 Tom --w1d+AIiKduYp7JzL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmDDblgACgkQFHw5/5Y0 tyx5Zgv/V6RCRxqVP+AGMCAoaXn7g9ESUcVuKgNtumnL2knf+HLl2Iv5OWBtCK0k sS/EcAc5xtzsQE2zYyxaKtkt4XMkI1azPZO8gJyPmvruHZC+90HGuPrApDG1cxBs CvGYgdMG0HgK/QRq6GIfBgTliwIZXBIdqwopuVP4O6pn9ydi4IZpKm8JvvTH+Gan Boh0tpEPIsBDrkM1ijEOUs6VGYF88WI8irEGRJYYOo7mqg8a6ax7Y9mGRFdSLtgO CaVZoDdHZcGTpqXaGuX/LWbT77omDf4+syb23BSupM+TkqVRUbeAUT7KGcj4VVzx B4zof9XNvfbDZTpg6+c5w+EciaRt+9iFytT8TxPY1iiHq02OZQgjkUfv7HZ0dQV0 nFNGMXaSzqoV7uRFJemnvxC2YaEVBKBOzEYKVYGtoT9SvUNATUOfcSSxKGWkR7DY JwanBKTEJa6rfelzppoXubg9Q7JIdobg64JYRDo/ig82swBFgXbsFYnDshpDP2BB YiBnjawX =k6Xw -----END PGP SIGNATURE----- --w1d+AIiKduYp7JzL--