chromiumos/platform/trunks.git
7 weeks agoChange the generation strategy from code to type descriptors. 40/37040/3 factory-4128.B factory-pit-4280.B factory-spring-4131.B factory-spring-4262.B master release-R28-4100.B stabilize-4068.0.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B
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>
14 months ago[trunks] add OWNERS 76/19776/1 factory-2268.16.B factory-2305.B factory-2338.B factory-2368.B factory-2394.B factory-2460.B factory-2475.B factory-2569.B factory-2717.B factory-2723.14.B factory-2846.B factory-2848.B factory-2914.B factory-2985.B factory-2993.B factory-3004.B factory-3536.B factory-spring-3842.B firmware-butterfly-2788.B firmware-link-2348.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-snow-2695.90.B firmware-snow-2695.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.B firmware-spring-3833.B firmware-stout-2817.B release-R20-2268.B release-R21-2465.B release-R22-2723.B release-R23-2913.B release-R25-3428.B release-R26-3701.B release-R27-3912.B stabilize stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-3881.0.B stabilize-3912.79.B stabilize-4008.0.B stabilize-4035.0.B stabilize-bluetooth-smart stabilize-daisy stabilize-link stabilize-link-2913.278 stabilize2 toolchain-3428.65.B toolchain-3701.42.B toolchainA
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>
20 months agoAdd dynamic library generation to Makefile. 71/8071/1 factory-1235.B factory-1284.B factory-1412.B factory-1987.B firmware-kiev-2.112.B firmware-uboot_v2-1299.B release-R16-1193.B release-R17-1412.B release-R18-1660.B release-R19-2046.B
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

21 months agoAdd unit test for structure and command parsing and generation 33/7433/3 factory-1020.B
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

21 months agoInitial version of trunks. This compiles and produces a running tpmc. 98/6798/8
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

21 months agoinit repo 71/6771/1 factory-980.B release-1011.B test-982.B
Luigi Semenzato [Fri, 26 Aug 2011 18:44:38 +0000 (11:44 -0700)]
init repo