* [PATCH] ARM: vexpress: ignore MIDR[0] for uart detection
@ 2013-09-29 10:17 Mian Yousaf Kaukab
2013-10-01 8:11 ` Mian Yousaf Kaukab
0 siblings, 1 reply; 4+ messages in thread
From: Mian Yousaf Kaukab @ 2013-09-29 10:17 UTC (permalink / raw)
To: linux-arm-kernel
Qemu vexpress-a9 target reports id of ARM Cortex-A9 core as r0p0
and uses legacy map. That is UART0 at address 0x10009000. Ignore
MIDR[0] during uart detection so that r0p0 as well as r0p1 use
legacy map.
Signed-off-by: Mian Yousaf Kaukab <yrehan@gmail.com>
---
arch/arm/include/debug/vexpress.S | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/debug/vexpress.S b/arch/arm/include/debug/vexpress.S
index 524acd5..932db8b 100644
--- a/arch/arm/include/debug/vexpress.S
+++ b/arch/arm/include/debug/vexpress.S
@@ -27,11 +27,16 @@
@ Make an educated guess regarding the memory map:
@ - the original A9 core tile (based on ARM Cortex-A9 r0p1)
- @ should use UART at 0x10009000
+ @ should use UART at 0x10009000. Moreover, qemu vexpress-a9
+ @ target reports id of ARM Cortex-A9 core as r0p0 and uses
+ @ legacy map.
@ - all other (RS1 complaint) tiles use UART mapped
@ at 0x1c090000
mrc p15, 0, \rp, c0, c0, 0
- movw \rv, #0xc091
+ mov \rv, #1
+ @ Ignore MIDR[0] during comparison
+ bic \rp, \rp, \rv
+ movw \rv, #0xc090
movt \rv, #0x410f
cmp \rp, \rv
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: vexpress: ignore MIDR[0] for uart detection
2013-09-29 10:17 [PATCH] ARM: vexpress: ignore MIDR[0] for uart detection Mian Yousaf Kaukab
@ 2013-10-01 8:11 ` Mian Yousaf Kaukab
2013-10-01 16:39 ` Pawel Moll
0 siblings, 1 reply; 4+ messages in thread
From: Mian Yousaf Kaukab @ 2013-10-01 8:11 UTC (permalink / raw)
To: linux-arm-kernel
Hi Pawel,
On Sun, Sep 29, 2013 at 12:17 PM, Mian Yousaf Kaukab <yrehan@gmail.com> wrote:
> Qemu vexpress-a9 target reports id of ARM Cortex-A9 core as r0p0
> and uses legacy map. That is UART0 at address 0x10009000. Ignore
> MIDR[0] during uart detection so that r0p0 as well as r0p1 use
> legacy map.
>
> Signed-off-by: Mian Yousaf Kaukab <yrehan@gmail.com>
> ---
> arch/arm/include/debug/vexpress.S | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/debug/vexpress.S b/arch/arm/include/debug/vexpress.S
> index 524acd5..932db8b 100644
> --- a/arch/arm/include/debug/vexpress.S
> +++ b/arch/arm/include/debug/vexpress.S
> @@ -27,11 +27,16 @@
>
> @ Make an educated guess regarding the memory map:
> @ - the original A9 core tile (based on ARM Cortex-A9 r0p1)
> - @ should use UART at 0x10009000
> + @ should use UART at 0x10009000. Moreover, qemu vexpress-a9
> + @ target reports id of ARM Cortex-A9 core as r0p0 and uses
> + @ legacy map.
> @ - all other (RS1 complaint) tiles use UART mapped
> @ at 0x1c090000
> mrc p15, 0, \rp, c0, c0, 0
> - movw \rv, #0xc091
> + mov \rv, #1
> + @ Ignore MIDR[0] during comparison
> + bic \rp, \rp, \rv
> + movw \rv, #0xc090
> movt \rv, #0x410f
> cmp \rp, \rv
Can you please take a look at this patch? Default vexpress_defconfig
does not boot on qemu vexpress-a9 target without it.
I apologize if you get this message twice. I have to resend because
the previous message didn't reach the mailing list.
BR,
Yousaf
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: vexpress: ignore MIDR[0] for uart detection
2013-10-01 8:11 ` Mian Yousaf Kaukab
@ 2013-10-01 16:39 ` Pawel Moll
2013-10-01 20:15 ` Mian Yousaf Kaukab
0 siblings, 1 reply; 4+ messages in thread
From: Pawel Moll @ 2013-10-01 16:39 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 2013-10-01 at 09:11 +0100, Mian Yousaf Kaukab wrote:
> Can you please take a look at this patch? Default vexpress_defconfig
> does not boot on qemu vexpress-a9 target without it.
Right, I think I've heard about it...
To be honest, I have rather mixed feelings about it. In particular I
could say that if qemu returns r0p0, it doesn't model V2P-CA9, which has
A9 r0p1 :-) Also, the DEBUG_LL and EARLY_PRINTK are pretty low level
features and it seems that they simply shouldn't be enabled in the
defconfig. As I'll be updating defconfig soon, I'll make sure they're
disabled.
Yes, I agree that the "detection" code is a hack. I'm not sure we have
to make it even hackier. Let me have a think about it, as I can't really
spend any time of the matter this week, sorry.
Thanks for your efforts!
Pawel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: vexpress: ignore MIDR[0] for uart detection
2013-10-01 16:39 ` Pawel Moll
@ 2013-10-01 20:15 ` Mian Yousaf Kaukab
0 siblings, 0 replies; 4+ messages in thread
From: Mian Yousaf Kaukab @ 2013-10-01 20:15 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 1, 2013 at 6:39 PM, Pawel Moll <pawel.moll@arm.com> wrote:
> To be honest, I have rather mixed feelings about it. In particular I
> could say that if qemu returns r0p0, it doesn't model V2P-CA9, which has
> A9 r0p1 :-) [...]
r0p0 looked legitimate to me :). Ok I will drive this with qemu developers then.
Thanks,
Yousaf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-01 20:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-29 10:17 [PATCH] ARM: vexpress: ignore MIDR[0] for uart detection Mian Yousaf Kaukab
2013-10-01 8:11 ` Mian Yousaf Kaukab
2013-10-01 16:39 ` Pawel Moll
2013-10-01 20:15 ` Mian Yousaf Kaukab
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).