Skip to contentSkip to conversation

arm64: bring Image header in line with latest Arm brand guidelines

PATCH Applied Ard Biesheuvel 3 participants 3 messages Apr 1, 2020 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: bring Image header in line with latest Arm brand guidelines

The Arm brand guidelines are pretty clear when it comes to the way the brand name 'arm' should be displayed: it should be all lowercase, and there should be sufficient whitespace around it on all sides.

Let's use the reserved space we have available in the Image header to bring it in compliance with this.

---
 arch/arm64/include/asm/image.h | 2 +-
 arch/arm64/kernel/head.S       | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)
arch/arm64/include/asm/image.h +1 -1
index c2b13213c720..a52e6eca8118 100644
@@ -3,7 +3,7 @@
 #ifndef __ASM_IMAGE_H
 #define __ASM_IMAGE_H
 
-#define ARM64_IMAGE_MAGIC	"ARM\x64"
+#define ARM64_IMAGE_MAGIC	"arm\x64"
 
 #define ARM64_IMAGE_FLAG_BE_SHIFT		0
 #define ARM64_IMAGE_FLAG_PAGE_SIZE_SHIFT	(ARM64_IMAGE_FLAG_BE_SHIFT + 1)
arch/arm64/kernel/head.S +3 -4
index 57a91032b4c2..e70d3f96dfe4 100644
@@ -78,10 +78,9 @@ _head:
 	le64sym	_kernel_offset_le		// Image load offset from start of RAM, little-endian
 	le64sym	_kernel_size_le			// Effective size of kernel image, little-endian
 	le64sym	_kernel_flags_le		// Informative flags, little-endian
-	.quad	0				// reserved
-	.quad	0				// reserved
-	.quad	0				// reserved
-	.ascii	ARM64_IMAGE_MAGIC		// Magic number
+	.ascii		 "         "
+	.ascii	"   " ARM64_IMAGE_MAGIC "   "	// Magic number
+	.ascii		 "         "
 #ifdef CONFIG_EFI
 	.long	pe_header - _head		// Offset to the PE header.
 
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#1 lore raw

Hi Ard,

Quoted 33 lines · Ard Biesheuvel

The Arm brand guidelines are pretty clear when it comes to the way the brand name 'arm' should be displayed: it should be all lowercase, and there should be sufficient whitespace around it on all sides.

Let's use the reserved space we have available in the Image header to bring it in compliance with this.

---
 arch/arm64/include/asm/image.h | 2 +-
 arch/arm64/kernel/head.S       | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)
arch/arm64/include/asm/image.h +1 -1
index c2b13213c720..a52e6eca8118 100644
@@ -3,7 +3,7 @@
 #ifndef __ASM_IMAGE_H
 #define __ASM_IMAGE_H
 
-#define ARM64_IMAGE_MAGIC	"ARM\x64"
+#define ARM64_IMAGE_MAGIC	"arm\x64"
 
 #define ARM64_IMAGE_FLAG_BE_SHIFT		0
 #define ARM64_IMAGE_FLAG_PAGE_SIZE_SHIFT	(ARM64_IMAGE_FLAG_BE_SHIFT + 1)
arch/arm64/kernel/head.S +0 -0
index 57a91032b4c2..e70d3f96dfe4 100644
@@ -78,10 +78,9 @@ _head:
 	le64sym	_kernel_offset_le		// Image load offset from start of RAM, little-endian
 	le64sym	_kernel_size_le			// Effective size of kernel image, little-endian

arch/arm64/kernel/head.S _head: · line 85

Quoted 10 lines
arch/arm64/kernel/head.S +3 -4
 	le64sym	_kernel_flags_le		// Informative flags, little-endian
-	.quad	0				// reserved
-	.quad	0				// reserved
-	.quad	0				// reserved
-	.ascii	ARM64_IMAGE_MAGIC		// Magic number
+	.ascii		 "         "
+	.ascii	"   " ARM64_IMAGE_MAGIC "   "	// Magic number
+	.ascii		 "         "
 #ifdef CONFIG_EFI
 	.long	pe_header - _head		// Offset to the PE header.

Thanks for the patch. As you know, we take this kind of thing very seriously in the kernel community, which is why I'm disappointed not to see you taking this work to its natural conclusion by introducing a new printk format
specifier for " arm ", complete with the relevant escapes to ensure the
correct shade of blue on terminal emulators that support it.

But since the bootloader communities will probably be over the moon with this patch on its own, I see no reason to hold it up:

Will

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer Applied
#2 lore raw
In reply to Ard Biesheuvel
Quoted 8 lines · Ard Biesheuvel

The Arm brand guidelines are pretty clear when it comes to the way the brand name 'arm' should be displayed: it should be all lowercase, and there should be sufficient whitespace around it on all sides.

Let's use the reserved space we have available in the Image header to bring it in compliance with this.

Queued for 5.7-rc1. Thanks.

Signature · 6 lines
Catalin

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel