All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/6] armv8/gic: Fix GIC v2 initialization
Date: Fri, 20 Mar 2015 18:03:27 +0000	[thread overview]
Message-ID: <550C60EF.8030406@arm.com> (raw)
In-Reply-To: <1426852073-10299-5-git-send-email-thierry.reding@gmail.com>

Hi Thierry,

On 20/03/15 11:47, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Initialize all GICD_IGROUPRn registers and set up GICC_CTLR to enable
> interrupts to the primary CPU. This fixes issues seen after booting a
> Linux kernel from U-Boot.
> 
> Suggested-by: Marc Zyngier <marc.zyngier@arm.com>
> Suggested-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  arch/arm/lib/gic_64.S | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/lib/gic_64.S b/arch/arm/lib/gic_64.S
> index a3e18f7713e5..62d0022408bc 100644
> --- a/arch/arm/lib/gic_64.S
> +++ b/arch/arm/lib/gic_64.S
> @@ -46,11 +46,19 @@ ENTRY(gic_init_secure)
>  	ldr	w9, [x0, GICD_TYPER]
>  	and	w10, w9, #0x1f		/* ITLinesNumber */
>  	cbz	w10, 1f			/* No SPIs */
> -	add	x11, x0, (GICD_IGROUPRn + 4)
> +	add	x11, x0, GICD_IGROUPRn
>  	mov	w9, #~0			/* Config SPIs as Grp1 */
> +	str	w9, [x11], #0x4
>  0:	str	w9, [x11], #0x4
>  	sub	w10, w10, #0x1
>  	cbnz	w10, 0b
> +
> +	ldr	x1, =GICC_BASE		/* GICC_CTLR */
> +	mov	w0, #3			/* EnableGrp0 | EnableGrp1 */
> +	str	w0, [x1]
> +
> +	mov	w0, #1 << 7		/* allow NS access to GICC_PMR */
> +	str	w0, [x1, #4]		/* GICC_PMR */
>  #endif
>  1:
>  	ret
> 

Looking at the code that currently sits in the u-boot repo, it looks
like you are duplicating functionality that is provided by
gic_init_secure_percpu.

Could your boot failure be a case of this function not being called on
all CPUs?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2015-03-20 18:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 11:47 [U-Boot] [PATCH 1/6] armv8/cache: Fix page table creation Thierry Reding
2015-03-20 11:47 ` [U-Boot] [PATCH 2/6] armv8: Implement CONFIG_SYS_MALLOC_F_LEN support Thierry Reding
2015-03-24 14:47   ` FengHua
2015-03-20 11:47 ` [U-Boot] [PATCH 3/6] armv8/mmu: Clean up TCR programming Thierry Reding
2015-03-20 18:13   ` Marc Zyngier
2015-07-02 21:06     ` Albert ARIBAUD
2015-07-03  7:28       ` Marc Zyngier
2015-03-24 14:55   ` FengHua
2015-03-20 11:47 ` [U-Boot] [PATCH 4/6] armv8/mmu: Set bits marked RES1 in TCR Thierry Reding
2015-03-20 18:16   ` Marc Zyngier
2015-03-24 15:10   ` FengHua
2015-03-20 11:47 ` [U-Boot] [PATCH 5/6] armv8/gic: Fix GIC v2 initialization Thierry Reding
2015-03-20 18:03   ` Marc Zyngier [this message]
2015-03-20 11:47 ` [U-Boot] [PATCH 6/6] armv8: Allow SoCs to override the generic timer Thierry Reding
2015-03-20 18:18   ` Marc Zyngier
2015-03-24 14:59   ` FengHua
2015-03-20 18:06 ` [U-Boot] [PATCH 1/6] armv8/cache: Fix page table creation Marc Zyngier
2015-03-24 14:52 ` FengHua
2015-04-16 11:24 ` Albert ARIBAUD
2015-06-03 15:09   ` Albert ARIBAUD

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=550C60EF.8030406@arm.com \
    --to=marc.zyngier@arm.com \
    --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 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.