* [PATCH] ARM: trusted_foundations: Maintain CPU endianness
@ 2015-03-20 15:36 Dmitry Osipenko
2015-03-20 15:47 ` Dmitry Osipenko
[not found] ` <1426865807-22981-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Osipenko @ 2015-03-20 15:36 UTC (permalink / raw)
To: digetx-Re5JQEeQqe8AvxtiuMwx3w, Stephen Warren, Thierry Reding,
Alexandre Courbot
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Russell King,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Convert CPU reset vector address to LE to support big-endian kernel.
Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
arch/arm/firmware/trusted_foundations.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/firmware/trusted_foundations.c b/arch/arm/firmware/trusted_foundations.c
index 3fb1b5a..865103a 100644
--- a/arch/arm/firmware/trusted_foundations.c
+++ b/arch/arm/firmware/trusted_foundations.c
@@ -50,7 +50,7 @@ static void __naked tf_generic_smc(u32 type, u32 arg1, u32 arg2)
static int tf_set_cpu_boot_addr(int cpu, unsigned long boot_addr)
{
- cpu_boot_addr = boot_addr;
+ cpu_boot_addr = cpu_to_le32(boot_addr);
tf_generic_smc(TF_SET_CPU_BOOT_ADDR_SMC, cpu_boot_addr, 0);
return 0;
--
2.3.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] ARM: trusted_foundations: Maintain CPU endianness
2015-03-20 15:36 [PATCH] ARM: trusted_foundations: Maintain CPU endianness Dmitry Osipenko
@ 2015-03-20 15:47 ` Dmitry Osipenko
[not found] ` <550C4106.4090801-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[not found] ` <1426865807-22981-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
1 sibling, 1 reply; 5+ messages in thread
From: Dmitry Osipenko @ 2015-03-20 15:47 UTC (permalink / raw)
To: Stephen Warren, Thierry Reding, Alexandre Courbot
Cc: linux-tegra, Russell King, linux-arm-kernel, linux-kernel
This patch not tested. I assume that firmware save/restore cp15 context, i.e. it
doesn't require switching to LE before smc call and restore endianness after.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <1426865807-22981-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] ARM: trusted_foundations: Maintain CPU endianness
[not found] ` <1426865807-22981-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-03-20 16:07 ` Stephen Warren
[not found] ` <550C45AB.3070703-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2015-03-20 16:07 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Thierry Reding, Alexandre Courbot,
linux-tegra-u79uwXL29TY76Z2rM5mHXA, Russell King,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On 03/20/2015 09:36 AM, Dmitry Osipenko wrote:
> Convert CPU reset vector address to LE to support big-endian kernel.
Naively this sounds a little odd; the value here is in a CPU register
all the time, not in memory, so I'm not sure why endianness is relevant?
Presumably the CPU doesn't end up byte-swapping values in registers when
running in BE mode or it takes an SMC? If it does, why don't we need
cpu_to_le32(TF_SET_CPU_BOOT_ADDR_SMC) too?
Sorry if this is a silly question; I haven't followed any of the BE
kernel patches.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-20 16:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-20 15:36 [PATCH] ARM: trusted_foundations: Maintain CPU endianness Dmitry Osipenko
2015-03-20 15:47 ` Dmitry Osipenko
[not found] ` <550C4106.4090801-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-03-20 16:20 ` Dave Martin
[not found] ` <1426865807-22981-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-03-20 16:07 ` Stephen Warren
[not found] ` <550C45AB.3070703-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-03-20 16:41 ` Dmitry Osipenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).