public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Simon Glass <sjg@chromium.org>
Cc: Alexander Dahl <ada@thorsis.com>,
	Alexander Kochetkov <al.kochet@gmail.com>,
	Alexander Sverdlin <alexander.sverdlin@siemens.com>,
	Bin Meng <bmeng.cn@gmail.com>, Devarsh Thakkar <devarsht@ti.com>,
	Hugo Cornelis <hugo.cornelis@essensium.com>,
	Igor Opaniuk <igor.opaniuk@gmail.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Janne Grunau <j@jannau.net>, Julien Masson <jmasson@baylibre.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Leo Yu-Chi Liang <ycliang@andestech.com>,
	Lukasz Majewski <lukma@denx.de>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Matthew Garrett <mgarrett@aurora.tech>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	Maxim Moskalets <maximmosk4@gmail.com>,
	Nikhil M Jain <n-jain1@ti.com>,
	Paul-Erwan Rio <paulerwan.rio@gmail.com>,
	Raymond Mao <raymond.mao@linaro.org>,
	Roman Stratiienko <r.stratiienko@gmail.com>,
	Sughosh Ganu <sughosh.ganu@linaro.org>,
	Tom Rini <trini@konsulko.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH 13/67] boot: Rename fit_image_get_data()
Date: Fri, 3 Jan 2025 15:55:24 +0100	[thread overview]
Message-ID: <af1efc80-2b03-4e00-8b92-437f2bf3feee@gmx.de> (raw)
In-Reply-To: <20250101221003.1944600-14-sjg@chromium.org>

