Ersek:
  I add my comments. 

Thanks
Liming
> -----Original Message-----
> From: edk2-devel [mailto:[email protected]] On Behalf Of
> Laszlo Ersek
> Sent: Thursday, May 19, 2016 5:26 PM
> To: Kinney, Michael D <[email protected]>
> Cc: [email protected] <[email protected]>
> Subject: Re: [edk2] [RFC] Structured PCD Proposal
> 
> On 05/19/16 01:28, Kinney, Michael D wrote:
> 
> [snip]
> 
> > ## C Structure Syntax Proposal
> >   * Use C typedef syntax to describe complex C structures
> >   * Use a C language parser with support for struct/union/array/bit
> fields/pack
> >   * Recommend use of libclang C language parser into Abstract Syntax Tree
> (AST)
> >     - Included with LLVM release
> >     - http://llvm.org/releases/download.html
> >     - http://clang.llvm.org/doxygen/group__CINDEX.html
> >   * Recommend use of Python bindings for CLANG for EDK II Python based
> BaseTools
> >     - pip install clang
> 
> What versions are necessary? On RHEL-7, the following versions are
> available (from EPEL only; RHEL does not provide clang):
> 
> clang-devel: 3.4.2-8.el7
> python-pip: 7.1.0-1.el7
> 
> >
> > ## DEC File Extensions
> >   * Declare link between PCD and C data structure and token range for
> fields
> >   * @Include path to include file with C typedef [Required]
> >   * Replace |VOID*| with name of C typedef
> >   * @TokenMap path to file with token number assignments [Optional]
> >   * Range of token numbers to assign to fields in C typedef [Required]
> >   * Example:
> >
> > ```
> > # @Include  Include/Pcd/AcpiLowerPowerIdleTable.h
> > # @TokenMap Include/Pcd/AcpiLowerPowerIdleTable.map
> >
> gPlatformTokenSpaceGuid.AcpiLowPowerIdleTable|{}|ACPI_LOW_POWER_I
> DLE_TABLE|0x00010080|0x0E000200-0x0E0002FF
> > ```
> 
> What does 0x00010080 mean here?
[Liming] It is PCD token space GUID. 0x0E000200-0x0E0002FF are for its field 
PCD token space GUID. 
> 
> >
> >   * Recommended File Paths
> >     - <PackageName>/Include/Pcd/<StructuredPcdName>.h
> >     - <PackageName>/Include/Pcd/<StructuredPcdName>.map  [Optional]
> >     - <PackageName>/Include/Pcd/<StructuredPcdName>.uni  [Optional]
> >   * C Pre-Processor Support
> >     - Use of #include, #define, #if supported
> >     - #include limited to files in same package
> >     - Including files from other packages being evaluated
> >
> > ## C Structure Syntax
> >   * Support struct/union/array with nesting
> >   * Support bit fields
> 
> Bit fields will require new PcdLib interaces, right?
[Liming] Yes. Bit Fields access will use new PcdFieldXXX APIs. 
> 
> [snip]
> 
> Thanks
> Laszlo
> _______________________________________________
> 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