Skip to contentSkip to conversation

ARM: Specify aligned address for secure section instead of using attributes

PATCH In review Chen-Yu Tsai 3 participants 4 messages Sep 6, 2018 – Sep 7, 2018 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: Specify aligned address for secure section instead of using attributes

In commit a1274cc94a20 ("ARM: Page align secure section only when it is executed in situ"), we used output section attributes (the "ALIGN" keyword after the colon) to specify the alignment requirements. Using the constant "COMMONPAGE" there was recently broken in binutils 2.31 [1].

Binutils maintainer Alan Modra suggested the former method would still work. Since both methods achieve the same result, this patch does just that. This fixes the "reboot after bootm" issue we've been seeing on sunxi when booting non-secure.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=23571

---
 arch/arm/cpu/u-boot.lds | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/cpu/u-boot.lds +2 -2
index 834dc99554c9..0eb164d2e694 100644
@@ -68,11 +68,11 @@ SECTIONS
 #ifdef CONFIG_ARMV7_NONSEC
 
 	/* Align the secure section only if we're going to use it in situ */
-	.__secure_start :
+	.__secure_start
 #ifndef CONFIG_ARMV7_SECURE_BASE
 		ALIGN(CONSTANT(COMMONPAGESIZE))
 #endif
-	{
+	: {
 		KEEP(*(.__secure_start))
 	}
 
Signature · 1 line
2.19.0.rc1
#1 lore raw

PATCH 1/1 ARM: Specify aligned address for secure section instead of using attributes

Quoted 10 lines · Chen-Yu Tsai

In commit a1274cc94a20 ("ARM: Page align secure section only when it is executed in situ"), we used output section attributes (the "ALIGN" keyword after the colon) to specify the alignment requirements. Using the constant "COMMONPAGE" there was recently broken in binutils 2.31 [1].

Binutils maintainer Alan Modra suggested the former method would still work. Since both methods achieve the same result, this patch does just that. This fixes the "reboot after bootm" issue we've been seeing on sunxi when booting non-secure.

Quoted 4 lines

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=23571

After a little more time for review, should I take this directly or a PR from the sunxi team? Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180906/85cdad4e/attachment.sig>
#2 lore raw

PATCH 1/1 ARM: Specify aligned address for secure section instead of using attributes

Quoted 12 lines · Tom Rini
Quoted 10 lines · Chen-Yu Tsai

In commit a1274cc94a20 ("ARM: Page align secure section only when it is executed in situ"), we used output section attributes (the "ALIGN" keyword after the colon) to specify the alignment requirements. Using the constant "COMMONPAGE" there was recently broken in binutils 2.31 [1].

Binutils maintainer Alan Modra suggested the former method would still work. Since both methods achieve the same result, this patch does just that. This fixes the "reboot after bootm" issue we've been seeing on sunxi when booting non-secure.

Quoted 6 lines
Quoted 4 lines

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=23571

Quoted 3 lines

After a little more time for review, should I take this directly or a PR from the sunxi team? Thanks!

As of now, I don't have any patches for the release please take it directly.

#3 lore raw
In reply to Chen-Yu Tsai
Quoted 10 lines · Chen-Yu Tsai

In commit a1274cc94a20 ("ARM: Page align secure section only when it is executed in situ"), we used output section attributes (the "ALIGN" keyword after the colon) to specify the alignment requirements. Using the constant "COMMONPAGE" there was recently broken in binutils 2.31 [1].

Binutils maintainer Alan Modra suggested the former method would still work. Since both methods achieve the same result, this patch does just that. This fixes the "reboot after bootm" issue we've been seeing on sunxi when booting non-secure.

Quoted 6 lines

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=23571

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180907/47e804cd/attachment.sig>