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_IDLE_TABLE|0x00010080|0x0E000200-0x0E0002FF > ``` What does 0x00010080 mean here? > > * 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? [snip] Thanks Laszlo _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

