Good questions.

1. The emulator needs three interfaces currently. The Version I mentioned is 
for the case that the emulator may need extra interface later in future for 
some new consideration, then we can just update the Version value and extend 
the structure with new interface, and no new protocol2 needs to be introduced.

2. I just tried to confirm Mike's idea as Mike replied to Ard with " This also 
allows the option to update the DXE Core module to optionally support emulators 
using a PCD Feature Flag and remove some logic if emulators are not required on 
a specific platform. ".


Thanks,
Star
-----Original Message-----
From: Ni, Ruiyu 
Sent: Friday, September 28, 2018 2:34 PM
To: Zeng, Star <star.z...@intel.com>; Kinney, Michael D 
<michael.d.kin...@intel.com>; Ard Biesheuvel <ard.biesheu...@linaro.org>
Cc: edk2-devel@lists.01.org; Zimmer, Vincent <vincent.zim...@intel.com>; 
Richardson, Brian <brian.richard...@intel.com>; Andrew Fish <af...@apple.com>; 
Leif Lindholm <leif.lindh...@linaro.org>; Dong, Eric <eric.d...@intel.com>; 
Gao, Liming <liming....@intel.com>; Carsey, Jaben <jaben.car...@intel.com>; 
Shi, Steven <steven....@intel.com>
Subject: Re: [PATCH v3 1/7] MdeModulePkg: introduce PE/COFF image emulator 
protocol

On 9/28/2018 11:08 AM, Zeng, Star wrote:
> Good idea.
> You prefer to introduce a new feature PCD for this with default value = TRUE?
> 
> Could we group the emulator APIs to one structure like below? And add a 
> Version field for potential further extension?
> 
> typedef struct {
>    UINTN                                           Version;
>    EDKII_PECOFF_IMAGE_EMULATOR_IS_IMAGE_SUPPORTED  IsImageSupported;
>    EDKII_PECOFF_IMAGE_EMULATOR_REGISTER_IMAGE      RegisterImage;
>    EDKII_PECOFF_IMAGE_EMULATOR_UNREGISTER_IMAGE    UnregisterImage;
> } PECOFF_IMAGE_EMULATOR;

Star,
What's the reason for the "Version" field? Can you explain the usage case?

And why do we need the PCD to control?

-- 
Thanks,
Ray
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to