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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C2A9AC433F5 for ; Sun, 3 Apr 2022 00:19:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 14DD983C0D; Sun, 3 Apr 2022 02:16:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (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="VdjJHNzO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8977F83B46; Sun, 3 Apr 2022 02:15:58 +0200 (CEST) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (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 0D40D83B11 for ; Sun, 3 Apr 2022 02:15:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72c.google.com with SMTP id v15so4972354qkg.8 for ; Sat, 02 Apr 2022 17:15:43 -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; bh=QoHHvhShf016Nw2FUIp2pzGQRzDVus/VdjNhfk8aQ6U=; b=VdjJHNzOqYS2E1z8ajjf3Bao1ilmvXwkRXkkTdJUd3nUTBQzFO+4X4Bs6RpH7d9WiX 1UCTow69C4Lw3739NwqBTJrGSe2qK0lb/dU3CKdBr8P+MwQGCbMsH0bJDcNd5NC+SEPs /vYubhIuH9flvK0pxMEDK/Us+fScuXbPsxM4E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=QoHHvhShf016Nw2FUIp2pzGQRzDVus/VdjNhfk8aQ6U=; b=nu/cDRdndvZhZD86YcYC7BJuRqxjfez1qf8a+v+IL0h3B4MPEYJ28y+gkYXwkEf1ot ei3JfKnlPG3/CbmfqdA2zGqV6Qq/2yfTDZkSn+tJXQ3e+byHj39eiBukg3ir3fR1N/+e tvSmMQedlvvU8lS4kPyRqkQlgFno7lrIddYRayaOqVYL6U3oxe5e8seNrZ3peUPL4VUb yZn5B2XM1qovQNdQQ5Ih+vScy7euCxP5f+xZa0hTh5yee161LLp71Onb/fl2Zfa2tjoI N5IwOqU7s31XEBJ7uXH9T10nJFHxG0djEISvde9IUT0CBRzE5uIircVp9qamC4iB6WGu NUhQ== X-Gm-Message-State: AOAM530qcY6EStojSpeGQ/RfuAzWjTk2Ierh0U8J6KuHPCkO5jdwW7Yt SaNhCRNe0GOcpYiMUDbAkZdULQmaTgjjnQ== X-Google-Smtp-Source: ABdhPJxs70kzW9HjgArfu1hJVoeMxLzd8pToAdtu5KU4z0BHTEUFl4nSk8e395++gl/p4qmieGis3g== X-Received: by 2002:a37:6784:0:b0:67b:32b3:ba71 with SMTP id b126-20020a376784000000b0067b32b3ba71mr10443501qkc.595.1648944942890; Sat, 02 Apr 2022 17:15:42 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id v5-20020a05622a144500b002e1c7d027b1sm5018874qtx.66.2022.04.02.17.15.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Apr 2022 17:15:42 -0700 (PDT) Date: Sat, 2 Apr 2022 20:15:40 -0400 From: Tom Rini To: Sean Anderson Cc: Linus Walleij , Liviu Dudau , Andre Przywara , Simon Glass , u-boot@lists.denx.de Subject: Re: [PATCH v3 11/29] spl: Add semihosting boot method Message-ID: <20220403001540.GW14476@bill-the-cat> References: <20220322205938.1721846-1-sean.anderson@seco.com> <20220322205938.1721846-12-sean.anderson@seco.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XQVe3nzScD1ikyTV" Content-Disposition: inline In-Reply-To: <20220322205938.1721846-12-sean.anderson@seco.com> X-Clacks-Overhead: GNU Terry Pratchett 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.5 at phobos.denx.de X-Virus-Status: Clean --XQVe3nzScD1ikyTV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 22, 2022 at 04:59:19PM -0400, Sean Anderson wrote: > This adds a boot method for loading the next stage from the host. It is > mostly modeled off of spl_load_image_ext. I am not really sure why/how > spl_load_image_fat uses three different methods to load the image, but > the simple case seems to work OK for now. >=20 > To control the presence of this boot method, we add a config symbol. > While we're at it, we update the original semihosting config symbol. >=20 > I think semihosting has some advantages of other forms of JTAG boot. > Common other ways to boot from JTAG include: >=20 > - Implementing DDR initialization through JTAG (typically with dozens of > lines of TCL) and then loading U-Boot. The DDR initialization > typically uses hard-coded register writes, and is not easily adapted > to different boards. BOOT_DEVICE_SMH allows booting with SPL, > leveraging U-Boot's existing DDR initialization code. This is the > method used by NXP's CodeWarrior IDE on Layerscape processors (see > AN12270). > - Loading a bootloader into SDRAM, waiting for it to initialize DDR, and > then loading U-Boot. This is tricky, because the debugger must stop the > boot after the bootloader has completed its work. Trying to load > U-Boot too early can cause failure to boot. This is the method used by > Xilinx with its Zynq(MP) processors. > - Loading SPL with BOOT_DEVICE_RAM and breaking before SPL loads the > image to load U-Boot at the appropriate place. This can be a bit > tricky, because the load address is dependent on the header size. An > elf with symbols must also be used in order to stop at the appropriate > point. BOOT_DEVICE_SMH can be viewed as an extension of this process, > where SPL automatically stops and tells the host where to place the > image. >=20 > Signed-off-by: Sean Anderson Applied to u-boot/next, thanks! --=20 Tom --XQVe3nzScD1ikyTV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJI5ywACgkQFHw5/5Y0 tyzmLAv+M5gEBTXlOCaGd8mq5RLaVT5MZLnqwwHrpFTuDhbmsXv7nK/Dvoq54IMO oGoI0+EVKLXaHNm7kQyRuplwW6FSC8Jc+QhVq2aBdTIvfIaAjoQzJ3WwLgLAfcEs I5JlEaJvyfRzXWg5MNs4dj2r9ek6AJOD70QFXaQi0o+otyjRZfkH+Nyw8hXdrJ3q RC7YfeJk33yYeF31ANA6T6DLZzDqJK23SrUmdD285d4wCkXnX2E6kGIYKxOllNb9 5LGYZyqjy+T/hUkvaYS4c2X1m2bm75KC/MDXOtwp1AZ/7c277DjinCc718XCLlkG sHvrNTRBGmJ3o7lENrsEd4Fm/ygDPsLDkh7dR4XLWKmVfWgyLV/iNQPoMBwBJxn1 0a5DuOPY8J+XCyxLfhUUXjP9BG0b6L+ZAqGfVG1yVPNVhv8s1iFhLfe3z7wq5SLu +X5hIOSky4ts7k1iFPgeCdQcbYA8xJ2QVGeMEN2v//KZPVWStZscfeecXurkzXC2 SU7Oxirl =Gz0A -----END PGP SIGNATURE----- --XQVe3nzScD1ikyTV--