On 9 September 2016 at 13:34, Leif Lindholm <[email protected]> wrote:
> On Fri, Sep 09, 2016 at 01:18:22PM +0100, Ard Biesheuvel wrote:
>> The UEFI spec stipulates that unaligned accesses should be enabled
>> on CPUs that support them, which means all of them, given that we
>> no longer support pre-v7 ARM cores, and the AARCH64 bindings mandate
>> support for unaligned accesses unconditionally.
>>
>> This means that one should not assume that CopyMem () is safe to call
>> on regions that may be mapped using device attributes, which is the
>> case for the NOR flash. Since we have no control over the mappings when
>> running under the OS, and given that write accesses require device
>> mappings, we should not call CopyMem () in the read path either, but
>> use our own implementation that is guaranteed to take alignment into
>> account.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Ard Biesheuvel <[email protected]>
>
> That's a lot less complex, thanks.
> Reviewed-by: Leif Lindholm <[email protected]>
>

Pushed, thanks.
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to