public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-boot changes to bringup boot and secondary CPUs in HYP mode
Date: Fri, 27 Oct 2017 13:04:16 +0200	[thread overview]
Message-ID: <20171027130416.54f09cbc@jawa> (raw)
In-Reply-To: <CAOG0fen2scxfwHZKDOsKM+=Tcrt-jA6hdc7EYQiT1TOpMV9=9w@mail.gmail.com>

Hi Jayadev,

> Hello all,
> 
> I am currently trying to bring up Xen on OMAP5432. When I try to boot
> the board it shows
> 
> 
> 
> 
> 
> 
> 
> 
> *Starting kernel ...- UART enabled -- CPU 00000000 booting -- Xen
> must be entered in NS Hyp mode -- Please update the bootloader --
> Boot failed -* After applying the below patch , the boot CPU started
> loading.
> 
> diff --git a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> index 86c0e42..696da4b 100644
> --- a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> +++ b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> @@ -19,7 +19,20 @@
>   ENTRY(save_boot_params)
>       ldr    r1, =OMAP_SRAM_SCRATCH_BOOT_PARAMS
>       str    r0, [r1]
> +/*
> + * Turn on hypervisor mode on CPU#0
> + */
> +#ifdef CONFIG_DRA7XX_HYPERVISOR_ON
> +    mov    r0, lr        @ This is a great place to switch into hyp
> mode
> +                @ only the r0 was needed from _start and is now
> +                @ free; all other general purpose registers were
> +                @ already free.
> +    ldr    r12, =0x102    @ Set PL310 control register - value in R0
> +    .word    0xe1600070    @ SMC #0 - hand assembled because
> -march=armv5
> +                @ call ROM Code API to set control register
> +#else
>       bx    lr
> +#endif /* CONFIG_DRA7XX_HYPERVISOR_ON */
>   ENDPROC(save_boot_params)
>    ENTRY(set_pl310_ctrl_reg)
> 
> However now the secondary CPUs fail to load;
> 
> 
> 
> 
> 
> 
> 
> *(XEN) Bringing up CPU1- CPU 00000001 booting -- Xen must be entered
> in NS Hyp mode -- Please update the bootloader -- Boot failed -*
> Can someone provide the proper U-boot changes required to load the
> CPUs in HYP mode

Maybe between your patch (at the very beginning of boot up) and the time
XEN wants to re-enable second CPU there is a switch from HYP to SVC mode?

Please keep in mind that u-boot works with single core - and this
single core execution mode is passed to XEN.

> 
> Thanks and Regards
> _______________________________________________
> 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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

      reply	other threads:[~2017-10-27 11:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27  4:01 [U-Boot] U-boot changes to bringup boot and secondary CPUs in HYP mode Jayadev Kumaran
2017-10-27 11:04 ` Lukasz Majewski [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=20171027130416.54f09cbc@jawa \
    --to=lukma@denx.de \
    --cc=u-boot@lists.denx.de \
    /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