[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/8] linux-user: arm: set CPSR.E correctly fo

From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 2/8] linux-user: arm: set CPSR.E correctly for BE8 mode
Date: Fri, 30 May 2014 09:26:22 +0100

On 30 May 2014 07:46, Paolo Bonzini <address@hidden> wrote:
> Il 29/05/2014 22:38, Peter Maydell ha scritto:
>>> > +    cpsr |= CPSR_E;
>> This is wrong for BE32, where CPSR_E doesn't exist and both code
>> and data accesses are big-endian.
> Is it okay for simplicity to treat CPSR.E = 1 as "big-endian code,
> little-endian data" in BE32 mode?  The architecture manual leaves it
> undefined.

Actually the ARM ARM does define it: (DDI0406C.c section D12.6.1)
"When SCTLR.B is set, SCTLR.EE and CPSR.E must be clear, or else
the endianness behaviour is UNPREDICTABLE."

So if the guest does set CPSR.E in a BE32 binary you can do
whatever's convenient as long as it's not a security hole,

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]