[U-Boot] [PATCH v2 2/3] arm: armv7: allow unaligned memory access

Alexander Graf agraf at suse.de
Wed Apr 4 12:20:14 UTC 2018



On 04.04.18 12:52, Heinrich Schuchardt wrote:
> On 04/04/2018 11:46 AM, Alexander Graf wrote:
>>
>>
>> On 03.04.18 21:59, Heinrich Schuchardt wrote:
>>> The UEFI spec mandates that unaligned memory access should be enabled if
>>> supported by the CPU architecture.
>>>
>>> This patch implements the function unaligned_access() to reset the aligned
>>> access flag in the system control register (SCTLR). It is called when the
>>> bootefi command is invoked.
>>>
>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>>
>> This will not work unfortunately. Unaligned accesses are only handled by
>> hardware on armv7 (and armv8) when the underlying memory is mapped as
>> cached. Given the extremely wild situation on armv7 for page table
>> setups, I'm not terribly confident to give anyone even the slightest
>> hint that unaligned accesses would work on armv7.
> 
>>> extremely wild situation on armv7
> Is this a deficiency of the CPUs or of U-Boot?
> Could you, please, provide an example where it would not work.

Of U-Boot. But looking at the current source code again, it seems to not
be as bad as I remember it to be. Let's try to make this work then.


Alex


More information about the U-Boot mailing list