Skip to contentSkip to conversation

ARM: socfpga: boot0 hook: remove macro from boot0 header file

PATCH New tien.fong.chee at intel.com 3 participants 6 messages Mar 29, 2017 – Apr 4, 2017 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: socfpga: boot0 hook: remove macro from boot0 header file

From: "Chee, Tien Fong" <[email protected]>

Commit ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole header file") miss out cleaning macro in this header file, and this has broken implementation of a boot header capability in socfpga SPL. Remove the macro in this file, and recovering it back to proper functioning.

Fixes ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole

header file")

---
 arch/arm/mach-socfpga/include/mach/boot0.h | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)
arch/arm/mach-socfpga/include/mach/boot0.h +10 -14
index aaada31..22d9e7f 100644
@@ -8,21 +8,17 @@
 #define __BOOT0_H
 
 #ifdef CONFIG_SPL_BUILD
-#define ARM_SOC_BOOT0_HOOK						\
-	.balignl 64,0xf33db33f;						\
-									\
-	.word	0x1337c0d3;	/* SoCFPGA preloader validation word */	\
-	.word	0xc01df00d;	/* Version, flags, length */		\
-	.word	0xcafec0d3;	/* Checksum, zero-pad */		\
-	nop;								\
-									\
-	b reset;		/* SoCFPGA jumps here */		\
-	nop;								\
-	nop;								\
+	.balignl 64,0xf33db33f;
+
+	.word	0x1337c0d3;	/* SoCFPGA preloader validation word */
+	.word	0xc01df00d;	/* Version, flags, length */
+	.word	0xcafec0d3;	/* Checksum, zero-pad */
 	nop;
-#else
-#define ARM_SOC_BOOT0_HOOK
-#endif
 
+	b reset;		/* SoCFPGA jumps here */
+	nop;
+	nop;
+	nop;
+#endif
 
 #endif /* __BOOT0_H */
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 ARM: socfpga: boot0 hook: remove macro from boot0 header file

Quoted 8 lines · tien.fong.chee at intel.com

From: "Chee, Tien Fong" <[email protected]>

Commit ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole header file") miss out cleaning macro in this header file, and this has broken implementation of a boot header capability in socfpga SPL. Remove the macro in this file, and recovering it back to proper functioning.

Quoted 4 lines
Fixes ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole

header file")

Patch looks good, minor nit below.

Quoted 27 lines
---
 arch/arm/mach-socfpga/include/mach/boot0.h | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)
arch/arm/mach-socfpga/include/mach/boot0.h +4 -11
index aaada31..22d9e7f 100644
@@ -8,21 +8,17 @@
 #define __BOOT0_H
 
 #ifdef CONFIG_SPL_BUILD
-#define ARM_SOC_BOOT0_HOOK						\
-	.balignl 64,0xf33db33f;						\
-									\
-	.word	0x1337c0d3;	/* SoCFPGA preloader validation word */	\
-	.word	0xc01df00d;	/* Version, flags, length */		\
-	.word	0xcafec0d3;	/* Checksum, zero-pad */		\
-	nop;								\
-									\
-	b reset;		/* SoCFPGA jumps here */		\
-	nop;								\
-	nop;								\
+	.balignl 64,0xf33db33f;
+
+	.word	0x1337c0d3;	/* SoCFPGA preloader validation word */
+	.word	0xc01df00d;	/* Version, flags, length */

arch/arm/mach-socfpga/include/mach/boot0.h line 21

Quoted 10 lines
arch/arm/mach-socfpga/include/mach/boot0.h +5 -3
+	.word	0xcafec0d3;	/* Checksum, zero-pad */
 	nop;
-#else
-#define ARM_SOC_BOOT0_HOOK
-#endif
 
+	b reset;		/* SoCFPGA jumps here */
+	nop;
+	nop;
+	nop;

Correct me if I'm wrong, but did you add one more "nop" here ?

Quoted 4 lines
arch/arm/mach-socfpga/include/mach/boot0.h +1 -0
+#endif
 
 #endif /* __BOOT0_H */
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

PATCH 1/1 ARM: socfpga: boot0 hook: remove macro from boot0 header file

Quoted 51 lines · Marek Vasut
Quoted 8 lines · tien.fong.chee at intel.com

From: "Chee, Tien Fong" <[email protected]>