On 01.01.25 23:08, Simon Glass wrote:
> This function can only be used with FITs that use embedded data. Rename
> it so this is clear.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>
>   arch/arm/cpu/armv8/sec_firmware.c  |  4 ++--
>   arch/arm/mach-k3/r5/sysfw-loader.c |  2 +-
>   arch/x86/lib/bootm.c               |  6 +++---
>   boot/image-fit.c                   | 10 +++++-----
>   common/spl/spl_fit.c               |  2 +-
>   common/splash_source.c             |  4 +++-
>   common/update.c                    |  2 +-
>   include/image.h                    |  4 ++--
>   tools/image-host.c                 |  4 ++--
>   9 files changed, 20 insertions(+), 18 deletions(-)
>
> diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
> index 44372cbe4a1..b7c73f288bd 100644
> --- a/arch/arm/cpu/armv8/sec_firmware.c
> +++ b/arch/arm/cpu/armv8/sec_firmware.c
> @@ -128,8 +128,8 @@ static int sec_firmware_check_copy_loadable(const void *sec_firmware_img,
>   			return -EINVAL;
>   		}
>
> -		if (fit_image_get_data(sec_firmware_img, ld_node_off,
> -				       &data, &size)) {
> +		if (fit_image_get_emb_data(sec_firmware_img, ld_node_off,
> +					   &data, &size)) {
>   			printf("SEC Loadable: Can't get subimage data/size");
>   			return -ENOENT;
>   		}
> diff --git a/arch/arm/mach-k3/r5/sysfw-loader.c b/arch/arm/mach-k3/r5/sysfw-loader.c
> index 188731e673d..c323d2f78f8 100644
> --- a/arch/arm/mach-k3/r5/sysfw-loader.c
> +++ b/arch/arm/mach-k3/r5/sysfw-loader.c
> @@ -115,7 +115,7 @@ static int fit_get_data_by_name(const void *fit, int images, const char *name,
>   	if (node_offset < 0)
>   		return -ENOENT;
>
> -	return fit_image_get_data(fit, node_offset, addr, size);
> +	return fit_image_get_emb_data(fit, node_offset, addr, size);
>   }
>
>   static void k3_start_system_controller(int rproc_id, bool rproc_loaded,
> diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
> index 5fb46112ccb..3305560aa06 100644
> --- a/arch/x86/lib/bootm.c
> +++ b/arch/x86/lib/bootm.c
> @@ -106,9 +106,9 @@ static int boot_prep_linux(struct bootm_headers *images)
>   		is_zimage = 1;
>   #if defined(CONFIG_FIT)
>   	} else if (images->fit_uname_os && is_zimage) {
> -		ret = fit_image_get_data(images->fit_hdr_os,
> -				images->fit_noffset_os,
> -				(const void **)&data, &len);
> +		ret = fit_image_get_emb_data(images->fit_hdr_os,
> +					     images->fit_noffset_os,
> +					     (const void **)&data, &len);
>   		if (ret) {
>   			puts("Can't get image data/size!\n");
>   			goto error;
> diff --git a/boot/image-fit.c b/boot/image-fit.c
> index 7d56f0b5e6e..4b116ba5891 100644
> --- a/boot/image-fit.c
> +++ b/boot/image-fit.c
> @@ -902,13 +902,13 @@ int fit_image_get_entry(const void *fit, int noffset, ulong *entry)
>   }
>
>   /**
> - * fit_image_get_data - get data property and its size for a given component image node
> + * fit_image_get_emb_data - get data property and its size for a given component image node
>    * @fit: pointer to the FIT format image header
>    * @noffset: component image node offset
>    * @data: double pointer to void, will hold data property's data address
>    * @size: pointer to size_t, will hold data property's data size
>    *
> - * fit_image_get_data() finds data property in a given component image node.
> + * fit_image_get_emb_data() finds data property in a given component image node.
>    * If the property is found its data start address and size are returned to
>    * the caller.
>    *
> @@ -916,8 +916,8 @@ int fit_image_get_entry(const void *fit, int noffset, ulong *entry)
>    *     0, on success
>    *     -1, on failure
>    */
> -int fit_image_get_data(const void *fit, int noffset,
> -		const void **data, size_t *size)
> +int fit_image_get_emb_data(const void *fit, int noffset, const void **data,
> +			   size_t *size)
>   {
>   	int len;
>
> @@ -1074,7 +1074,7 @@ int fit_image_get_data_and_size(const void *fit, int noffset,
>   			*size = len;
>   		}
>   	} else {
> -		ret = fit_image_get_data(fit, noffset, data, size);
> +		ret = fit_image_get_emb_data(fit, noffset, data, size);
>   	}
>
>   	return ret;
> diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
> index 3160f573bfb..097c731d9a3 100644
> --- a/common/spl/spl_fit.c
> +++ b/common/spl/spl_fit.c
> @@ -282,7 +282,7 @@ static int load_simple_fit(struct spl_load_info *info, ulong fit_offset,
>   		src = src_ptr + overhead;
>   	} else {
>   		/* Embedded data */
> -		if (fit_image_get_data(fit, node, &data, &length)) {
> +		if (fit_image_get_emb_data(fit, node, &data, &length)) {
>   			puts("Cannot get image data/size\n");
>   			return -ENOENT;
>   		}
> diff --git a/common/splash_source.c b/common/splash_source.c
> index f43e7cc1be7..5ac32a2f995 100644
> --- a/common/splash_source.c
> +++ b/common/splash_source.c
> @@ -396,7 +396,9 @@ static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr)
>
>   	/* Extract the splash data from FIT */
>   	/* 1. Test if splash is in FIT internal data. */
> -	if (!fit_image_get_data(fit_header, node_offset, &internal_splash_data, &internal_splash_size))
> +	if (!fit_image_get_emb_data(fit_header, node_offset,
> +				    &internal_splash_data,
> +				    &internal_splash_size))
>   		memmove((void *)(uintptr_t)bmp_load_addr, internal_splash_data, internal_splash_size);
>   	/* 2. Test if splash is in FIT external data with fixed position. */
>   	else if (!fit_image_get_data_position(fit_header, node_offset, &external_splash_addr))
> diff --git a/common/update.c b/common/update.c
> index 6801b49479d..d149ca18e78 100644
> --- a/common/update.c
> +++ b/common/update.c
> @@ -200,7 +200,7 @@ static int update_fit_getparams(const void *fit, int noffset, ulong *addr,
>   {
>   	const void *data;
>
> -	if (fit_image_get_data(fit, noffset, &data, (size_t *)size))
> +	if (fit_image_get_emb_data(fit, noffset, &data, (size_t *)size))
>   		return 1;
>
>   	if (fit_image_get_load(fit, noffset, (ulong *)fladdr))
> diff --git a/include/image.h b/include/image.h
> index de44dc09d07..e5241648b5e 100644
> --- a/include/image.h
> +++ b/include/image.h
> @@ -1196,8 +1196,8 @@ int fit_image_get_type(const void *fit, int noffset, uint8_t *type);
>   int fit_image_get_comp(const void *fit, int noffset, uint8_t *comp);
>   int fit_image_get_load(const void *fit, int noffset, ulong *load);
>   int fit_image_get_entry(const void *fit, int noffset, ulong *entry);
> -int fit_image_get_data(const void *fit, int noffset,
> -				const void **data, size_t *size);
> +int fit_image_get_emb_data(const void *fit, int noffset, const void **data,
> +			   size_t *size);
>   int fit_image_get_data_offset(const void *fit, int noffset, int *data_offset);
>   int fit_image_get_data_position(const void *fit, int noffset,
>   				int *data_position);
> diff --git a/tools/image-host.c b/tools/image-host.c
> index 5e01b853c50..007a94f72d5 100644
> --- a/tools/image-host.c
> +++ b/tools/image-host.c
> @@ -574,7 +574,7 @@ int fit_image_cipher_data(const char *keydir, void *keydest,
>   	}
>
>   	/* Get image data and data length */
> -	if (fit_image_get_data(fit, image_noffset, &data, &size)) {
> +	if (fit_image_get_emb_data(fit, image_noffset, &data, &size)) {
>   		fprintf(stderr, "Can't get image data/size\n");
>   		return -1;
>   	}
> @@ -654,7 +654,7 @@ int fit_image_add_verification_data(const char *keydir, const char *keyfile,
>   	int noffset;
>
>   	/* Get image data and data length */
> -	if (fit_image_get_data(fit, image_noffset, &data, &size)) {
> +	if (fit_image_get_emb_data(fit, image_noffset, &data, &size)) {
>   		fprintf(stderr, "Can't get image data/size\n");
>   		return -1;
>   	}


  reply	other threads:[~2025-01-03 14:56 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-01 22:08 [PATCH 00/67] upl: Align with the updated spec Simon Glass
2025-01-01 22:08 ` [PATCH 01/67] bloblist: Make BLOBLIST_ALLOC the default Simon Glass
2025-01-01 22:08 ` [PATCH 02/67] abuf: Provide a way to get the buffer address Simon Glass
2025-01-01 22:08 ` [PATCH 03/67] abuf: Allow use in host tools Simon Glass
2025-01-01 22:08 ` [PATCH 04/67] abuf: Provide a constant buffer Simon Glass
2025-01-01 22:08 ` [PATCH 05/67] cpu: Provide a way to get the physical-address size Simon Glass
2025-01-01 22:08 ` [PATCH 06/67] serial: Support info() method in ns16550 xPL with UPL Simon Glass
2025-01-01 22:08 ` [PATCH 07/67] mkimage: Update map_to_sysmem() to match its prototype Simon Glass
2025-01-01 22:08 ` [PATCH 08/67] x86: Emable meminfo command Simon Glass
2025-01-03 14:51   ` Heinrich Schuchardt
2025-01-04 19:30     ` Simon Glass
2025-01-01 22:08 ` [PATCH 09/67] x86: Show the timestamp counter with bdinfo Simon Glass
2025-01-01 22:08 ` [PATCH 10/67] ofnode: Use 4K for a default tree-size Simon Glass
2025-01-01 22:08 ` [PATCH 11/67] ofnode: Indicate when out of space in a few places Simon Glass
2025-01-01 22:08 ` [PATCH 12/67] ofnode: Update of_add_subnode() to indicate name is alloced Simon Glass
2025-01-01 22:08 ` [PATCH 13/67] boot: Rename fit_image_get_data() Simon Glass
2025-01-03 14:55   ` Heinrich Schuchardt [this message]
2025-01-01 22:09 ` [PATCH 14/67] boot: Rename fit_image_get_data_and_size() Simon Glass
2025-01-01 22:09 ` [PATCH 15/67] boot: Update fit_image_get_emb_data to use abuf Simon Glass
2025-01-01 22:09 ` [PATCH 16/67] boot: Use fit_image_get_data() to get data Simon Glass
2025-01-01 22:09 ` [PATCH 17/67] boot: Update fit_image_get_data() to use abuf Simon Glass
2025-01-01 22:09 ` [PATCH 18/67] test: Fix inpected typo in upl test Simon Glass
2025-01-01 22:09 ` [PATCH 19/67] emulation: fdt: Relax condition for OF_HAS_PRIOR_STAGE Simon Glass
2025-01-01 22:09 ` [PATCH 20/67] emulation: Use bloblist to hold tables Simon Glass
2025-01-01 22:09 ` [PATCH 21/67] x86: Create more space for SPL with qemu-x86_64 Simon Glass
2025-01-01 22:09 ` [PATCH 22/67] upl: Create a function to create a memory node Simon Glass
2025-01-01 22:09 ` [PATCH 23/67] upl: Update add_upl_memmap() to use write_mem_node() Simon Glass
2025-01-01 22:09 ` [PATCH 24/67] upl: Update add_upl_memres() " Simon Glass
2025-01-01 22:09 ` [PATCH 25/67] upl: Support writing a UPL only for testing Simon Glass
2025-01-01 22:09 ` [PATCH 26/67] upl: Drop enum upl_serial_access_type Simon Glass
2025-01-01 22:09 ` [PATCH 27/67] upl: Init serial and graphics alists in upl_init() Simon Glass
2025-01-01 22:09 ` [PATCH 28/67] upl: Move serial and graphics addition-code to upl_common Simon Glass
2025-01-01 22:09 ` [PATCH 29/67] pci: video: Set up the pixel-format field Simon Glass
2025-01-01 22:09 ` [PATCH 30/67] x86: Show an error if video fails Simon Glass
2025-01-01 22:09 ` [PATCH 31/67] x86: Support jumping to a UPL image Simon Glass
2025-01-01 22:09 ` [PATCH 32/67] x86: Enable UPL handoff for SPL Simon Glass
2025-01-01 22:09 ` [PATCH 33/67] x86: Align the SMBIOS table to a 4K boundary Simon Glass
2025-01-03 15:10   ` Heinrich Schuchardt
2025-01-01 22:09 ` [PATCH 34/67] upl: Require OFNODE_MULTI_TREE when writing a UPL handoff Simon Glass
2025-01-01 22:09 ` [PATCH 35/67] upl: Drop the argument to spl_write_upl_handoff() Simon Glass
2025-01-01 22:09 ` [PATCH 36/67] x86: emulation: Enable UPL Simon Glass
2025-01-01 22:09 ` [PATCH 37/67] upl: Correct comment and condition in add_upl_memres() Simon Glass
2025-01-01 22:09 ` [PATCH 38/67] upl: Add addr/size tags in the reserved-memory node Simon Glass
2025-01-01 22:09 ` [PATCH 39/67] upl: Update upl_add_graphics() to return framebuffer Simon Glass
2025-01-01 22:09 ` [PATCH 40/67] upl: Add a function to write a UPL handoff to an abuf Simon Glass
2025-01-01 22:09 ` [PATCH 41/67] upl: Use a 64-bit value for a memregion base-address Simon Glass
2025-01-01 22:09 ` [PATCH 42/67] upl: Set bit 32 of the address when using ISA Simon Glass
2025-01-01 22:09 ` [PATCH 43/67] upl: Add RAM to the memory region Simon Glass
2025-01-01 22:09 ` [PATCH 44/67] upl: Add a compatible string for the upl-params node Simon Glass
2025-01-01 22:09 ` [PATCH 45/67] upl: Move buffer_addr_size() higher and rename Simon Glass
2025-01-01 22:09 ` [PATCH 46/67] upl: Factor out part of encode_reg() to new function Simon Glass
2025-01-01 22:09 ` [PATCH 47/67] upl: Move decode_addr_size() higher and rename Simon Glass
2025-01-01 22:09 ` [PATCH 48/67] upl: Factor out part of decode_reg() to new function Simon Glass
2025-01-01 22:09 ` [PATCH 49/67] upl: Correct name of upl-images Simon Glass
2025-01-01 22:09 ` [PATCH 50/67] dm: core: Clarify behaviour of ofnode_name_eq() Simon Glass
2025-01-01 22:09 ` [PATCH 51/67] dm: core: Allow ofnode_name_eq() to accept a unit address Simon Glass
2025-01-01 22:09 ` [PATCH 52/67] dm: core: Rewrite ofnode_find_subnode() to use ofnode API Simon Glass
2025-01-01 22:09 ` [PATCH 53/67] upl: test: Show the handoff FDT when debugging Simon Glass
2025-01-01 22:09 ` [PATCH 54/67] upl: Use a reg property to specify the FIT address and size Simon Glass
2025-01-01 22:09 ` [PATCH 55/67] upl: Update and tidy writing of images Simon Glass
2025-01-01 22:09 ` [PATCH 56/67] upl: Make use of alist_for_each() Simon Glass
2025-01-01 22:09 ` [PATCH 57/67] upl: Correct use of sizeof() Simon Glass
2025-01-01 22:09 ` [PATCH 58/67] upl: Drop acpi_nvs_size Simon Glass
2025-01-01 22:09 ` [PATCH 59/67] upl: Improve uniqueness of log_msg_ret() strings Simon Glass
2025-01-01 22:09 ` [PATCH 60/67] upl: Add PCI information Simon Glass
2025-01-01 22:09 ` [PATCH 61/67] upl: Handle serial on an ISA bus with /chosen node Simon Glass
2025-01-01 22:09 ` [PATCH 62/67] upl: Add missing word in comment for upl_write_handoff() Simon Glass
2025-01-01 22:09 ` [PATCH 63/67] upl: Add a command to execute a UPL payload Simon Glass
2025-01-01 22:09 ` [PATCH 64/67] scripts: Update qemu script to use 64-bit on x86 always Simon Glass
2025-01-01 22:09 ` [PATCH 65/67] scripts: Update qemu script to support specifying a UPL Simon Glass
2025-01-01 22:09 ` [PATCH 66/67] upl: Add reserved memory for the ACPI and SMBIOS tables Simon Glass
2025-01-01 22:09 ` [PATCH 67/67] upl: Add an 'addr' property for Tianocore Simon Glass
2025-01-02 14:44 ` [PATCH 00/67] upl: Align with the updated spec Tom Rini
2025-01-02 23:45   ` Simon Glass
2025-01-03 14:26     ` Tom Rini
2025-01-04 19:32       ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af1efc80-2b03-4e00-8b92-437f2bf3feee@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=ada@thorsis.com \
    --cc=al.kochet@gmail.com \
    --cc=alexander.sverdlin@siemens.com \
    --cc=bmeng.cn@gmail.com \
    --cc=devarsht@ti.com \
    --cc=hugo.cornelis@essensium.com \
    --cc=igor.opaniuk@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=j@jannau.net \
    --cc=jmasson@baylibre.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lukma@denx.de \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=maximmosk4@gmail.com \
    --cc=mgarrett@aurora.tech \
    --cc=mkorpershoek@baylibre.com \
    --cc=n-jain1@ti.com \
    --cc=paulerwan.rio@gmail.com \
    --cc=r.stratiienko@gmail.com \
    --cc=raymond.mao@linaro.org \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=ycliang@andestech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox