From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 1/3] arm: discard relocation entry for secure section
Date: Tue, 20 Oct 2015 09:05:32 +0200 [thread overview]
Message-ID: <20151020090532.48426615@lilith> (raw)
In-Reply-To: <1445320795-2235-1-git-send-email-Peng.Fan@freescale.com>
Hello Peng,
On Tue, 20 Oct 2015 13:59:53 +0800, Peng Fan <Peng.Fan@freescale.com>
wrote:
> The code such as PSCI in section named secure is bundled with
> u-boot image, and when bootm, the code will be copied to their
> runtime address same to compliation/linking address -
> CONFIG_ARMV7_SECURE_BASE.
>
> When compile the PSCI code and link it into the u-boot image,
> there will be relocation entries in .rel.dyn section for PSCI.
> Actually, we do not needs these relocation entries.
>
> If still keep the relocation entries in .rel.dyn section,
> r0 at line 103 and 106 in arch/arm/lib/relocate.S may be an invalid
> address which may not support read/write for one SoC.
> 102 /* relative fix: increase location by offset */
> 103 add r0, r0, r4
> 104 ldr r1, [r0]
> 105 add r1, r1, r4
> 106 str r1, [r0]
>
> So discard the relocation entries for code in secure section.
Actually, I'll need you to do a slight change -- that's my fault, and
karma even ensured that my own self of two years ago would be the one
to come and kick me. See:
http://lists.denx.de/pipermail/u-boot/2013-December/168652.html
Which basically is about never discarding any section in the ELF file,
and only copying a subset of the ELF sections into the binary file.
So rather than discarding the secure relocation records, let's move
them to another section as you had proposed, and thus change the line
> + /DISCARD/ : { *(.rel._secure*) }
Into a
.rel._secure { *(.rel._secure*) }
Placed right after the already present
.dynamic : { *(.dynamic*) }
With my apologies for the very late realization.
Amicalement,
--
Albert.
next prev parent reply other threads:[~2015-10-20 7:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-20 5:59 [U-Boot] [PATCH V2 1/3] arm: discard relocation entry for secure section Peng Fan
2015-10-20 5:59 ` [U-Boot] [PATCH V2 2/3] mx7: psci: add basic psci support Peng Fan
2015-10-20 10:50 ` Fabio Estevam
2015-10-20 14:05 ` Li Frank
2015-10-20 14:25 ` Albert ARIBAUD
2015-10-20 14:29 ` Li Frank
[not found] ` <20151020165526.1ae0c332@lilith>
[not found] ` <BY2PR0301MB163850B2C1169D80C249AB2782390@BY2PR0301MB1638.namprd03.prod.outlook.com>
2015-10-20 21:04 ` Albert ARIBAUD
2015-10-20 21:12 ` Li Frank
2015-10-20 5:59 ` [U-Boot] [PATCH V2 3/3] imx: mx7: default enable non-secure mode Peng Fan
2015-10-20 7:05 ` Albert ARIBAUD [this message]
2015-10-20 7:20 ` [U-Boot] [PATCH V2 1/3] arm: discard relocation entry for secure section Peng Fan
2015-10-20 7:32 ` Albert ARIBAUD
2015-10-20 7:41 ` Peng Fan
2015-10-20 12:59 ` Albert ARIBAUD
2015-10-21 9:42 ` Peng Fan
2015-10-21 11:42 ` Albert ARIBAUD
2015-10-21 12:09 ` Peng Fan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151020090532.48426615@lilith \
--to=albert.u.boot@aribaud.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox