All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] ARMv8 switching CPUs into EL1
@ 2019-06-06 13:15 Mels van Broekhoven
  2019-06-11  8:51 ` Lukasz Majewski
  2019-06-11 12:09 ` Michal Simek
  0 siblings, 2 replies; 4+ messages in thread
From: Mels van Broekhoven @ 2019-06-06 13:15 UTC (permalink / raw)
  To: u-boot

L.S.!

On a Xilinx ZynqMP-based platform with u-boot running in Aarch64 mode in
EL2, after booting a Linux kernel  in EL1 using CONFIG_ARMV8_SWITCH_TO_EL1,
Linux throws a warning that the CPUs have started in inconsistent modes
("CPU: CPUs started in inconsistent modes").
Indeed, only the first core on which U-boot was running is switched to EL1
at this point.

Is this a bug or a not completely supported feature in U-boot or can this
warning actually be safely ignored under certain circumstances?

Kind regards,

Mels

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] ARMv8 switching CPUs into EL1
  2019-06-06 13:15 [U-Boot] ARMv8 switching CPUs into EL1 Mels van Broekhoven
@ 2019-06-11  8:51 ` Lukasz Majewski
  2019-06-11 12:09 ` Michal Simek
  1 sibling, 0 replies; 4+ messages in thread
From: Lukasz Majewski @ 2019-06-11  8:51 UTC (permalink / raw)
  To: u-boot

Hi Mels,

> L.S.!
> 
> On a Xilinx ZynqMP-based platform with u-boot running in Aarch64 mode
> in EL2, after booting a Linux kernel  in EL1 using
> CONFIG_ARMV8_SWITCH_TO_EL1, Linux throws a warning that the CPUs have
> started in inconsistent modes ("CPU: CPUs started in inconsistent
> modes"). Indeed, only the first core on which U-boot was running is
> switched to EL1 at this point.
> 
> Is this a bug or a not completely supported feature in U-boot or can
> this warning actually be safely ignored under certain circumstances?
> 

U-boot by design starts on Core0. Other cores are not touched and are
managed (started/configured) by Linux.

The other question is if you use the ARM Trusted Firmware [ATF]. If you
start/load it in U-Boot (or any earlier bootloader), then it also may
change / configure CPUs state.

> Kind regards,
> 
> Mels
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190611/f4a35cea/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] ARMv8 switching CPUs into EL1
  2019-06-06 13:15 [U-Boot] ARMv8 switching CPUs into EL1 Mels van Broekhoven
  2019-06-11  8:51 ` Lukasz Majewski
@ 2019-06-11 12:09 ` Michal Simek
  2019-06-11 12:39   ` Mark Kettenis
  1 sibling, 1 reply; 4+ messages in thread
From: Michal Simek @ 2019-06-11 12:09 UTC (permalink / raw)
  To: u-boot

Hi,

On 06. 06. 19 15:15, Mels van Broekhoven wrote:
> L.S.!
> 
> On a Xilinx ZynqMP-based platform with u-boot running in Aarch64 mode in
> EL2, after booting a Linux kernel  in EL1 using CONFIG_ARMV8_SWITCH_TO_EL1,
> Linux throws a warning that the CPUs have started in inconsistent modes
> ("CPU: CPUs started in inconsistent modes").
> Indeed, only the first core on which U-boot was running is switched to EL1
> at this point.
> 
> Is this a bug or a not completely supported feature in U-boot or can this
> warning actually be safely ignored under certain circumstances?

I have take a look at the path and what it is happening is that ATF
records that cpu0 started in EL2. Then u-boot starts Linux in EL1
because of macro above. And then Linux is asking from EL1 ATF to turn on
CPU but ATF has a record that CPU0 started in EL2 that's why it starts
others cpus in EL2. And then Kernel reports back that it is not consistent.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190611/391cfe35/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] ARMv8 switching CPUs into EL1
  2019-06-11 12:09 ` Michal Simek
@ 2019-06-11 12:39   ` Mark Kettenis
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Kettenis @ 2019-06-11 12:39 UTC (permalink / raw)
  To: u-boot

> From: Michal Simek <monstr@monstr.eu>
> Date: Tue, 11 Jun 2019 14:09:29 +0200
> 
> Hi,
> 
> On 06. 06. 19 15:15, Mels van Broekhoven wrote:
> > L.S.!
> > 
> > On a Xilinx ZynqMP-based platform with u-boot running in Aarch64 mode in
> > EL2, after booting a Linux kernel  in EL1 using CONFIG_ARMV8_SWITCH_TO_EL1,
> > Linux throws a warning that the CPUs have started in inconsistent modes
> > ("CPU: CPUs started in inconsistent modes").
> > Indeed, only the first core on which U-boot was running is switched to EL1
> > at this point.
> > 
> > Is this a bug or a not completely supported feature in U-boot or can this
> > warning actually be safely ignored under certain circumstances?
> 
> I have take a look at the path and what it is happening is that ATF
> records that cpu0 started in EL2. Then u-boot starts Linux in EL1
> because of macro above. And then Linux is asking from EL1 ATF to turn on
> CPU but ATF has a record that CPU0 started in EL2 that's why it starts
> others cpus in EL2. And then Kernel reports back that it is not consistent.

I'd say the answer in this situation is that you really shouldn't use
the CONFIG_ARMV8_SWITCH_TO_EL1 in your configuration if you're using
ATF.  Or you should configure ATF such that it spins up the secondary
CPUs into EL1.  Not sure if there is an easy way to do that though.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-11 12:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 13:15 [U-Boot] ARMv8 switching CPUs into EL1 Mels van Broekhoven
2019-06-11  8:51 ` Lukasz Majewski
2019-06-11 12:09 ` Michal Simek
2019-06-11 12:39   ` Mark Kettenis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.