Re: [Qemu-devel] [PATCH] hw/arm/boot: Set PC correctly when loading AArch64 ELF files

2014-07-29 Thread Richard Henderson
On 07/29/2014 09:31 AM, Peter Maydell wrote: > Given that env->regs[] is uint32_t, does it actually change the final > result? Ah, no. I mis-remembered regs and xregs being shared. r~

Re: [Qemu-devel] [PATCH] hw/arm/boot: Set PC correctly when loading AArch64 ELF files

2014-07-29 Thread Peter Maydell
On 29 July 2014 20:25, Richard Henderson wrote: > On 07/25/2014 05:23 AM, Peter Maydell wrote: >> +env->regs[15] = info->entry & 0xfffe; > > You'd do well to use a U suffix here, otherwise c89 makes this -2 while c99 > does what you want. Which makes a tiny difference on a 64-

Re: [Qemu-devel] [PATCH] hw/arm/boot: Set PC correctly when loading AArch64 ELF files

2014-07-29 Thread Richard Henderson
On 07/25/2014 05:23 AM, Peter Maydell wrote: > +env->regs[15] = info->entry & 0xfffe; You'd do well to use a U suffix here, otherwise c89 makes this -2 while c99 does what you want. Which makes a tiny difference on a 64-bit host. r~

Re: [Qemu-devel] [PATCH] hw/arm/boot: Set PC correctly when loading AArch64 ELF files

2014-07-25 Thread Christopher Covington
On 07/25/2014 11:23 AM, Peter Maydell wrote: > The code in do_cpu_reset() correctly handled AArch64 CPUs > when running Linux kernels, but was missing code in the > branch of the if() that deals with loading ELF files. > Correctly jump to the ELF entry point on reset rather than > leaving the reset

[Qemu-devel] [PATCH] hw/arm/boot: Set PC correctly when loading AArch64 ELF files

2014-07-25 Thread Peter Maydell
The code in do_cpu_reset() correctly handled AArch64 CPUs when running Linux kernels, but was missing code in the branch of the if() that deals with loading ELF files. Correctly jump to the ELF entry point on reset rather than leaving the reset PC at zero. Reported-by: Christopher Covington Signe