qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] nrf51: Fix last GPIO CNF address


From: Peter Maydell
Subject: Re: [PATCH v2] nrf51: Fix last GPIO CNF address
Date: Thu, 16 Apr 2020 18:09:27 +0100

On Wed, 15 Apr 2020 at 05:37, Cameron Esfahani <address@hidden> wrote:
>
> NRF51_GPIO_REG_CNF_END doesn't actually refer to the start of the last
> valid CNF register: it's referring to the last byte of the last valid
> CNF register.
>
> This hasn't been a problem up to now, as current implementation in
> memory.c turns an unaligned 4-byte read from 0x77f to a single byte read
> and the qtest only looks at the least-significant byte of the register.
>
> But when running with patches which fix unaligned accesses in memory.c,
> the qtest breaks.
>
> Considering NRF51 doesn't support unaligned accesses, the simplest fix
> is to actually set NRF51_GPIO_REG_CNF_END to the start of the last valid
> CNF register: 0x77c.
>
> Now, qtests work with or without the unaligned access patches.
>
> Reviewed-by: Cédric Le Goater <address@hidden>
> Tested-by: Cédric Le Goater <address@hidden>
> Reviewed-by: Joel Stanley <address@hidden>
> Signed-off-by: Cameron Esfahani <address@hidden>



Applied to target-arm.next for 5.1, thanks.

-- PMM



reply via email to

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