Commit ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole header file") miss out cleaning macro in this header file, and this has broken implementation of a boot header capability in socfpga SPL. Remove the macro in this file, and recovering it back to proper functioning.

Quoted 4 lines
Fixes ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole

header file")

Patch looks good, minor nit below.

Quoted 2 lines
---
 arch/arm/mach-socfpga/include/mach/boot0.h | 24

++++++++++--------------

Review

Quoted 3 lines
 1 file changed, 10 insertions(+), 14 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-socfpga/include/mach/boot0.h

Quoted 28 lines

index aaada31..22d9e7f 100644

arch/arm/mach-socfpga/include/mach/boot0.h +5 -14
@@ -8,21 +8,17 @@
 #define __BOOT0_H
 
 #ifdef CONFIG_SPL_BUILD
-#define ARM_SOC_BOOT0_HOOK                                           \
-     .balignl 64,0xf33db33f;                                         \
-                                                                     \
-     .word   0x1337c0d3;     /* SoCFPGA preloader validation word */ \
-     .word   0xc01df00d;     /* Version, flags, length */            \
-     .word   0xcafec0d3;     /* Checksum, zero-pad */                \
-     nop;                                                            \
-                                                                     \
-     b reset;                /* SoCFPGA jumps here */                \
-     nop;                                                            \
-     nop;                                                            \
+     .balignl 64,0xf33db33f;
+
+     .word   0x1337c0d3;     /* SoCFPGA preloader validation word */
+     .word   0xc01df00d;     /* Version, flags, length */
+     .word   0xcafec0d3;     /* Checksum, zero-pad */
      nop;
-#else
-#define ARM_SOC_BOOT0_HOOK
-#endif
 
Quoted 8 lines

arch/arm/mach-socfpga/include/mach/boot0.h line 21

Quoted 4 lines
arch/arm/mach-socfpga/include/mach/boot0.h +4 -0
+     b reset;                /* SoCFPGA jumps here */
+     nop;
+     nop;
+     nop;

Correct me if I'm wrong, but did you add one more "nop" here ?

no, i din't add extra "nop" here. There are 3 "nop" from original code

after "b reset".

Quoted 10 lines

arch/arm/mach-socfpga/include/mach/boot0.h line 24

Quoted 4 lines
arch/arm/mach-socfpga/include/mach/boot0.h +1 -0
+#endif
 
 #endif /* __BOOT0_H */

--
Best regards,
Marek Vasut

#3 lore raw

PATCH 1/1 ARM: socfpga: boot0 hook: remove macro from boot0 header file

Quoted 60 lines · chee skywind
Quoted 58 lines · Marek Vasut
Quoted 8 lines · tien.fong.chee at intel.com

From: "Chee, Tien Fong" <[email protected]>

Commit ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole header file") miss out cleaning macro in this header file, and this has broken implementation of a boot header capability in socfpga SPL. Remove the macro in this file, and recovering it back to proper functioning.

Quoted 4 lines
Fixes ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole

header file")

Patch looks good, minor nit below.

Quoted 2 lines
---
 arch/arm/mach-socfpga/include/mach/boot0.h | 24

++++++++++--------------

Review

Quoted 3 lines
 1 file changed, 10 insertions(+), 14 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-socfpga/include/mach/boot0.h

Quoted 22 lines

index aaada31..22d9e7f 100644

arch/arm/mach-socfpga/include/mach/boot0.h +4 -11
@@ -8,21 +8,17 @@
 #define __BOOT0_H
 
 #ifdef CONFIG_SPL_BUILD
-#define ARM_SOC_BOOT0_HOOK                                           \
-     .balignl 64,0xf33db33f;                                         \
-                                                                     \
-     .word   0x1337c0d3;     /* SoCFPGA preloader validation word */ \
-     .word   0xc01df00d;     /* Version, flags, length */            \
-     .word   0xcafec0d3;     /* Checksum, zero-pad */                \
-     nop;                                                            \
-                                                                     \
-     b reset;                /* SoCFPGA jumps here */                \
-     nop;                                                            \
-     nop;                                                            \
+     .balignl 64,0xf33db33f;
+
+     .word   0x1337c0d3;     /* SoCFPGA preloader validation word */
+     .word   0xc01df00d;     /* Version, flags, length */

arch/arm/mach-socfpga/include/mach/boot0.h line 21

Quoted 10 lines
arch/arm/mach-socfpga/include/mach/boot0.h +5 -3
+     .word   0xcafec0d3;     /* Checksum, zero-pad */
      nop;
