On 6 November 2015 at 15:19, Mark Rutland <[email protected]> wrote:
> On Fri, Nov 06, 2015 at 03:03:57PM +0100, Ard Biesheuvel wrote:
>> Add a function to ArmLib that provides access to the Cache Writeback
>> Granularity (CWG) field in CTR_EL0. This information is required when
>> performing non-coherent DMA.
>
> Nit: s/Granularity/Granule/
>
> Likewise for the patch body.
>
OK
> [...]
>
>> +UINTN
>> +EFIAPI
>> +ArmCacheWritebackGranularity (
>> + VOID
>> + )
>> +{
>> + UINTN CWG;
>> +
>> + CWG = (ArmCacheInfo () >> 24) & 0xf; // CTR_EL0.CWG
>> +
>> + if (CWG == 0) {
>> + return SIZE_512KB;
>> + }
>
> This should be SIZE_2KB, no?
>
> The ARM ARM says the architectural maximum is 512 /words/ (i.e. 2KB).
>
Yes, thanks for spotting that.
> With those changes:
>
> Reviewed-by: Mark Rutland <[email protected]>
>
Thank you,
Ard.
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel