All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] spl: ram: Fix u_boot_pos calculation
@ 2018-10-04  7:29 Michal Simek
  2018-10-06 15:29 ` Simon Goldschmidt
  2018-10-07  0:29 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Michal Simek @ 2018-10-04  7:29 UTC (permalink / raw)
  To: u-boot

The patch:
"spl: Weed out CONFIG_SYS_TEXT_BASE usage"
(sha1: 04ce5427bd3914cab8be78513275a20ab878520a)
introduced bug where assigning to u_boot_pos variable wasn't done
which end up in situation where SPL wasn't able to find out
image on the selected address.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Lines are unfortunatelly longer then 80 char limits but
there is no nice way how to fix it.

---
 common/spl/spl_ram.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index 619b39a53748..5fcc3b1504bb 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -63,9 +63,8 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
 			 * No binman support or no information. For now, fix it
 			 * to the address pointed to by U-Boot.
 			 */
-			header = spl_get_load_buffer(-sizeof(*header),
-						     sizeof(*header));
-
+			u_boot_pos = (ulong)spl_get_load_buffer(-sizeof(*header),
+								sizeof(*header));
 		}
 		header = (struct image_header *)map_sysmem(u_boot_pos, 0);
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] spl: ram: Fix u_boot_pos calculation
  2018-10-04  7:29 [U-Boot] [PATCH] spl: ram: Fix u_boot_pos calculation Michal Simek
@ 2018-10-06 15:29 ` Simon Goldschmidt
  2018-10-06 19:59   ` Simon Goldschmidt
  2018-10-07  0:29 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Simon Goldschmidt @ 2018-10-06 15:29 UTC (permalink / raw)
  To: u-boot

On 04.10.2018 09:29, Michal Simek wrote:
> The patch:
> "spl: Weed out CONFIG_SYS_TEXT_BASE usage"
> (sha1: 04ce5427bd3914cab8be78513275a20ab878520a)
> introduced bug where assigning to u_boot_pos variable wasn't done
> which end up in situation where SPL wasn't able to find out
> image on the selected address.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

I needed to apply this to boot my socfpga cyclone5 from FPGA (both SPL 
and U-Boot in FPGA onchip RAM).

Tested-by: Simon Goldschmidt <simon.k.r.goldschmid@gmail.com>

> ---
>
> Lines are unfortunatelly longer then 80 char limits but
> there is no nice way how to fix it.
>
> ---
>   common/spl/spl_ram.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
> index 619b39a53748..5fcc3b1504bb 100644
> --- a/common/spl/spl_ram.c
> +++ b/common/spl/spl_ram.c
> @@ -63,9 +63,8 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
>   			 * No binman support or no information. For now, fix it
>   			 * to the address pointed to by U-Boot.
>   			 */
> -			header = spl_get_load_buffer(-sizeof(*header),
> -						     sizeof(*header));
> -
> +			u_boot_pos = (ulong)spl_get_load_buffer(-sizeof(*header),
> +								sizeof(*header));
>   		}
>   		header = (struct image_header *)map_sysmem(u_boot_pos, 0);
>   

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] spl: ram: Fix u_boot_pos calculation
  2018-10-06 15:29 ` Simon Goldschmidt
@ 2018-10-06 19:59   ` Simon Goldschmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Goldschmidt @ 2018-10-06 19:59 UTC (permalink / raw)
  To: u-boot

On 06.10.2018 17:29, Simon Goldschmidt wrote:
> On 04.10.2018 09:29, Michal Simek wrote:
>> The patch:
>> "spl: Weed out CONFIG_SYS_TEXT_BASE usage"
>> (sha1: 04ce5427bd3914cab8be78513275a20ab878520a)
>> introduced bug where assigning to u_boot_pos variable wasn't done
>> which end up in situation where SPL wasn't able to find out
>> image on the selected address.
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> I needed to apply this to boot my socfpga cyclone5 from FPGA (both SPL
> and U-Boot in FPGA onchip RAM).
>
> Tested-by: Simon Goldschmidt <simon.k.r.goldschmid@gmail.com>

There's a typo in my mail address :-(
Here's the correct tag:

Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>


>
>> ---
>>
>> Lines are unfortunatelly longer then 80 char limits but
>> there is no nice way how to fix it.
>>
>> ---
>>    common/spl/spl_ram.c | 5 ++---
>>    1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
>> index 619b39a53748..5fcc3b1504bb 100644
>> --- a/common/spl/spl_ram.c
>> +++ b/common/spl/spl_ram.c
>> @@ -63,9 +63,8 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
>>    			 * No binman support or no information. For now, fix it
>>    			 * to the address pointed to by U-Boot.
>>    			 */
>> -			header = spl_get_load_buffer(-sizeof(*header),
>> -						     sizeof(*header));
>> -
>> +			u_boot_pos = (ulong)spl_get_load_buffer(-sizeof(*header),
>> +								sizeof(*header));
>>    		}
>>    		header = (struct image_header *)map_sysmem(u_boot_pos, 0);
>>    
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] spl: ram: Fix u_boot_pos calculation
  2018-10-04  7:29 [U-Boot] [PATCH] spl: ram: Fix u_boot_pos calculation Michal Simek
  2018-10-06 15:29 ` Simon Goldschmidt
@ 2018-10-07  0:29 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2018-10-07  0:29 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 04, 2018 at 09:29:20AM +0200, Michal Simek wrote:

> The patch:
> "spl: Weed out CONFIG_SYS_TEXT_BASE usage"
> (sha1: 04ce5427bd3914cab8be78513275a20ab878520a)
> introduced bug where assigning to u_boot_pos variable wasn't done
> which end up in situation where SPL wasn't able to find out
> image on the selected address.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181006/615a0d24/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-07  0:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04  7:29 [U-Boot] [PATCH] spl: ram: Fix u_boot_pos calculation Michal Simek
2018-10-06 15:29 ` Simon Goldschmidt
2018-10-06 19:59   ` Simon Goldschmidt
2018-10-07  0:29 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.