[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH for 2.10 20/35] arm/boot: fix undefined instructio
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [PATCH for 2.10 20/35] arm/boot: fix undefined instruction on secondary smp cpu bootloader |
Date: |
Mon, 24 Jul 2017 22:06:00 +0100 |
On 24 July 2017 at 19:27, Philippe Mathieu-Daudé <address@hidden> wrote:
> In a ARM multicore system, write_secondary_boot() only initializes fixups for
> FIXUP_GIC_CPU_IF and FIXUP_BOOTREG, while smpboot[] also uses FIXUP_DSB.
> This results in write_bootloader() using uninitialized fixupcontext[FIXUP_DSB]
> instruction in the bootloader code...
Hmm? The code does:
if (arm_feature(&cpu->env, ARM_FEATURE_V7)) {
fixupcontext[FIXUP_DSB] = DSB_INSN;
} else {
fixupcontext[FIXUP_DSB] = CP15_DSB_INSN;
}
so fixupcontext[FIXUP_DSB] is guaranteed initialized,
as are FIXUP_GIC_CPU_IF and FIXUP_BOOTREG, which are
the only fixups that the smpboot[] code uses.
thanks
-- PMM