On 04/08/16 19:20, Laszlo Ersek wrote:
> On 04/08/16 11:44, Ard Biesheuvel wrote:

>> +  if (SwapBytes64 (Reg[1]) >= 0x18) {
>> +    mFwCfgDmaAddress  = mFwCfgDataAddress + 0x10;
> 
> Ditto; please drop the "m" from both.
> 
>> +    FwCfgDmaSize      = 0x08;
>> +
>> +    //
>> +    // See explanation above.
>> +    //
>> +    ASSERT (mFwCfgDmaAddress <= MAX_UINTN - FwCfgDmaSize + 1);
> 
> Please drop the "m".
> 
> Furthermore, in the original code, PcdFwCfgDmaAddress is set here.
> However, in this code, we should *not* set mFwCfgDmaAddress just yet.
> 
>> +
>> +    DEBUG ((EFI_D_INFO, "Found FwCfg DMA @ 0x%Lx\n", mFwCfgDmaAddress));
> 
> Please drop the "m".
> 
>> +  }
>>  
>>    if (InternalQemuFwCfgIsAvailable ()) {
>>      UINT32 Signature;
>> @@ -128,13 +184,12 @@ QemuFwCfgInitialize (
>>        // For DMA support, we require the DTB to advertise the register, and 
>> the
>>        // feature bitmap (which we read without DMA) to confirm the feature.
>>        //
>> -      if (PcdGet64 (PcdFwCfgDmaAddress) != 0) {
>> +      if (mFwCfgDmaAddress != 0) {
> 
> Please drop the "m".

... and FwCfgDmaAddress should be set to zero if the Reg[1] check, at
the top, fails.

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to