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 3533FC433EF for ; Wed, 23 Mar 2022 13:23:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0F2E183954; Wed, 23 Mar 2022 14:23:09 +0100 (CET) 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="YcJj4rzx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5818C83CE9; Wed, 23 Mar 2022 14:23:06 +0100 (CET) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (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 5CED982133 for ; Wed, 23 Mar 2022 14:23:02 +0100 (CET) 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-x731.google.com with SMTP id v13so990078qkv.3 for ; Wed, 23 Mar 2022 06:23:02 -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=uSDZPkezzxyB0gkoKCx+OWIfOgK2m6VtQHCqIT0veDk=; b=YcJj4rzxAbKqol9tdzPturT1Ixxr+D08Vu3JUfk4NUJ9hw/MW0l/vus53TwBqbW3Li +itRULrMGrt43FAvJsw8dS08OR8mTeYrosLYUHv2mY7h3gwUg3wE+gQsUiMT4h/QhwLw AnyIkxnPDpbAu5DtfsxjhN6yMinZc/U6OFv34= 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=uSDZPkezzxyB0gkoKCx+OWIfOgK2m6VtQHCqIT0veDk=; b=xaHetgF16W/lWX18Sdkch/AMP1f1Ewa9v7nxSUKgcotW4mV+MCIWqmIwahaf6xhSlh NB0y+DPvMUDM8xbtohUs0CVtPc/8ZUuePkLF5SOGWyTXw2GHP8xM5qLRmU6aSMHFkSbG +2Zb6KYX9BxIehJO4WQOhUXE31XLPzRU7PAxl5Cjs+mL/qPOju67g2YW/fHprZvHt3Ft /fCk7AqjJN/onhLKYSc/wOTNajgkilNtBhbnqxgdmqh2a07qv2dJgb4c9+uilfjol4Eb 9nXq+DW33s381g/O8AYs0hvvqUaRY+RiN9fOkPyCV9BHq4NvPY8cp2jR9VZZA5mmF2J4 2xkA== X-Gm-Message-State: AOAM5304LpfbSjf1myb5gNR+kSGbChUxe8CRyV1L13NH+Srj2O5s55VK LXHZSjGp77Yxk/cm2OYWgKpiog== X-Google-Smtp-Source: ABdhPJyXfmxyQOiENO+ugIHoKd9OLPXkL9NrVTwGrOzSVqhJzgZfo4FtL67xMDoJ9pVnW+wOBQKXnQ== X-Received: by 2002:a05:620a:b93:b0:67d:3914:a368 with SMTP id k19-20020a05620a0b9300b0067d3914a368mr18466036qkh.191.1648041781145; Wed, 23 Mar 2022 06:23:01 -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 b126-20020a376784000000b0067d21404704sm10255966qkc.131.2022.03.23.06.23.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 06:23:00 -0700 (PDT) Date: Wed, 23 Mar 2022 09:22:58 -0400 From: Tom Rini To: Rui Miguel Silva Cc: u-boot@lists.denx.de, Simon Glass Subject: Re: [PATCH 1/2] cmd: load: add load command for memory mapped Message-ID: <20220323132258.GC2226424@bill-the-cat> References: <20220322104118.573537-1-rui.silva@linaro.org> <20220322104118.573537-2-rui.silva@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TnqyOTEeP5t+a7iN" Content-Disposition: inline In-Reply-To: <20220322104118.573537-2-rui.silva@linaro.org> 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 --TnqyOTEeP5t+a7iN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 22, 2022 at 10:41:17AM +0000, Rui Miguel Silva wrote: > cp.b is used a lot as a way to load binaries to memory and execute > them, however we may need to integrate this with the efi subsystem to > set it up as a bootdev. >=20 > So, introduce a loadm command that will be consistent with the other > loadX commands and will call the efi API's. >=20 > ex: loadm $kernel_addr $kernel_addr_r $kernel_size >=20 > with this a kernel with CONFIG_EFI_STUB enabled will be loaded and > then subsequently booted with bootefi command. >=20 > Signed-off-by: Rui Miguel Silva > --- > README | 1 + > cmd/Kconfig | 6 ++++ > cmd/bootefi.c | 12 ++++++++ > cmd/load.c | 48 ++++++++++++++++++++++++++++++++ > include/efi_loader.h | 2 ++ > lib/efi_loader/efi_device_path.c | 9 ++++++ > 6 files changed, 78 insertions(+) >=20 > diff --git a/README b/README > index fe3ba01865e6..2932734b3edc 100644 > --- a/README > +++ b/README > @@ -2693,6 +2693,7 @@ rarpboot- boot image via network using RARP/TFTP pr= otocol > diskboot- boot from IDE devicebootd - boot default, i.e., run 'bootcmd' > loads - load S-Record file over serial line > loadb - load binary file over serial line (kermit mode) > +loadm - load binary blob from source address to destination address > md - memory display > mm - memory modify (auto-incrementing) > nm - memory modify (constant address) There's likely a spot under doc/ that needs updating now too, as we move to having better documentation. > diff --git a/cmd/Kconfig b/cmd/Kconfig > index 564daa7bbc8d..d70e8398a558 100644 > --- a/cmd/Kconfig > +++ b/cmd/Kconfig > @@ -1076,6 +1076,12 @@ config CMD_LOADB > help > Load a binary file over serial line. > =20 > +config CMD_LOADM > + bool "loadm" > + default y > + help > + Load a binary over memory mapped. We don't make new commands default y for everyone, that adds to every board. This also needs a test, and should be enabled in sandbox so it is tested and also passed through coverity. --=20 Tom --TnqyOTEeP5t+a7iN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmI7HzIACgkQFHw5/5Y0 tywtGQwAi1MnxhcgE2ccfdhinLWF6aHRsXuQ3v2Drw9dom3wErS0DN7xxFxEk7Pa 2AycfFaXXWytwRJsv+AhbcIfDCVX+K5zlFd6LeQ6jK2KDZKLJSi0p2KGLHqnMbi0 D+R/6PpK0DDfQT/41aIYv3HsTK/7jfESGz2jPN68k3FkGsyGfoA3va24cxkj8UpC gbmLS/n8s51MVx8bsgkoA4mqYK8/XyJh7/aCNallc0uKv/sIVBKla92Ok5Rxg3ec 24zKbJ4/6ohmKgsTYR1SOLc04Sdnx7fKZ1MofvBBALBNQtNtR03aBBKjWdcVOhzX kp7nJuV1Zw6LgHMba/sP8WrsMY46g/W5WFSy8VKud4CXJJEbXGDdUj6wOeZWcWcg PBa/0/nwcfdGb7kDFUwkmtf0fJ80saXD1z8Q6ktlfpfPjZIkHjL5xap0haNonedK nvFOfCGSo33SNUrjbAEc/1MkUSlCFcV3Pzhc+Wl2WacC4c8wMzq3wfILw6s7I6vh VDet5TKN =BtkF -----END PGP SIGNATURE----- --TnqyOTEeP5t+a7iN--