[if gte mso 9]>

Re: [edk2] Proposal: Update the two PCD drivers and the build tool to use external PCD database files

Subject: Re: [edk2] Proposal: Update the two PCD drivers and the build tool to use external PCD database files

From: "Hauch, Larry" <larry.hauch@intel.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2012-03-07 23:11:40

Hi Kirby,

Thanks for the suggestion!

I can see where this might be appropriate when testing a driver that is loaded by the shell from media and not built into the flash device’s firmware image.

The proposal handles all PCDs from both source and binary drivers that are assembled into the firmware image.

Cheers,

Larry

 

From: kirby xin [mailto:kirby.xin@gmail.com]
Sent: Tuesday, March 06, 2012 6:32 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Proposal: Update the two PCD drivers and the build tool to use external PCD database files

 

Hi Larry,

    an implementation for reference.

    maybe we can update two PCD drivers to add a function that support append Dynamic or DynamicEx PCDS to Database, if the driver contains Dynamic or DynamicEx PCD information, function AppendPCDstoDatabase will be called in driver entry.(build process handle this, just like LibConstructor). then all the Dynamic or DynamicEx PCDS are managed by PCD drivers, even binary driver.

 

   Thanks

   Kirby

 

On Tue, Mar 6, 2012 at 1:21 AM, Hauch, Larry <larry.hauch@intel.com> wrote:

Hi Sergey,

 

There are two PCD drivers that manage access for the Dynamic and DynamicEx PCDs. These two drivers use an internal structure for these types of PCDs. Since these PCDs can be modified during runtime, the structure is referred to as a ‘database’.

Currently the structure and the content is generated by during the AutoGen process; the content is fixed at build time using PCDs specified in the INF files which are built sources specified in the INF files listed in the DSC file. Every time a Dynamic or DynamicEx PCD value changes in the DSC/FDF file, at least one of the drivers must be recompiled.

The proposal is to generate these structures based on the Dynamic and DynamicEx PCDs used in the firmware image – including things like binary distributions of drivers whose INF files are only listed in the FDF file.

We considered a couple of solutions. The first just extends the build to start looking at INFs that are listed in the FDF file to see if there are any DynamicEx PCDs listed in ‘binary only’ INFs, then adding those PCDs into the structure generated for the two PCD drivers. The two PCD drivers could then be built from source. This would require putting some extra dependency checks on the FDF file and the ‘binary only’ INF files listed in just the FDF file, to ensure that all of the DynamicEx PCDs are exposed. This solution does not eliminate recompiling at least one of the PCD drivers every time a Dynamic or DynamicEx PCD’s value changes.

The second solution of using an external binary file which contains the Dynamic and DynamicEx PCD information is our  proposed implementation – it will allow adding binary only module’s DynamicEx PCDs to the file just prior to the tools automatically putting the file into an EFI SECTION RAW in the FFS. This will also mean that you could add a binary driver into your final firmware image without having to rebuild the two PCD driver modules, as only the binary file would need to be updated. This solution also eliminates the necessity to recompile the drivers if only a value is changed.

 

Cheers,

Larry

 

From: Sergey Isakov [mailto:isakov-sl@bk.ru]
Sent: Sunday, March 04, 2012 12:59 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Proposal: Update the two PCD drivers and the build tool to use external PCD database files

 

Hi Elmer,

I am not clear what is mean "PCD database file"?

When I created efi application consisting from separate modules then the same PCD value may be used in all modules. But if constant.

If this is dynamic PCD then changing the value in one module will not influence on another. Or you mean that the value will be written to a Database file?

I think the some kind of Protocol should be installed so PcdDynamic will be accessed through it.

But in this case the protocol will be flexible.

Never use variable in headers such as AutoGen.h!

 

Regards,

Sergey

 

 

On 03.03.2012, at 9:56, Amaya, Elmer A wrote:

 

Hi All,

 

We’re investigating how to allow third party binary drivers with DynamicEx PCDs be merged into the existing PCD database files.  Currently, the two PCD drivers (MdeModulePkg/Universal/PCD/Pcd/Pei and MdeModulePkg/Universal/PCD/Dxe) have their ‘databases’ built into each driver, using data structures generated in their AutoGen.h files. The PCDs present in the databases are only derived from source modules and DynamicEx PCDs listed in binary drivers cannot be merged into the existing PCD database AutoGen.h data structures.  Making the database content external to the drivers will allow the build system’s AutoGen process to generate databases that contain all DynamicEx PCDs content. This will ensure that the PCD drivers contain all necessary PCDs, including PCDs from binary modules from third party vendors that want to use PCDs.

 

Therefore, in order to allow third party binary drivers with DynamicEx PCDs to have their PCDs merged into the PCD database files, we are proposing updating the two PCD drivers and the build tool to use external PCD database files.

 

I would like to get your feedback/comments no later than end of day March 15, 2012.  If proposal is accepted, I will follow up with detail proposal and patch implementation for your review.

 

Thanks,

Elmer Amaya

Sr. Technical Marketing Engineer

Intel Corporation

Office: +1 253.371.8363

 

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

 


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel