All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 0/3] Remove unused _relocate arguments
@ 2018-06-27 15:41 Ivan Gorinov
  2018-06-27 15:41 ` [U-Boot] [PATCH v3 1/3] x86: " Ivan Gorinov
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Ivan Gorinov @ 2018-06-27 15:41 UTC (permalink / raw
  To: u-boot

EFI image handle and system table are not used in _relocate().

v3:
  Rebased on u-boot/master

v2:
  Separated the changes in efi_main() arguments and calling convention.

Ivan Gorinov (3):
  x86: Remove unused _relocate arguments
  arm: Remove unused _relocate arguments
  riscv: Remove unused _relocate arguments

 arch/arm/lib/crt0_aarch64_efi.S  | 2 --
 arch/arm/lib/crt0_arm_efi.S      | 2 --
 arch/arm/lib/reloc_aarch64_efi.c | 3 +--
 arch/arm/lib/reloc_arm_efi.c     | 3 +--
 arch/riscv/lib/reloc_riscv_efi.c | 3 +--
 arch/x86/lib/crt0_x86_64_efi.S   | 3 ---
 arch/x86/lib/reloc_ia32_efi.c    | 3 +--
 arch/x86/lib/reloc_x86_64_efi.c  | 3 +--
 8 files changed, 5 insertions(+), 17 deletions(-)

-- 
2.7.4

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

* [U-Boot] [PATCH v3 1/3] x86: Remove unused _relocate arguments
  2018-06-27 15:41 [U-Boot] [PATCH v3 0/3] Remove unused _relocate arguments Ivan Gorinov
@ 2018-06-27 15:41 ` Ivan Gorinov
  2018-06-27 15:41 ` [U-Boot] [PATCH v3 2/3] arm: " Ivan Gorinov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Ivan Gorinov @ 2018-06-27 15:41 UTC (permalink / raw
  To: u-boot

EFI image handle and system table are not used in _relocate().

Signed-off-by: Ivan Gorinov <ivan.gorinov@intel.com>
---
 arch/x86/lib/crt0_x86_64_efi.S  | 3 ---
 arch/x86/lib/reloc_ia32_efi.c   | 3 +--
 arch/x86/lib/reloc_x86_64_efi.c | 3 +--
 3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/x86/lib/crt0_x86_64_efi.S b/arch/x86/lib/crt0_x86_64_efi.S
index bb8d3cf..47ed5af 100644
--- a/arch/x86/lib/crt0_x86_64_efi.S
+++ b/arch/x86/lib/crt0_x86_64_efi.S
@@ -18,9 +18,6 @@ _start:
 	pushq %rcx
 	pushq %rdx
 
-	mov %rcx, %r8
-	mov %rdx, %r9
-
 	lea image_base(%rip), %rcx
 	lea _DYNAMIC(%rip), %rdx
 
diff --git a/arch/x86/lib/reloc_ia32_efi.c b/arch/x86/lib/reloc_ia32_efi.c
index e838af3..a262533 100644
--- a/arch/x86/lib/reloc_ia32_efi.c
+++ b/arch/x86/lib/reloc_ia32_efi.c
@@ -12,8 +12,7 @@
 #include <elf.h>
 #include <asm/elf.h>
 
-efi_status_t _relocate(long ldbase, Elf32_Dyn *dyn, efi_handle_t image,
-		       struct efi_system_table *systab)
+efi_status_t EFIAPI _relocate(long ldbase, Elf32_Dyn *dyn)
 {
 	long relsz = 0, relent = 0;
 	Elf32_Rel *rel = 0;
diff --git a/arch/x86/lib/reloc_x86_64_efi.c b/arch/x86/lib/reloc_x86_64_efi.c
index 34c5b2e..59d6f8d 100644
--- a/arch/x86/lib/reloc_x86_64_efi.c
+++ b/arch/x86/lib/reloc_x86_64_efi.c
@@ -14,8 +14,7 @@
 #include <elf.h>
 #include <asm/elf.h>
 
-efi_status_t _relocate(long ldbase, Elf64_Dyn *dyn, efi_handle_t image,
-		       struct efi_system_table *systab)
+efi_status_t EFIAPI _relocate(long ldbase, Elf64_Dyn *dyn)
 {
 	long relsz = 0, relent = 0;
 	Elf64_Rel *rel = 0;
-- 
2.7.4

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

* [U-Boot] [PATCH v3 2/3] arm: Remove unused _relocate arguments
  2018-06-27 15:41 [U-Boot] [PATCH v3 0/3] Remove unused _relocate arguments Ivan Gorinov
  2018-06-27 15:41 ` [U-Boot] [PATCH v3 1/3] x86: " Ivan Gorinov
