Regards,
Ray

>-----Original Message-----
>From: edk2-devel [mailto:[email protected]] On Behalf Of Laszlo 
>Ersek
>Sent: Thursday, May 19, 2016 4:08 PM
>To: Ni, Ruiyu <[email protected]>; [email protected]
>Cc: Gao, Liming <[email protected]>
>Subject: Re: [edk2] [Patch] MdeModulePkg/PciHostBridgeDxe: Add CpuArch 
>protocol dependency
>
>On 05/19/16 09:17, Ruiyu Ni wrote:
>> The driver entry point calls gDS->SetMemorySpaceAttributes().
>> This interface may return EFI_NOT_AVAILABLE_YET when CPU Arch
>> protocol is not available.
>> So we need to list CpuArch protocol in its INF dependency section.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Ruiyu Ni <[email protected]>
>> Cc: Liming Gao <[email protected]>
>> ---
>>  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>> index ab5d87e..d8b0439 100644
>> --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>> +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>> @@ -52,4 +52,5 @@ [Protocols]
>>
>>  [Depex]
>>    gEfiCpuIo2ProtocolGuid AND
>> -  gEfiMetronomeArchProtocolGuid
>> +  gEfiMetronomeArchProtocolGuid AND
>> +  gEfiCpuArchProtocolGuid
>>
>
>This reminds me of commit f9a8be423cdd5:
>
>> Because gDS->SetMemorySpaceAttributes() is ultimately implemented by
>> EFI_CPU_ARCH_PROTOCOL.SetMemoryAttributes() -- see
>> "MdeModulePkg/Core/Dxe/Gcd/Gcd.c" and "ArmPkg/Drivers/CpuDxe/" -- we
>> add the CPU architectural protocol to the module's DepEx.

I saw the ArmVirtPkg/PciHostBridge driver set the MMIO to WB when
PcdKludgeMapPciMmioAsCache is TRUE.
So ArmVirtQemu platform cannot use the MdeModulePkg/PciHostBridge.
Is my understanding right?
Do you have any solution?

>
>Reviewed-by: Laszlo Ersek <[email protected]>
>_______________________________________________
>edk2-devel mailing list
>[email protected]
>https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to