From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Arm64: convert soft_restart() to assembly code
Date: Wed, 20 Aug 2014 15:16:23 +0100 [thread overview]
Message-ID: <20140820141623.GF21734@leverpostej> (raw)
In-Reply-To: <CAFdej00s9ZYXnE4AfU0vUqTb4dmUg4U=fOhc3KS1_JK+0=+mdw@mail.gmail.com>
[...]
> I am trying to kexec a UP-LE kernel from and SMP-LE kernel.
>
> > As I mentioned we do need to ensure that the CPUs are in the mode they
> > started in, though I'm not sure I follow what you mean by "not waiting".
> > This could be an orthogonal issue.
>
> If I verify the secondary CPUs from u-boot I can see that
> they are all looping at
>
> Core number : 1
> Core state : debug (AArch64 EL2)
> Debug entry cause : External Debug Request
> Current PC : 0x0000000000000238
> Current CPSR : 0x200003c9 (EL2h)
>
> But after the kexec calls soft_restar(0) for all secondary CPUs
> they are looping at
>
> Core number : 1
> Core state : debug (AArch64 EL1)
> Debug entry cause : External Debug Request
> Current PC : 0xffffffc000083200
> Current CPSR : 0x600003c5 (EL1h)
>
> This is what I mean by they are not waiting for
> the secondary start-up address to jump.
Ok.
> >
> > What exactly do you see, do the CPUs leave the spin-table, are they
> > taking exceptions, are they getting stuck in the spin-table, etc?
> >
> They all are clearly resetting to address "0"(Put a breakpoint and
> verified) but somehow they end up @0xffffffc000083200.
> I still don't know why.
>
> ########
> ffffffc00008319c: d503201f nop
> ...
> ffffffc000083200: 14000260 b ffffffc000083b80 <el1_sync>
> ffffffc000083204: d503201f nop
> ffffffc000083208: d503201f nop
> ########
That's the EL1 exception vector table.
What looks to be happening is that something causes the CPUs to take an
exception (at EL1). Because translation isn't enabled and the vector
address doesn't map to anything, they'll take some sort of exception.
Because the vectors aren't mapped that will go recursive.
Your spin-table implementation might be poking something that's not
accessible at EL1, in which case you require the jump to EL2 for
correctness. I can't say for certain either way.
Thanks,
Mark.
next prev parent reply other threads:[~2014-08-20 14:16 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 12:42 [PATCH] Arm64: convert soft_restart() to assembly code Arun Chandran
2014-08-12 14:05 ` Mark Rutland
2014-08-13 4:57 ` Arun Chandran
2014-08-13 7:43 ` [PATCH] Arm64: convert part of soft_restart() to assembly Arun Chandran
2014-08-13 10:58 ` Mark Rutland
2014-08-13 11:17 ` Arun Chandran
2014-08-13 11:21 ` Mark Rutland
2014-08-15 17:20 ` [PATCH] Arm64: convert soft_restart() to assembly code Geoff Levand
2014-08-15 18:21 ` Mark Rutland
2014-08-15 18:53 ` Geoff Levand
2014-08-18 16:02 ` Mark Rutland
2014-08-18 17:33 ` Christoffer Dall
2014-08-19 1:10 ` Geoff Levand
2014-08-20 10:48 ` Mark Rutland
2014-08-20 10:54 ` Christoffer Dall
2014-08-20 11:21 ` Mark Rutland
2014-08-25 11:04 ` Arun Chandran
2014-08-25 14:14 ` Arun Chandran
2014-08-26 15:22 ` Mark Rutland
2014-08-26 16:14 ` Arun Chandran
2014-08-18 6:43 ` Arun Chandran
2014-08-19 9:04 ` Arun Chandran
2014-08-20 10:28 ` Arun Chandran
2014-08-20 10:54 ` Mark Rutland
2014-08-20 13:57 ` Arun Chandran
2014-08-20 14:16 ` Mark Rutland [this message]
2014-08-21 13:34 ` Arun Chandran
2014-08-21 14:31 ` Mark Rutland
2014-08-22 11:11 ` Arun Chandran
2014-08-22 13:15 ` Mark Rutland
2014-08-23 19:50 ` Arun Chandran
2014-08-26 13:00 ` Arun Chandran
2014-08-26 14:08 ` Mark Rutland
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=20140820141623.GF21734@leverpostej \
--to=mark.rutland@arm.com \
--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).