Skip to contentSkip to conversation

SPARC: fixes exported function stub for standalone applications.

PATCH New Daniel Hellstrom 2 participants 3 messages Sep 18, 2009 – Sep 23, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SPARC: fixes exported function stub for standalone applications.

Hello Wolfgang,

Please pull the u-boot-sparc.git master branch.

This patch fixes the SPARC support for standalone u-boot applications. The problem was that I neve finished the implementation in the first place.

jmp ensures we get back to the location we came from, size(void *) make sure we get the function addresses correctly from the table (entry*4 instead of entry*1).

-------------------- SPARC/LEON3 -------------------- => tftpboot 0x41000000 192.168.0.47:hello_world.bin Using GRETH 10/100 device
TFTP from server 192.168.0.47; our IP address is 192.168.0.206 Filename 'hello_world.bin'.
Load address: 0x41000000
Loading: #
done
Bytes transferred = 1232 (4d0 hex)
=> go 41000008 hej
## Starting application at 0x41000008 ...
Example expects ABI version 5
Actual U-Boot ABI version 5
Hello World
argc = 2
argv[0] = "41000008"
argv[1] = "hej"
argv[2] = "<NULL>"
Hit any key to exit ...

## Application terminated, rc = 0x0
=>
-----------------------------------------------------

Best Regards,
Daniel Hellstrom

---
 examples/standalone/stubs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
examples/standalone/stubs.c +2 -2
index 339bbf9..ce3371d 100644
@@ -181,9 +181,9 @@ gd_t *global_data;
 "	or %%g1, %%g7, %%g1\n"				\
 "	ld [%%g1], %%g1\n"				\
 "	ld [%%g1 + %1], %%g1\n"				\
-"	call %%g1\n"					\
+"	jmp %%g1\n"					\
 "	nop\n"						\
-	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x) : "g1" );
+	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "g1" );
 
 #else
 #error stubs definition missing for this architecture
Signature · 1 line
1.5.4
#1 lore raw

PATCH 1/1 SPARC: fixes exported function stub for standalone applications.

Dear Daniel Hellstrom,

Quoted 11 lines · In message <[email protected]> you wrote:

Hello Wolfgang,

Please pull the u-boot-sparc.git master branch.

This patch fixes the SPARC support for standalone u-boot applications. The problem was that I neve finished the implementation in the first place.

jmp ensures we get back to the location we came from, size(void *) make sure we get the function addresses correctly from the table (entry*4 instead of entry*1).

Um...
...

Quoted 11 lines
---
 examples/standalone/stubs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
examples/standalone/stubs.c +0 -0
index 339bbf9..ce3371d 100644

examples/standalone/stubs.c gd_t *global_data; · line 186

Quoted 8 lines
examples/standalone/stubs.c +2 -2
@@ -181,9 +181,9 @@ gd_t *global_data;
 "	or %%g1, %%g7, %%g1\n"				\
 "	ld [%%g1], %%g1\n"				\
 "	ld [%%g1 + %1], %%g1\n"				\
-"	call %%g1\n"					\
+"	jmp %%g1\n"					\
 "	nop\n"						\
-	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x) : "g1" );
+	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "g1" );

This looks 100% like the patch submitted by Sergey Mironov on 16 Sep, yet I see no Signed-off-by: line from him, nor any credit or reference.

This can't be right?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"He was so narrow minded he could see through  a  keyhole  with  both
eyes ..."
#2 lore raw

PATCH 1/1 SPARC: fixes exported function stub for standalone applications.

Quoted 48 lines · Wolfgang Denk

Dear Daniel Hellstrom,

Quoted 4 lines · In message <[email protected]> you wrote:

Hello Wolfgang,

Please pull the u-boot-sparc.git master branch.

Quoted 9 lines

This patch fixes the SPARC support for standalone u-boot applications. The problem was that I neve finished the implementation in the first place.

jmp ensures we get back to the location we came from, size(void *) make sure we get the function addresses correctly from the table (entry*4 instead of entry*1).

Um...
...

Quoted 10 lines

---
examples/standalone/stubs.c | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
examples/standalone/stubs.c +0 -0
index 339bbf9..ce3371d 100644

examples/standalone/stubs.c gd_t *global_data; · line 188

Quoted 10 lines
examples/standalone/stubs.c +2 -2
@@ -181,9 +181,9 @@ gd_t *global_data;
 "	or %%g1, %%g7, %%g1\n"				\
 "	ld [%%g1], %%g1\n"				\
 "	ld [%%g1 + %1], %%g1\n"				\
-"	call %%g1\n"					\
+"	jmp %%g1\n"					\
 "	nop\n"						\
-	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x) : "g1" );
+	: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "g1" );
 
 

This looks 100% like the patch submitted by Sergey Mironov on 16 Sep, yet I see no Signed-off-by: line from him, nor any credit or reference.

Quoted 3 lines

This can't be right?

Hello Wolfgang,

It is 100% his patch, I have only reviewed and tried it.

I admit it looks disgusting.

I will ask Sergey for a new patch with a signoff line, I will let you know when the repository is updated. I suppose I will use the "git am --signoff --whitespace=strip" you have written about on the git help page.

How do you deal with cyrillic in the sign-off line?

Best Regards,
Daniel Hellstrom