Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Luca Fancellu <Luca.Fancellu@arm.com>
Cc: Andre Przywara <Andre.Przywara@arm.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 5/6] aarch64: Support PSCI for Armv8-R AArch64
Date: Tue, 30 Jul 2024 13:55:47 +0100	[thread overview]
Message-ID: <Zqji0wt2zDpbnULh@J2N7QTR9R3> (raw)
In-Reply-To: <CB3E201F-6A10-44AA-8C81-79563DCEB662@arm.com>

On Tue, Jul 30, 2024 at 12:31:14PM +0100, Luca Fancellu wrote:
> Hi Mark,
> 
> >> -
> >> -AS_IF([test "x$USE_PSCI" != "xyes" -a "x$KERNEL_ES" = "x32"],
> >> + [case "${enableval}" in
> >> + yes|smc) USE_PSCI=smc ;;
> >> + hvc) USE_PSCI=hvc ;;
> >> + no) ;;
> >> + *) AC_MSG_ERROR([Bad value "${enableval}" for --enable-psci. Use "smc" or "hvc"]) ;;
> >> + esac])
> >> +AM_CONDITIONAL([PSCI], [test "x$USE_PSCI" = "xyes" -o "x$USE_PSCI" = "xsmc" -o "x$USE_PSCI" = "xhvc"])
> >> +AM_CONDITIONAL([PSCI_HVC], [test "x$USE_PSCI" = "xhvc"])
> >> +
> >> +AS_IF([test "x$USE_PSCI" = "xno" -a "x$KERNEL_ES" = "x32"],
> >> [AC_MSG_ERROR([With an AArch32 kernel, boot method must be PSCI.])]
> >> )
> >> +AC_SUBST([PSCI_METHOD], [$USE_PSCI])
> >
> > As of this patch, if I build with --enable-psci=hvc, and boot on
> > ARMv8-A, it'll fail at boot time, since the boot-wrapper won't fix up
> > the SPSR (and will enter the kernel at EL2), and HVC will go to that
> > kernel.
> >
> > I think that we either need to add support for dropping to EL1 in
> > ARMv8-A, or we should have an option to build for ARMv8-R specifically,
> > where we can automatically fix up the PSCI conduit.
> 
> True, maybe the best option is to have a flag to build for armv8r?

I think so.

> Would --armv8r64 be ok?
> 
> The behaviour would be:
>  --armv8r64 without XEN -> starting at EL2 only, setting conduit to hvc, psci_vector to VBAR_EL2, drop to EL1 and start kernel
>  --armv8r64 with XEN -> starting at EL2 only, psci not supported, keep xen at EL2

That sounds good. If you can sort out the logic for that, we can change
the option name later if we want.

That will have to interact with --enable-aarch32-bw and
--enable-aarch32-kernel, so maybe it's worth having a single option to
select the boot-wrapper architecture, e.g. --bw-arch=${PARAM} that
takes:

* "aarch64-a"	// default today
* "aarch32-a"	// replaces --aarch32-bw
* "aarch64-r"	// For armv8r64

Note I've used "aarch64" since we already have ARMv9-A bits.

Mark.

> 
> Cheers,
> Luca
> 


  reply	other threads:[~2024-07-30 12:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16 14:29 [PATCH v2 0/6] Add Armv8-R AArch64 support Luca Fancellu
2024-07-16 14:29 ` [PATCH v2 1/6] aarch64: Rename labels and prepare for lower EL booting Luca Fancellu
2024-07-16 14:29 ` [PATCH v2 2/6] aarch64: Prepare " Luca Fancellu
2024-07-16 14:29 ` [PATCH v2 3/6] aarch64: Remove TSCXT bit set from SCTLR_EL2_RESET Luca Fancellu
2024-07-19 10:05   ` Mark Rutland
2024-07-16 14:29 ` [PATCH v2 4/6] aarch64: Introduce EL2 boot code for Armv8-R AArch64 Luca Fancellu
2024-07-29 15:01   ` Mark Rutland
2024-07-29 15:27     ` Luca Fancellu
2024-07-29 16:14       ` Mark Rutland
2024-07-16 14:29 ` [PATCH v2 5/6] aarch64: Support PSCI " Luca Fancellu
2024-07-29 16:09   ` Mark Rutland
2024-07-30 11:31     ` Luca Fancellu
2024-07-30 12:55       ` Mark Rutland [this message]
2024-07-16 14:29 ` [PATCH v2 6/6] aarch64: Start Xen on Armv8-R at EL2 Luca Fancellu
2024-07-23 12:27   ` Mark Rutland
2024-07-23 12:35     ` Luca Fancellu

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=Zqji0wt2zDpbnULh@J2N7QTR9R3 \
    --to=mark.rutland@arm.com \
    --cc=Andre.Przywara@arm.com \
    --cc=Luca.Fancellu@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