History log of /external/tpm2/generator/generator.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
00c8cfeb8e8f428b268e38ce398f9f41e2559591 06-Oct-2015 Vadim Bendebury <vbendeb@chromium.org> generator: no not duplicate unmarshaling errors

It turns out that TCG TPM2 library specification Part 2 re-defines in
Table 17 values included in Table 2.

Let's drop Table 2 from parsing, as Table 17 is much more extensive
and includes actual values.

BUG=chrome-os-partner:44608
TEST=it still compiles

Change-Id: Ie84e8a62e1c8f319a7ed1fdd9c480b3b4b84d857
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/305388
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
/external/tpm2/generator/generator.py
595736f2120e594839d6e73cb8245d8d7e5c2360 18-Sep-2015 Vadim Bendebury <vbendeb@chromium.org> generator: modify the scripts to process HTML sources

The scripts scraping TPM2 specification are being changed to use the
specification directly (in HTML forms). The existing modules
(command_generator and structure_generator) are being modified to
provide the 'back end processing' for the data retrieved by the new
scraper (extract_structures and tpm_table).

The test is modified to still pass, test_structure_generator.html is
the source of test data.

README includes instructions how to re-generate the source code.

BUG=chromium:501639
TEST=new code generation works fine, the test also passes:
$ ./generator/structure_generator_test.py
.......
----------------------------------------------------------------------
Ran 7 tests in 0.007s

OK

Change-Id: I2a0e925475d4cd2b57528bfe1b162245fc6e0f43
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/300662
/external/tpm2/generator/generator.py
b85286c8c88af688bd3f1f31a269dfae51f57689 15-Sep-2015 Vadim Bendebury <vbendeb@chromium.org> generator: make pylint happy again

There have been a few pylint violations in the generator code, this
patch fixes them.

BUG=none
TEST=the following command succeeds:
$ pylint --rcfile=../../../chromite/pylintrc generator/*py

the below command generates exactly the same set of files as before
this change:

$ ./generator/generator.py generator/structures.txt generator/commands.txt

Change-Id: I86384cdd44a20f16f7d5dc300189a50210c08efa
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/299709
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
/external/tpm2/generator/generator.py
3cd8526c535baca0947adccb82f8ef71cb45ba4c 05-Sep-2015 Vadim Bendebury <vbendeb@chromium.org> generator: do not carry around unnecessary data

All classes derived from TPMObject in structure_generator.py have
their parsing functions both adding the new objects to the objects'
map and returning all newly created objects in a list.

Both the list and the map are carried around, but the list can be
always derived from the map when necessary.

This patch removes unnecessary list management code and derives the
list from the map where necessary.

BUG=chromium:501639
TEST=verified that running

$ generator/generator.py generator/structures.txt \
generator/commands.txt

generates exactly the same output as before this change.

Change-Id: I08cee1725175295f7af5b635f4095fab1d628aaf
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/297738
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
/external/tpm2/generator/generator.py
834209c3c4e7678d2b54a8de4223de8a8fd9c114 05-Sep-2015 Vadim Bendebury <vbendeb@chromium.org> generator: sort generated TPM types

This patch does not introduce any functional change, it just sorts by
name the types generated by StructureParser to make it easier to
verify future scripts' changes by comparing generated files.

BUG=chromium:501639
TEST=after regenerating source files made sure they still compile
fine (about to be submitted in the upcoming patch)

Change-Id: I6cc42a95a492b3bae33d57780121fad25a9caa80
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/297736
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
/external/tpm2/generator/generator.py
d02d5b7076ec51d855c61a67897286b80ef436c2 05-Aug-2015 Jocelyn Bohr <bohr@chromium.org> Scripts to generate functions for command marshaling.

- command_generator.py (modified from platform2/trunks)
* Takes in file as outputted by extract_commands.sh and outputs C code
to unmarshal command request arguments, execute command, and marshal
command response arguments.
* Input: commands.txt
* Output: $COMMAND_fp.h, Marshal_$COMMAND.c, CommandDispatcher.c,
HandleProcess.c
- generator.py
* Invokes structure_generator.py and command_generator.py. This is
needed because command_generator uses typemap outputted by
structure_generator. It is also more readable.

TEST=Generated code builds with libtpm2.
BUG=chromium:501639

CQ-DEPEND=CL:289805

Change-Id: Ie83b70251c71629cefb135218e7fd1daf479a182
Reviewed-on: https://chromium-review.googlesource.com/290556
Reviewed-by: Jocelyn Bohr <bohr@chromium.org>
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
Commit-Queue: Jocelyn Bohr <bohr@chromium.org>
Tested-by: Jocelyn Bohr <bohr@chromium.org>
/external/tpm2/generator/generator.py