Skip to contentSkip to conversation

spl: fix entry_point equal to load_addr

PATCH New Giulio Benetti 4 participants 18 messages Nov 25, 2019 – Jan 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

At the moment entry_point is set to image_get_load(header) that sets it to "load address" instead of "entry point", assuming entry_point is equal to load_addr, but it's not true. Then load_addr is set to "entry_point - header_size", but this is wrong too since load_addr is not an entry point.

So use image_get_ep() for entry_point assignment and image_get_load() for load_addr assignment.

---
 common/spl/spl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
common/spl/spl.c +2 -2
index f1ad8dc9da..cdae346753 100644
@@ -261,9 +261,9 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
 			spl_image->entry_point = image_get_ep(header);
 			spl_image->size = image_get_data_size(header);
 		} else {
-			spl_image->entry_point = image_get_load(header);
+			spl_image->entry_point = image_get_ep(header);
 			/* Load including the header */
-			spl_image->load_addr = spl_image->entry_point -
+			spl_image->load_addr = image_get_load(header) -
 				header_size;
 			spl_image->size = image_get_data_size(header) +
 				header_size;
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Quoted 10 lines · Giulio Benetti

At the moment entry_point is set to image_get_load(header) that sets it to "load address" instead of "entry point", assuming entry_point is equal to load_addr, but it's not true. Then load_addr is set to "entry_point - header_size", but this is wrong too since load_addr is not an entry point.

So use image_get_ep() for entry_point assignment and image_get_load() for load_addr assignment.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191205/41ba8521/attachment.sig>
#2 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

I will send a fix proposal.

Thanks

Patrice

Quoted 14 lines · Tom Rini
Quoted 10 lines · Giulio Benetti

At the moment entry_point is set to image_get_load(header) that sets it to "load address" instead of "entry point", assuming entry_point is equal to load_addr, but it's not true. Then load_addr is set to "entry_point - header_size", but this is wrong too since load_addr is not an entry point.

So use image_get_ep() for entry_point assignment and image_get_load() for load_addr assignment.

Applied to u-boot/master, thanks!

#3 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Quoted 4 lines · Patrice CHOTARD

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

Looking at socfpga gen5 u-boot.img, this is probably broken as well.

And I don't even see any RB or TB tags here :-(

Regards,
Simon

Quoted 22 lines

I will send a fix proposal.

Thanks

Patrice

Quoted 14 lines · Tom Rini
Quoted 10 lines · Giulio Benetti

At the moment entry_point is set to image_get_load(header) that sets it to "load address" instead of "entry point", assuming entry_point is equal to load_addr, but it's not true. Then load_addr is set to "entry_point - header_size", but this is wrong too since load_addr is not an entry point.

So use image_get_ep() for entry_point assignment and image_get_load() for load_addr assignment.

Applied to u-boot/master, thanks!

#4 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Quoted 9 lines · Simon Goldschmidt
Quoted 4 lines · Patrice CHOTARD

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

Looking at socfpga gen5 u-boot.img, this is probably broken as well.

And I don't even see any RB or TB tags here :-(

Ugh, what the heck? I applied this because I looked over the changes and they seemed correct. I'm quite willing to just revert this but I would like to know how it's breaking. Sorry all!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191206/062462e2/attachment.sig>
#5 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Quoted 8 lines · Tom Rini
Quoted 6 lines · Simon Goldschmidt
Quoted 4 lines · Patrice CHOTARD

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

Quoted 7 lines
Quoted 3 lines

Looking at socfpga gen5 u-boot.img, this is probably broken as well.

And I don't even see any RB or TB tags here :-(

Ugh, what the heck? I applied this because I looked over the changes and they seemed correct. I'm quite willing to just revert this but I would like to know how it's breaking. Sorry all!

Looking at the branch a few lines up I can understand why this seemed like a small change. I hadn't seen this before Patrice's mail, either.

Let me test this on socfpga_socrates tomorrow, I could still be wrong since this is from reading the code and binary only. But entry_point should be 0 in my u-boot.img if I'm not mistaken, and that should break it.

Regards,
Simon

#6 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Quoted 17 lines · Simon Goldschmidt
Quoted 8 lines · Tom Rini
Quoted 6 lines · Simon Goldschmidt
Quoted 4 lines · Patrice CHOTARD

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

Quoted 7 lines
Quoted 3 lines

Looking at socfpga gen5 u-boot.img, this is probably broken as well.

And I don't even see any RB or TB tags here :-(

Ugh, what the heck? I applied this because I looked over the changes and they seemed correct. I'm quite willing to just revert this but I would like to know how it's breaking. Sorry all!

Quoted 6 lines

Looking at the branch a few lines up I can understand why this seemed like a small change. I hadn't seen this before Patrice's mail, either.

Let me test this on socfpga_socrates tomorrow, I could still be wrong since this is from reading the code and binary only. But entry_point should be 0 in my u-boot.img if I'm not mistaken, and that should break it.

Maybe I just haven't had enough coffee or time to think, but that sounds like entry_point being set wrong somewhere. Of course, if it's being set wrong somewhere and it's not self-contained within U-Boot to correct it (iow external scripts/docs), we have to deal with that reality.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191206/93682a81/attachment.sig>
#7 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

In reply to Tom Rini

Hello Tom, all,

Quoted 7 lines · Tom Rini
Quoted 6 lines · Simon Goldschmidt
Quoted 4 lines · Patrice CHOTARD

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

Quoted 8 lines
Quoted 3 lines

Looking at socfpga gen5 u-boot.img, this is probably broken as well.

And I don't even see any RB or TB tags here :-(

Ugh, what the heck? I applied this because I looked over the changes and they seemed correct. I'm quite willing to just revert this but I would like to know how it's breaking. Sorry all!

IMHO this is due to wrong images creation with mkinage, especially when passing parameters with -a and -e flags.

In my case I need them to be:
-a 0x80002000 (load address) => CONFIG_SYS_TEXT_BASE
-e 0x800023FD (entry point where SPL jumps to) => CONFIG_SYS_UBOOT_START

So *maybe* on STM32MP1 and other broken boards -e (CONFIG_SYS_UBOOT_START) is not equal to -a (CONFIG_SYS_TEXT_BASE) as was assumed before(but wrong).

Indeed CONFIG_SYS_UBOOT_START is set to 0 if not specified in u-boot/Makefile:
`
# U-Boot entry point, needed for booting of full-blown U-Boot

# from the SPL U-Boot version.
#
ifndef CONFIG_SYS_UBOOT_START
CONFIG_SYS_UBOOT_START := 0
endif
`

So probably broken boards try to jump to absolute 0. A solving patch would be:
ifndef CONFIG_SYS_UBOOT_START CONFIG_SYS_UBOOT_START := CONFIG_SYS_TEXT_BASE endif

What do you think?

Sorry for this mess!

Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
#8 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Hi All

Quoted 37 lines · Giulio Benetti

Hello Tom, all,

Quoted 7 lines · Tom Rini
Quoted 6 lines · Simon Goldschmidt
Quoted 4 lines · Patrice CHOTARD

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

Quoted 8 lines
Quoted 3 lines

Looking at socfpga gen5 u-boot.img, this is probably broken as well.

And I don't even see any RB or TB tags here :-(

Ugh, what the heck?  I applied this because I looked over the changes and they seemed correct.  I'm quite willing to just revert this but I would like to know how it's breaking.  Sorry all!

IMHO this is due to wrong images creation with mkinage, especially when passing parameters with -a and -e flags.

In my case I need them to be:

(quoted diff) +0 -2
-a 0x80002000 (load address) => CONFIG_SYS_TEXT_BASE
-e 0x800023FD (entry point where SPL jumps to) => CONFIG_SYS_UBOOT_START

So *maybe* on STM32MP1 and other broken boards -e (CONFIG_SYS_UBOOT_START) is not equal to -a (CONFIG_SYS_TEXT_BASE) as was assumed before(but wrong).

Indeed CONFIG_SYS_UBOOT_START is set to 0 if not specified in u-boot/Makefile:
`
# U-Boot entry point, needed for booting of full-blown U-Boot

# from the SPL U-Boot version.
#
ifndef CONFIG_SYS_UBOOT_START
CONFIG_SYS_UBOOT_START := 0
endif
`
Quoted 7 lines

So probably broken boards try to jump to absolute 0. A solving patch would be:
ifndef CONFIG_SYS_UBOOT_START CONFIG_SYS_UBOOT_START := CONFIG_SYS_TEXT_BASE endif

What do you think?

This is what i implemented to fix this issue. Here is my proposal [1], but i need some

feedback from some boards maintainers.

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=146876

Thanks

Patrice

Quoted 4 lines

Sorry for this mess!

Best regards

#9 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Hi Patrice,

Quoted 9 lines · Patrice CHOTARD
Quoted 7 lines

So probably broken boards try to jump to absolute 0. A solving patch would be:
ifndef CONFIG_SYS_UBOOT_START CONFIG_SYS_UBOOT_START := CONFIG_SYS_TEXT_BASE endif

What do you think?

This is what i implemented to fix this issue. Here is my proposal [1], but i need some

Yes, I've missed it for few minutes.
Thanks for solving this.

Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 12 lines

feedback from some boards maintainers.

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=146876

Thanks

Patrice

Quoted 4 lines

Sorry for this mess!

Best regards

#10 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

In reply to Giulio Benetti
Quoted 24 lines · Giulio Benetti

Hello Tom, all,

Quoted 7 lines · Tom Rini
Quoted 6 lines · Simon Goldschmidt
Quoted 4 lines · Patrice CHOTARD

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

Quoted 8 lines
Quoted 3 lines

Looking at socfpga gen5 u-boot.img, this is probably broken as well.

And I don't even see any RB or TB tags here :-(

Ugh, what the heck? I applied this because I looked over the changes and they seemed correct. I'm quite willing to just revert this but I would like to know how it's breaking. Sorry all!

IMHO this is due to wrong images creation with mkinage, especially when passing parameters with -a and -e flags.

In my case I need them to be:

Review

Quoted 2 lines
(quoted diff) +0 -2
-a 0x80002000 (load address) => CONFIG_SYS_TEXT_BASE
-e 0x800023FD (entry point where SPL jumps to) => CONFIG_SYS_UBOOT_START

Well, CONFIG_SYS_UBOOT_START is only set in 15 files in include/configs, so I guess a lot more boards might be broken...

Quoted 16 lines

So *maybe* on STM32MP1 and other broken boards -e (CONFIG_SYS_UBOOT_START) is not equal to -a (CONFIG_SYS_TEXT_BASE) as was assumed before(but wrong).

Indeed CONFIG_SYS_UBOOT_START is set to 0 if not specified in u-boot/Makefile:
`
# U-Boot entry point, needed for booting of full-blown U-Boot

# from the SPL U-Boot version.
#
ifndef CONFIG_SYS_UBOOT_START
CONFIG_SYS_UBOOT_START := 0
endif
`
Quoted 5 lines

So probably broken boards try to jump to absolute 0. A solving patch would be:
ifndef CONFIG_SYS_UBOOT_START CONFIG_SYS_UBOOT_START := CONFIG_SYS_TEXT_BASE endif

That might work, but I wonder if this is the correct time in the release to do so.

Regards,
Simon

Quoted 9 lines

What do you think?

Sorry for this mess!

Best regards
--
Giulio Benetti
Benetti Engineering sas

#11 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Quoted 48 lines · Simon Goldschmidt
Quoted 24 lines · Giulio Benetti

Hello Tom, all,

Quoted 7 lines · Tom Rini
Quoted 6 lines · Simon Goldschmidt
Quoted 4 lines · Patrice CHOTARD

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

Quoted 8 lines
Quoted 3 lines

Looking at socfpga gen5 u-boot.img, this is probably broken as well.

And I don't even see any RB or TB tags here :-(

Ugh, what the heck? I applied this because I looked over the changes and they seemed correct. I'm quite willing to just revert this but I would like to know how it's breaking. Sorry all!

IMHO this is due to wrong images creation with mkinage, especially when passing parameters with -a and -e flags.

In my case I need them to be:

Review

Quoted 2 lines
(quoted diff) +0 -2
-a 0x80002000 (load address) => CONFIG_SYS_TEXT_BASE
-e 0x800023FD (entry point where SPL jumps to) => CONFIG_SYS_UBOOT_START

Well, CONFIG_SYS_UBOOT_START is only set in 15 files in include/configs, so I guess a lot more boards might be broken...

Quoted 16 lines

So *maybe* on STM32MP1 and other broken boards -e (CONFIG_SYS_UBOOT_START) is not equal to -a (CONFIG_SYS_TEXT_BASE) as was assumed before(but wrong).

Indeed CONFIG_SYS_UBOOT_START is set to 0 if not specified in u-boot/Makefile:
`
# U-Boot entry point, needed for booting of full-blown U-Boot

# from the SPL U-Boot version.
#
ifndef CONFIG_SYS_UBOOT_START
CONFIG_SYS_UBOOT_START := 0
endif
`
Quoted 8 lines
Quoted 5 lines

So probably broken boards try to jump to absolute 0. A solving patch would be:
ifndef CONFIG_SYS_UBOOT_START CONFIG_SYS_UBOOT_START := CONFIG_SYS_TEXT_BASE endif

That might work, but I wonder if this is the correct time in the release to do so.

Yes, at this point in the cycle the best option is to revert the original commit and for the next release bring it back after applying Patrice's series to fix the bogus default to CONFIG_SYS_UBOOT_START and cleaning up defconfigs. Sorry again for all the troubles!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191206/d6beab66/attachment.sig>
#12 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Hi Tom,

Quoted 56 lines · Tom Rini
Quoted 54 lines · Simon Goldschmidt
Quoted 24 lines · Giulio Benetti

Hello Tom, all,

Quoted 7 lines · Tom Rini
Quoted 6 lines · Simon Goldschmidt
Quoted 4 lines · Patrice CHOTARD

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

Quoted 8 lines
Quoted 3 lines

Looking at socfpga gen5 u-boot.img, this is probably broken as well.

And I don't even see any RB or TB tags here :-(

Ugh, what the heck? I applied this because I looked over the changes and they seemed correct. I'm quite willing to just revert this but I would like to know how it's breaking. Sorry all!

IMHO this is due to wrong images creation with mkinage, especially when passing parameters with -a and -e flags.

In my case I need them to be:

Review

Quoted 2 lines
(quoted diff) +0 -2
-a 0x80002000 (load address) => CONFIG_SYS_TEXT_BASE
-e 0x800023FD (entry point where SPL jumps to) => CONFIG_SYS_UBOOT_START

Well, CONFIG_SYS_UBOOT_START is only set in 15 files in include/configs, so I guess a lot more boards might be broken...

Quoted 21 lines

So *maybe* on STM32MP1 and other broken boards -e (CONFIG_SYS_UBOOT_START) is not equal to -a (CONFIG_SYS_TEXT_BASE) as was assumed before(but wrong).

Indeed CONFIG_SYS_UBOOT_START is set to 0 if not specified in u-boot/Makefile:
`
# U-Boot entry point, needed for booting of full-blown U-Boot

# from the SPL U-Boot version.
#
ifndef CONFIG_SYS_UBOOT_START
CONFIG_SYS_UBOOT_START := 0
endif
`

So probably broken boards try to jump to absolute 0. A solving patch would be:
ifndef CONFIG_SYS_UBOOT_START CONFIG_SYS_UBOOT_START := CONFIG_SYS_TEXT_BASE endif

Quoted 7 lines
Quoted 2 lines

That might work, but I wonder if this is the correct time in the release to do so.

Yes, at this point in the cycle the best option is to revert the original commit and for the next release bring it back after applying Patrice's series to fix the bogus default to CONFIG_SYS_UBOOT_START and cleaning up defconfigs. Sorry again for all the troubles!

I just wanted to confirm socfpga_gen5 doesn't boot with this patch but it's ok again now you reverted it.

Regards,
Simon

#13 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Hi All,

Quoted 62 lines · Simon Goldschmidt

Hi Tom,

Quoted 59 lines · Tom Rini
Quoted 56 lines · Simon Goldschmidt
Quoted 24 lines · Giulio Benetti

Hello Tom, all,

Quoted 7 lines · Tom Rini
Quoted 6 lines · Simon Goldschmidt
Quoted 4 lines · Patrice CHOTARD

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

Quoted 8 lines
Quoted 3 lines

Looking at socfpga gen5 u-boot.img, this is probably broken as well.

And I don't even see any RB or TB tags here :-(

Ugh, what the heck? I applied this because I looked over the changes and they seemed correct. I'm quite willing to just revert this but I would like to know how it's breaking. Sorry all!

IMHO this is due to wrong images creation with mkinage, especially when passing parameters with -a and -e flags.

In my case I need them to be:

Review

Quoted 2 lines
(quoted diff) +0 -2
-a 0x80002000 (load address) => CONFIG_SYS_TEXT_BASE
-e 0x800023FD (entry point where SPL jumps to) => CONFIG_SYS_UBOOT_START

Well, CONFIG_SYS_UBOOT_START is only set in 15 files in include/configs, so I guess a lot more boards might be broken...

Quoted 16 lines

So *maybe* on STM32MP1 and other broken boards -e (CONFIG_SYS_UBOOT_START) is not equal to -a (CONFIG_SYS_TEXT_BASE) as was assumed before(but wrong).

Indeed CONFIG_SYS_UBOOT_START is set to 0 if not specified in u-boot/Makefile:
`
# U-Boot entry point, needed for booting of full-blown U-Boot

# from the SPL U-Boot version.
#
ifndef CONFIG_SYS_UBOOT_START
CONFIG_SYS_UBOOT_START := 0
endif
`
Quoted 5 lines

So probably broken boards try to jump to absolute 0. A solving patch would be:
ifndef CONFIG_SYS_UBOOT_START CONFIG_SYS_UBOOT_START := CONFIG_SYS_TEXT_BASE endif

That might work, but I wonder if this is the correct time in the release to do so.

Quoted 7 lines
Quoted 4 lines

Yes, at this point in the cycle the best option is to revert the original commit and for the next release bring it back after applying Patrice's series to fix the bogus default to CONFIG_SYS_UBOOT_START and cleaning up defconfigs. Sorry again for all the troubles!

I just wanted to confirm socfpga_gen5 doesn't boot with this patch but it's ok again now you reverted it.

Now that patches:
https://patchwork.ozlabs.org/patch/1205064/
https://patchwork.ozlabs.org/patch/1205063/

and 2020.01 has been released, can you please commit this patch?

I've re-submitted also on patchset to Add i.MXRT family since it's needed to boot Linux:
https://patchwork.ozlabs.org/project/uboot/list/?series=152468

Kind regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
#14 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Quoted 77 lines · Giulio Benetti

Hi All,

Quoted 62 lines · Simon Goldschmidt

Hi Tom,

Quoted 59 lines · Tom Rini
Quoted 56 lines · Simon Goldschmidt
Quoted 24 lines · Giulio Benetti

Hello Tom, all,

Quoted 7 lines · Tom Rini
Quoted 6 lines · Simon Goldschmidt
Quoted 4 lines · Patrice CHOTARD

Hi

This patch is breaking the STM32MP15 basic boot (spl => u-boot).

Quoted 8 lines
Quoted 3 lines

Looking at socfpga gen5 u-boot.img, this is probably broken as well.

And I don't even see any RB or TB tags here :-(

Ugh, what the heck? I applied this because I looked over the changes and they seemed correct. I'm quite willing to just revert this but I would like to know how it's breaking. Sorry all!

IMHO this is due to wrong images creation with mkinage, especially when passing parameters with -a and -e flags.

In my case I need them to be:

Review

Quoted 2 lines
(quoted diff) +0 -2
-a 0x80002000 (load address) => CONFIG_SYS_TEXT_BASE
-e 0x800023FD (entry point where SPL jumps to) => CONFIG_SYS_UBOOT_START

Well, CONFIG_SYS_UBOOT_START is only set in 15 files in include/configs, so I guess a lot more boards might be broken...

Quoted 16 lines

So *maybe* on STM32MP1 and other broken boards -e (CONFIG_SYS_UBOOT_START) is not equal to -a (CONFIG_SYS_TEXT_BASE) as was assumed before(but wrong).

Indeed CONFIG_SYS_UBOOT_START is set to 0 if not specified in u-boot/Makefile:
`
# U-Boot entry point, needed for booting of full-blown U-Boot

# from the SPL U-Boot version.
#
ifndef CONFIG_SYS_UBOOT_START
CONFIG_SYS_UBOOT_START := 0
endif
`
Quoted 5 lines

So probably broken boards try to jump to absolute 0. A solving patch would be:
ifndef CONFIG_SYS_UBOOT_START CONFIG_SYS_UBOOT_START := CONFIG_SYS_TEXT_BASE endif

That might work, but I wonder if this is the correct time in the release to do so.

Quoted 7 lines
Quoted 4 lines

Yes, at this point in the cycle the best option is to revert the original commit and for the next release bring it back after applying Patrice's series to fix the bogus default to CONFIG_SYS_UBOOT_START and cleaning up defconfigs. Sorry again for all the troubles!

I just wanted to confirm socfpga_gen5 doesn't boot with this patch but it's ok again now you reverted it.

Now that patches:
https://patchwork.ozlabs.org/patch/1205064/
https://patchwork.ozlabs.org/patch/1205063/

Quoted 5 lines

and 2020.01 has been released, can you please commit this patch?

I've re-submitted also on patchset to Add i.MXRT family since it's needed to boot Linux:
https://patchwork.ozlabs.org/project/uboot/list/?series=152468

Yes, this is on my list of things to get back to as I clear out parts of my queue, thanks for the reminder.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/cb9536a8/attachment.sig>
#15 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

In reply to Giulio Benetti
Quoted 10 lines · Giulio Benetti

At the moment entry_point is set to image_get_load(header) that sets it to "load address" instead of "entry point", assuming entry_point is equal to load_addr, but it's not true. Then load_addr is set to "entry_point - header_size", but this is wrong too since load_addr is not an entry point.

So use image_get_ep() for entry_point assignment and image_get_load() for load_addr assignment.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200116/c5b088d8/attachment.sig>
#16 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Hi Tom,

+Stefano B.

Quoted 8 lines · Tom Rini
Quoted 6 lines · Giulio Benetti

At the moment entry_point is set to image_get_load(header) that sets it to "load address" instead of "entry point", assuming entry_point is equal to load_addr, but it's not true. Then load_addr is set to "entry_point - header_size", but this is wrong too since load_addr is not an entry point.

Quoted 6 lines
Quoted 4 lines

So use image_get_ep() for entry_point assignment and image_get_load() for load_addr assignment.

Applied to u-boot/master, thanks!

It's been already committed by Stefano Babic in imx and you've pulled from him.

Sorry that I've submitted it twice!

Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
#17 lore raw

PATCH 1/1 spl: fix entry_point equal to load_addr

Quoted 16 lines · Giulio Benetti

Hi Tom,

+Stefano B.

Quoted 11 lines · Tom Rini
Quoted 9 lines · Giulio Benetti

At the moment entry_point is set to image_get_load(header) that sets it to "load address" instead of "entry point", assuming entry_point is equal to load_addr, but it's not true. Then load_addr is set to "entry_point - header_size", but this is wrong too since load_addr is not an entry point.

So use image_get_ep() for entry_point assignment and image_get_load() for load_addr assignment.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Applied to u-boot/master, thanks!

It's been already committed by Stefano Babic in imx and you've pulled from him.

Sorry that I've submitted it twice!

Ah, I missed git saying there was nothing to do while applying that part of the mbox. No worries.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200116/39f65bf7/attachment.sig>