From: michael@walle.cc (Michael Walle)
To: linux-arm-kernel@lists.infradead.org
Subject: arm and patch phys offset
Date: Mon, 12 Dec 2011 23:06:09 +0100 [thread overview]
Message-ID: <201112122306.09585.michael@walle.cc> (raw)
In-Reply-To: <alpine.LFD.2.02.1112121627030.2907@xanadu.home>
Am Montag 12 Dezember 2011, 22:38:07 schrieb Nicolas Pitre:
> > But the non-patched entries always points to correct v2p/p2v
> > calls and in every case there is the unpatched add/sub instruction.
>
> Then, might it be possible that the cache is not properly turned off
> prior entering the kernel?
i'll have a look at that
> What bootloader do you use?
U-Boot 2011.09 + patches for bsp support
> You could try instrumenting the patching code, although it is a bit
> tricky because of the non-standard register life rules in that file.
> But something like this should tell you if the expected amount of fixups
> were applied:
>
> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
> index 08c82fd844..7f43d1fe01 100644
> --- a/arch/arm/kernel/head.S
> +++ b/arch/arm/kernel/head.S
> @@ -530,14 +530,23 @@ __fixup_a_pv_table:
> bcc 1b
> bx lr
> #else
> + mov r0, #0
> b 2f
> 1: ldr ip, [r7, r3]
> bic ip, ip, #0x000000ff
> orr ip, ip, r6 @ mask in offset bits 31-24
> str ip, [r7, r3]
> + add r0, r0, #1
> 2: cmp r4, r5
> ldrcc r7, [r4], #4 @ use branch for delay slot
> bcc 1b
> +
> + mov r6, r2
> + mov r7, r3
> + bl printhex8 @ display number of fixups done in r0
> + mov r2, r6
> + mov r3, r7
> +
> mov pc, lr
> #endif
> ENDPROC(__fixup_a_pv_table)
Thanks, although the kernel hangs now after it printed the number, i can see
it patched the correct number of stubs.
I'll have a look at the bootloader now.
--
Michael
prev parent reply other threads:[~2011-12-12 22:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201112112255.32534.michael@walle.cc>
2011-12-12 0:53 ` arm and patch phys offset Nicolas Pitre
2011-12-12 21:12 ` Michael Walle
2011-12-12 21:34 ` Russell King - ARM Linux
2011-12-12 21:55 ` Michael Walle
2011-12-12 22:02 ` Russell King - ARM Linux
2011-12-12 22:09 ` Michael Walle
2011-12-12 22:21 ` Russell King - ARM Linux
2011-12-12 22:56 ` Nicolas Pitre
2011-12-13 0:08 ` Michael Walle
2011-12-13 4:01 ` Nicolas Pitre
2011-12-13 23:17 ` Michael Walle
2011-12-18 11:58 ` Tixy
2012-01-03 7:15 ` Linus Walleij
2012-01-03 7:41 ` Michael Walle
2011-12-12 21:38 ` Nicolas Pitre
2011-12-12 21:57 ` Russell King - ARM Linux
2011-12-12 22:25 ` Nicolas Pitre
2011-12-12 22:06 ` Michael Walle [this message]
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=201112122306.09585.michael@walle.cc \
--to=michael@walle.cc \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).