Skip to contentSkip to conversation

microblaze: Fix built-in DTB alignment to be 8-byte aligned

PATCH Applied Rob Herring 2 participants 2 messages Feb 13, 2021 – Feb 16, 2021 Microblaze architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 microblaze: Fix built-in DTB alignment to be 8-byte aligned

Commit 79edff12060f ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9") broke booting on Microblaze systems depending on the build. The problem is libfdt gained an 8-byte starting alignment check, but the Microblaze built-in DTB area is only 4-byte aligned. This affected not just built-in DTBs as bootloader passed DTBs are copied into the built-in DTB region.

Other arches using built-in DTBs use a common linker macro which has sufficient alignment.

Fixes 79edff12060f ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9")
Cc Michal Simek <[email protected]>

---
As the commit is in my tree, I'll take this via the DT tree.

 arch/microblaze/kernel/vmlinux.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/microblaze/kernel/vmlinux.lds.S +1 -1
index df07b3d06cd6..fb31747ec092 100644
@@ -45,7 +45,7 @@ SECTIONS {
 		_etext = . ;
 	}
 
-	. = ALIGN (4) ;
+	. = ALIGN (8) ;
 	__fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) {
 		_fdt_start = . ;		/* place for fdt blob */
 		*(__fdt_blob) ;			/* Any link-placed DTB */
Signature · 1 line
2.27.0
maintainer Applied
#1 lore raw

so 13. 2. 2021 v 2:16 odesílatel Rob Herring <[email protected]> napsal:

Quoted 36 lines

Commit 79edff12060f ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9") broke booting on Microblaze systems depending on the build. The problem is libfdt gained an 8-byte starting alignment check, but the Microblaze built-in DTB area is only 4-byte aligned. This affected not just built-in DTBs as bootloader passed DTBs are copied into the built-in DTB region.

Other arches using built-in DTBs use a common linker macro which has sufficient alignment.

Fixes 79edff12060f ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9")
Cc Michal Simek <[email protected]>

---
As the commit is in my tree, I'll take this via the DT tree.

 arch/microblaze/kernel/vmlinux.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/microblaze/kernel/vmlinux.lds.S +1 -2
index df07b3d06cd6..fb31747ec092 100644
@@ -45,7 +45,7 @@ SECTIONS {
                _etext = . ;
        }
 
-       . = ALIGN (4) ;
+       . = ALIGN (8) ;
        __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) {
                _fdt_start = . ;                /* place for fdt blob */
                *(__fdt_blob) ;                 /* Any link-placed DTB */
--
Quoted 2 lines

2.27.0

Applied.

Thanks,
Michal

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs