History log of /external/tpm2/generator/tpm_table.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f7a858fecd80d2e4e28cb86807446f740b49498d 28-Oct-2015 Vadim Bendebury <vbendeb@chromium.org> generator: remove debug leftover

Some debug code was inadvertently left behind in the html file parser,
this patch removes it.

BUG=chrome-os-partner:43025
TEST=re-generated marshaling code and fixed a few typos in the source
code. Now all tests pass.

Change-Id: I406e47d2661b31b70a600c4968221a18323513fa
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/309304
Commit-Ready: Vadim Bendebury <vbendeb@google.com>
Tested-by: Vadim Bendebury <vbendeb@google.com>
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
/external/tpm2/generator/tpm_table.py
f5af8595c277e36541c688f7803e106cebb65fd2 15-Oct-2015 Vadim Bendebury <vbendeb@chromium.org> generator: avoid nested invocations for marshaling/unmarshaling

A lot of TPM objects are in fact simple integers one, two or four
bytes in size. The TPM2 library spec defines some fairly long type
chains which in the end of the day are just simple integers. The
currently generated marshaling/unmarshaling code follows these chains
causing multiple nested invocations, which is both a waste of time and
stack space.

This patch modifies generated code to shortcut to the lowest base type
when marshaling/unmarshaling integer base objects.

BUG=none
TEST=the generated code passes the same set of tests as before this
change.

Change-Id: I2c5028cd32f5d74f6fa6ab9919d5c6e0c5b9fea4
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/305599
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
/external/tpm2/generator/tpm_table.py
79d7cb1b33b5f6df1fa3de886deee22a8682c196 06-Oct-2015 Vadim Bendebury <vbendeb@chromium.org> generator: define unions with conditions

Many TPM objects - unions include fields for different algorithms.
These fields need to be included only if the algorithm support is
compiled in, otherwise there is a mismatch between the expected and
actual maximum size of the union.

BUG=chrome-os-partner:44608
TEST=verified that generated code uses compilation guards where
appropriate.

Change-Id: I8ff51b23c951b369c19fa81f0952219edfbb39e6
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/305494
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
/external/tpm2/generator/tpm_table.py
18cbc3beac3a4e427dd30639019e876dd7c53644 06-Oct-2015 Vadim Bendebury <vbendeb@chromium.org> generator: do not mix ECC and RSA types

Some tables in TCG TPM2 Specification Part 2 use so called algorithm
macros, which allow specify subsets of algorithms included in Table 9.
In certain cases the macros expand to a wider than necessary subset,
this is where the basic algorithm dependency included in the table
header in curly brackets ({ECC} or {RSA}) is coming in.

The dependency included in the table header must match the value in
the fourth column in table 9.

BUG=chrome-os-partner:44608
TEST=verified that generated code uses updated algorithm subsets

Change-Id: I7b007ead8888df80a208c4bb0949a85173427875
Reviewed-on: https://chromium-review.googlesource.com/305492
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
/external/tpm2/generator/tpm_table.py
026860ae10af172f36a5c72a728eb50253b45cd7 29-Sep-2015 Vadim Bendebury <vbendeb@chromium.org> generator: honor conditional field types

Some fields in the TMP objects are 'conditional', i.e. can be either
present or not in the marshaled data. Those fields are marked with the
trailing plus sign in the TCG TPM2 library specification Part 2. This
patch makes sure that the generated code accounts for these suffixes,
when present.

BUG=chrome-os-partner:44608
TEST=the list of 69 test fixed by this patch can be found in
https://goo.gl/KIxxyM

Change-Id: I0fddcad867333bd13e03b4ab12d2ff5e9898cc26
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/305490
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
/external/tpm2/generator/tpm_table.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/tpm_table.py