summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Luigi Semenzato [Wed, 31 Oct 2012 18:54:59 +0000 (11:54 -0700)]
Change the generation strategy from code to type descriptors.
This changes the way marshalling/unmarshalling is done.
Previously the code generator would produce a C function
for each structure. With this change, the layout of a
structure is encoded in an array of bytes, and a piece
of generic code traverses the array and performs the
required operations.
The main reason to do this is a reduced footprint, at the expense
of some marshal/unmarshal overhead (but the TPM is so slow that
the impact of this overhead should be negligible).
Version with generated marshallers:
semenzato@semenzato:~/trunks$ size tpmc
text data bss dec hex filename
188243 4172 48 192463 2efcf tpmc
version with interpreter-based marshalling:
semenzato@semenzato:~/trunks$ size tpmc
text data bss dec hex filename
64655 8404 48 73107 11d93 tpmc
Both of them contain the marshalling/unmarshalling code for all commands.
For a small subset of commands, the generated-code version is probably
still smaller, but the interpreted version is small enough that
this won't be a concern even in the firmware.
This change also adds the command TPM_GetTestResults.
BUG=chromium-os:19488
TEST=none
Change-Id: I2f5b30b480a0efcc4aa3db280aab20ec25681bab
Reviewed-on: https://gerrit.chromium.org/gerrit/37040
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Elly Jones [Fri, 6 Apr 2012 19:32:28 +0000 (15:32 -0400)]
[trunks] add OWNERS
TEST=None
BUG=chromium-os:22007
Change-Id: I68d4a1f865ff6c0fb3e15167da041bcb7af6e4c7
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Luigi Semenzato [Wed, 21 Sep 2011 21:02:20 +0000 (14:02 -0700)]
Add dynamic library generation to Makefile.
Also fix a missing dependency, and add another ignored command.
BUG=None
TEST=ran "make" and nm on the resulting .so file.
Change-Id: Ib4f2777117b1c02b96f70832d2e490e66bcdfb31
Luigi Semenzato [Thu, 8 Sep 2011 22:28:05 +0000 (15:28 -0700)]
Add unit test for structure and command parsing and generation
This tests the parser and generator for the TPM structures and commands
by comparing input and output for a small case.
BUG=chromium-os:19488
TEST=ran "ttl-generator.py test"
Change-Id: Ie4edad43ce95af4c04d751164ba98ac5837d4fa5
Luigi Semenzato [Fri, 26 Aug 2011 22:52:04 +0000 (15:52 -0700)]
Initial version of trunks. This compiles and produces a running tpmc.
BUG=chromium-os:19488
TEST=ran tpmc and successfully executed several plain and authorized commands
Change-Id: Iac692e7ae8b2fbff2af2cdf816b942883cf11352
Luigi Semenzato [Fri, 26 Aug 2011 18:44:38 +0000 (11:44 -0700)]
init repo