-#else
-#define ARM_SOC_BOOT0_HOOK
-#endif
 
+     b reset;                /* SoCFPGA jumps here */
+     nop;
+     nop;
+     nop;

Correct me if I'm wrong, but did you add one more "nop" here ?

Quoted 2 lines
Quoted 1 line

no, i din't add extra "nop" here. There are 3 "nop" from original code

after "b reset".

Ah sorry, I see, it's just the patch being generated in a funny way. Thanks for double-checking.

Signature · 2 lines
Best regards,
Marek Vasut

A message that is not in the archive (sent off-list or not yet received): CAJ2hV_qUGm+kg9peTdPE2ew=fnFwpERrd_N3CsLcrU1cZTSx9A@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): CAJ2hV_pkX=DeD3z6ymnYw5DNp-qPSzwHBvNa66ff3D=Qmh+y9Q@mail.gmail.com

#6 lore raw

PATCH 1/1 ARM: socfpga: boot0 hook: remove macro from boot0 header file

On Mar 31, 2017 7:13 PM, "Marek Vasut" <[email protected]> wrote:

Quoted 60 lines · chee skywind
Quoted 58 lines · Marek Vasut
Quoted 8 lines · tien.fong.chee at intel.com

From: "Chee, Tien Fong" <[email protected]>

Commit ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole header file") miss out cleaning macro in this header file, and this has broken implementation of a boot header capability in socfpga SPL. Remove the macro in this file, and recovering it back to proper functioning.

Quoted 4 lines
Fixes ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole

header file")

Patch looks good, minor nit below.

Quoted 2 lines
---
 arch/arm/mach-socfpga/include/mach/boot0.h | 24

++++++++++--------------

Review

Quoted 3 lines
 1 file changed, 10 insertions(+), 14 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-socfpga/include/mach/boot0.h

Quoted 22 lines

index aaada31..22d9e7f 100644

arch/arm/mach-socfpga/include/mach/boot0.h +4 -11
@@ -8,21 +8,17 @@
 #define __BOOT0_H
 
 #ifdef CONFIG_SPL_BUILD
-#define ARM_SOC_BOOT0_HOOK                                           \
-     .balignl 64,0xf33db33f;                                         \
-                                                                     \
-     .word   0x1337c0d3;     /* SoCFPGA preloader validation word */ \
-     .word   0xc01df00d;     /* Version, flags, length */            \
-     .word   0xcafec0d3;     /* Checksum, zero-pad */                \
-     nop;                                                            \
-                                                                     \
-     b reset;                /* SoCFPGA jumps here */                \
-     nop;                                                            \
-     nop;                                                            \
+     .balignl 64,0xf33db33f;
+
+     .word   0x1337c0d3;     /* SoCFPGA preloader validation word */
+     .word   0xc01df00d;     /* Version, flags, length */

arch/arm/mach-socfpga/include/mach/boot0.h line 21

Quoted 10 lines
arch/arm/mach-socfpga/include/mach/boot0.h +5 -3
+     .word   0xcafec0d3;     /* Checksum, zero-pad */
      nop;
-#else
-#define ARM_SOC_BOOT0_HOOK
-#endif
 
+     b reset;                /* SoCFPGA jumps here */
+     nop;
+     nop;
+     nop;

Correct me if I'm wrong, but did you add one more "nop" here ?

Quoted 2 lines
Quoted 1 line

no, i din't add extra "nop" here. There are 3 "nop" from original code

after "b reset".

Ah sorry, I see, it's just the patch being generated in a funny way. Thanks for double-checking.

Yeah, it is weird but the patch looks correct.

Thanks.

--
Best regards,
Marek Vasut

Applied
#7 lore raw

PATCH 1/1 ARM: socfpga: boot0 hook: remove macro from boot0 header file

In reply to tien.fong.chee at intel.com
Quoted 8 lines · tien.fong.chee at intel.com

From: "Chee, Tien Fong" <[email protected]>

Commit ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole header file") miss out cleaning macro in this header file, and this has broken implementation of a boot header capability in socfpga SPL. Remove the macro in this file, and recovering it back to proper functioning.

Quoted 5 lines
Fixes ce62e57fc571 ("ARM: boot0 hook: remove macro, include whole

header file")

---

Applied, thanks!

Signature · 2 lines
Best regards,
Marek Vasut