@ 2018-06-27 15:41 ` Ivan Gorinov
  2018-06-27 15:42 ` [U-Boot] [PATCH v3 3/3] riscv: " Ivan Gorinov
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Ivan Gorinov @ 2018-06-27 15:41 UTC (permalink / raw
  To: u-boot

EFI image handle and system table are not used in _relocate().

Signed-off-by: Ivan Gorinov <ivan.gorinov@intel.com>
---
 arch/arm/lib/crt0_aarch64_efi.S  | 2 --
 arch/arm/lib/crt0_arm_efi.S      | 2 --
 arch/arm/lib/reloc_aarch64_efi.c | 3 +--
 arch/arm/lib/reloc_arm_efi.c     | 3 +--
 4 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/arm/lib/crt0_aarch64_efi.S b/arch/arm/lib/crt0_aarch64_efi.S
index 5b6c384..0db4360 100644
--- a/arch/arm/lib/crt0_aarch64_efi.S
+++ b/arch/arm/lib/crt0_aarch64_efi.S
@@ -122,8 +122,6 @@ _start:
 	mov		x29, sp
 
 	stp		x0, x1, [sp, #16]
-	mov		x2, x0
-	mov		x3, x1
 	adr		x0, ImageBase
 	adrp		x1, _DYNAMIC
 	add		x1, x1, #:lo12:_DYNAMIC
diff --git a/arch/arm/lib/crt0_arm_efi.S b/arch/arm/lib/crt0_arm_efi.S
index 0f296f3..23db49f 100644
--- a/arch/arm/lib/crt0_arm_efi.S
+++ b/arch/arm/lib/crt0_arm_efi.S
@@ -119,8 +119,6 @@ section_table:
 _start:
 	stmfd		sp!, {r0-r2, lr}
 
-	mov		r2, r0
-	mov		r3, r1
 	adr		r1, .L_DYNAMIC
 	ldr		r0, [r1]
 	add		r1, r0, r1
diff --git a/arch/arm/lib/reloc_aarch64_efi.c b/arch/arm/lib/reloc_aarch64_efi.c
index 38c13d3..1cf5cdc 100644
--- a/arch/arm/lib/reloc_aarch64_efi.c
+++ b/arch/arm/lib/reloc_aarch64_efi.c
@@ -38,8 +38,7 @@
 
 #include <elf.h>
 
-efi_status_t _relocate(long ldbase, Elf64_Dyn *dyn, efi_handle_t image,
-		       struct efi_system_table *systab)
+efi_status_t _relocate(long ldbase, Elf64_Dyn *dyn)
 {
 	long relsz = 0, relent = 0;
 	Elf64_Rela *rel = 0;
diff --git a/arch/arm/lib/reloc_arm_efi.c b/arch/arm/lib/reloc_arm_efi.c
index 6232e3f..336a98a 100644
--- a/arch/arm/lib/reloc_arm_efi.c
+++ b/arch/arm/lib/reloc_arm_efi.c
@@ -14,8 +14,7 @@
 #include <efi.h>
 #include <elf.h>
 
-efi_status_t _relocate(long ldbase, Elf32_Dyn *dyn, efi_handle_t image,
-		       struct efi_system_table *systab)
+efi_status_t _relocate(long ldbase, Elf32_Dyn *dyn)
 {
 	long relsz = 0, relent = 0;
 	Elf32_Rel *rel = 0;
-- 
2.7.4

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

* [U-Boot] [PATCH v3 3/3] riscv: Remove unused _relocate arguments
  2018-06-27 15:41 [U-Boot] [PATCH v3 0/3] Remove unused _relocate arguments Ivan Gorinov
  2018-06-27 15:41 ` [U-Boot] [PATCH v3 1/3] x86: " Ivan Gorinov
  2018-06-27 15:41 ` [U-Boot] [PATCH v3 2/3] arm: " Ivan Gorinov
@ 2018-06-27 15:42 ` Ivan Gorinov
  2018-06-27 15:57 ` [U-Boot] [PATCH v3 0/3] " Andy Shevchenko
  2018-06-28  7:57 ` Bin Meng
  4 siblings, 0 replies; 7+ messages in thread
From: Ivan Gorinov @ 2018-06-27 15:42 UTC (permalink / raw
  To: u-boot

EFI image handle and system table are not used in _relocate().

Signed-off-by: Ivan Gorinov <ivan.gorinov@intel.com>
---
 arch/riscv/lib/reloc_riscv_efi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/riscv/lib/reloc_riscv_efi.c b/arch/riscv/lib/reloc_riscv_efi.c
index 8b4b2b1..2fbbfcb 100644
--- a/arch/riscv/lib/reloc_riscv_efi.c
+++ b/arch/riscv/lib/reloc_riscv_efi.c
@@ -50,8 +50,7 @@
 #define ELF_R_TYPE	ELF32_R_TYPE
 #endif
 
-efi_status_t _relocate(long ldbase, Elf_Dyn *dyn, efi_handle_t image,
-		       struct efi_system_table *systab)
+efi_status_t _relocate(long ldbase, Elf_Dyn *dyn)
 {
 	long relsz = 0, relent = 0;
 	Elf_Rela *rel = 0;
-- 
2.7.4

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

* [U-Boot] [PATCH v3 0/3] Remove unused _relocate arguments
  2018-06-27 15:41 [U-Boot] [PATCH v3 0/3] Remove unused _relocate arguments Ivan Gorinov
                   ` (2 preceding siblings ...)
  2018-06-27 15:42 ` [U-Boot] [PATCH v3 3/3] riscv: " Ivan Gorinov
@ 2018-06-27 15:57 ` Andy Shevchenko
  2018-06-28  7:57 ` Bin Meng
  4 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2018-06-27 15:57 UTC (permalink / raw
  To: u-boot

On Wed, 2018-06-27 at 08:41 -0700, Ivan Gorinov wrote:
> EFI image handle and system table are not used in _relocate().
> 

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>


> v3:
>   Rebased on u-boot/master
> 
> v2:
>   Separated the changes in efi_main() arguments and calling
> convention.
> 
> Ivan Gorinov (3):
>   x86: Remove unused _relocate arguments
>   arm: Remove unused _relocate arguments
>   riscv: Remove unused _relocate arguments
> 
>  arch/arm/lib/crt0_aarch64_efi.S  | 2 --
>  arch/arm/lib/crt0_arm_efi.S      | 2 --
>  arch/arm/lib/reloc_aarch64_efi.c | 3 +--
>  arch/arm/lib/reloc_arm_efi.c     | 3 +--
>  arch/riscv/lib/reloc_riscv_efi.c | 3 +--
>  arch/x86/lib/crt0_x86_64_efi.S   | 3 ---
>  arch/x86/lib/reloc_ia32_efi.c    | 3 +--
>  arch/x86/lib/reloc_x86_64_efi.c  | 3 +--
>  8 files changed, 5 insertions(+), 17 deletions(-)
> 

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* [U-Boot] [PATCH v3 0/3] Remove unused _relocate arguments
  2018-06-27 15:41 [U-Boot] [PATCH v3 0/3] Remove unused _relocate arguments Ivan Gorinov
                   ` (3 preceding siblings ...)
  2018-06-27 15:57 ` [U-Boot] [PATCH v3 0/3] " Andy Shevchenko
@ 2018-06-28  7:57 ` Bin Meng
  2018-06-28 21:27   ` Ivan Gorinov
  4 siblings, 1 reply; 7+ messages in thread
From: Bin Meng @ 2018-06-28  7:57 UTC (permalink / raw
  To: u-boot

Hi Ivan,

On Wed, Jun 27, 2018 at 11:41 PM, Ivan Gorinov <ivan.gorinov@intel.com> wrote:
> EFI image handle and system table are not used in _relocate().
>
> v3:
>   Rebased on u-boot/master
>
> v2:
>   Separated the changes in efi_main() arguments and calling convention.
>
> Ivan Gorinov (3):
>   x86: Remove unused _relocate arguments

I don't understand the v3 patch now.

In previous v1/v2 patch, you did not change x86's _relocate() to
declare EFIAPI, but in v3, you suddenly added EFIAPI to the x86
version but without adding EFIAPI to arm and risv, why?

>   arm: Remove unused _relocate arguments
>   riscv: Remove unused _relocate arguments
>
>  arch/arm/lib/crt0_aarch64_efi.S  | 2 --
>  arch/arm/lib/crt0_arm_efi.S      | 2 --
>  arch/arm/lib/reloc_aarch64_efi.c | 3 +--
>  arch/arm/lib/reloc_arm_efi.c     | 3 +--
>  arch/riscv/lib/reloc_riscv_efi.c | 3 +--
>  arch/x86/lib/crt0_x86_64_efi.S   | 3 ---
>  arch/x86/lib/reloc_ia32_efi.c    | 3 +--
>  arch/x86/lib/reloc_x86_64_efi.c  | 3 +--
>  8 files changed, 5 insertions(+), 17 deletions(-)
>

Regards,
Bin

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

* [U-Boot] [PATCH v3 0/3] Remove unused _relocate arguments
  2018-06-28  7:57 ` Bin Meng
@ 2018-06-28 21:27   ` Ivan Gorinov
  0 siblings, 0 replies; 7+ messages in thread
From: Ivan Gorinov @ 2018-06-28 21:27 UTC (permalink / raw
  To: u-boot

On Thu, Jun 28, 2018 at 03:57:24PM +0800, Bin Meng wrote:
> Hi Ivan,
> 
> On Wed, Jun 27, 2018 at 11:41 PM, Ivan Gorinov <ivan.gorinov@intel.com> wrote:
> > EFI image handle and system table are not used in _relocate().
> >
> > v3:
> >   Rebased on u-boot/master
> >
> > v2:
> >   Separated the changes in efi_main() arguments and calling convention.
> >
> > Ivan Gorinov (3):
> >   x86: Remove unused _relocate arguments
> 
> I don't understand the v3 patch now.
> 
> In previous v1/v2 patch, you did not change x86's _relocate() to
> declare EFIAPI, but in v3, you suddenly added EFIAPI to the x86
> version but without adding EFIAPI to arm and risv, why?

Keeping default calling convention in v2 was a mistake because the
x86_64 startup code passes _relocate() arguments using EFI convention.

I will submit another version that consistently uses EFIAPI in _relocate().

> 
> >   arm: Remove unused _relocate arguments
> >   riscv: Remove unused _relocate arguments
> >
> >  arch/arm/lib/crt0_aarch64_efi.S  | 2 --
> >  arch/arm/lib/crt0_arm_efi.S      | 2 --
> >  arch/arm/lib/reloc_aarch64_efi.c | 3 +--
> >  arch/arm/lib/reloc_arm_efi.c     | 3 +--
> >  arch/riscv/lib/reloc_riscv_efi.c | 3 +--
> >  arch/x86/lib/crt0_x86_64_efi.S   | 3 ---
> >  arch/x86/lib/reloc_ia32_efi.c    | 3 +--
> >  arch/x86/lib/reloc_x86_64_efi.c  | 3 +--
> >  8 files changed, 5 insertions(+), 17 deletions(-)
> >
> 
> Regards,
> Bin

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

end of thread, other threads:[~2018-06-28 21:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-27 15:41 [U-Boot] [PATCH v3 0/3] Remove unused _relocate arguments Ivan Gorinov
2018-06-27 15:41 ` [U-Boot] [PATCH v3 1/3] x86: " Ivan Gorinov
2018-06-27 15:41 ` [U-Boot] [PATCH v3 2/3] arm: " Ivan Gorinov
2018-06-27 15:42 ` [U-Boot] [PATCH v3 3/3] riscv: " Ivan Gorinov
2018-06-27 15:57 ` [U-Boot] [PATCH v3 0/3] " Andy Shevchenko
2018-06-28  7:57 ` Bin Meng
2018-06-28 21:27   ` Ivan Gorinov

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.