<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm63xx/u-boot/drivers/tpm, branch master</title>
<subtitle>Broadcom-s U-Boot</subtitle>
<id>https://git.openwrt.org/project/bcm63xx/u-boot/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/bcm63xx/u-boot/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/'/>
<updated>2018-11-29T16:30:06Z</updated>
<entry>
<title>tpm: Export the open/close functions</title>
<updated>2018-11-29T16:30:06Z</updated>
<author>
<name>Simon Glass</name>
</author>
<published>2018-11-18T21:22:26Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=51f00c1704e505f51a02a3687e4384231ce8ae20'/>
<id>urn:sha1:51f00c1704e505f51a02a3687e4384231ce8ae20</id>
<content type='text'>
At present these functions are not accessible outside the TPM library, but
in some cases we need to call them. Export them in the header file and add
a define for the SHA1 digest size.

Also adjust tpm_open() to call tpm_close() first so that the TPM is in a
known state before opening (e.g. by a previous phase of U-Boot).

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>sandbox: tpm: Allow debugging of data packages</title>
<updated>2018-11-21T02:14:22Z</updated>
<author>
<name>Simon Glass</name>
</author>
<published>2018-11-06T22:21:23Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=04488c4d15189a05674962eba890396b498731cc'/>
<id>urn:sha1:04488c4d15189a05674962eba890396b498731cc</id>
<content type='text'>
This is not normally useful, so change the code to avoid writing out every
data package. This can be enabled with #define DEBUG.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>tpm: Use livetree and allow children</title>
<updated>2018-10-09T10:40:27Z</updated>
<author>
<name>Simon Glass</name>
</author>
<published>2018-10-01T18:22:27Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=c89d32a7b1acc6a16b1e749e93844f7364ceacbf'/>
<id>urn:sha1:c89d32a7b1acc6a16b1e749e93844f7364ceacbf</id>
<content type='text'>
Adjust the TPM drivers to use livetree (only one does not). Also,
sometimes TPMs can have child devices if they provide a service to the
system (such as storing secure data), so permit that.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>cros: Update cros_ec code to use struct udevice</title>
<updated>2018-10-09T10:40:27Z</updated>
<author>
<name>Simon Glass</name>
</author>
<published>2018-10-01T18:22:22Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=6322a7b63fb74d0f9ba5d027ef8299df7f796498'/>
<id>urn:sha1:6322a7b63fb74d0f9ba5d027ef8299df7f796498</id>
<content type='text'>
At present we pass around a private pointer to specify the cros_ec device.
With driver model it makes more sense to pass the device. Update the code
to do this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>tpm: Add support for SPL and TPL</title>
<updated>2018-10-09T10:40:27Z</updated>
<author>
<name>Simon Glass</name>
</author>
<published>2018-10-01T18:22:19Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=6307896c177e3afb54a42439062dce0776d31891'/>
<id>urn:sha1:6307896c177e3afb54a42439062dce0776d31891</id>
<content type='text'>
At present the tpm can only be used in U-Boot proper. Updated it to work
in SPL and TPL also.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>sandbox: tpm: Enhance to support the latest Chromium OS</title>
<updated>2018-10-09T10:40:27Z</updated>
<author>
<name>Simon Glass</name>
</author>
<published>2018-10-01T17:55:18Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=ef8a25006df35cafbd47a574681901d9b8f23000'/>
<id>urn:sha1:ef8a25006df35cafbd47a574681901d9b8f23000</id>
<content type='text'>
This driver was originally written against Chromium OS circa 2012. A few
new features have been added. Enhance the TPM driver to match. This mostly
includes a few new messages and properly modelling whether a particular
'space' is present or not.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>sandbox: tpm: Tidy up enums and return values</title>
<updated>2018-10-09T10:40:27Z</updated>
<author>
<name>Simon Glass</name>
</author>
<published>2018-10-01T17:55:17Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=998af319031f9c5ac89228e532a6802455c0f65b'/>
<id>urn:sha1:998af319031f9c5ac89228e532a6802455c0f65b</id>
<content type='text'>
Use an enum for command values instead of open-coding them. This removes
the need for comments. Also make sure the driver returns proper error
numbers instead of -1.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>tpm: sandbox: fix wrong assignment with a simplification</title>
<updated>2018-08-13T18:04:04Z</updated>
<author>
<name>Miquel Raynal</name>
</author>
<published>2018-08-05T16:53:07Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=46703cd9f383ea4175d1f231651f9edcfa51a423'/>
<id>urn:sha1:46703cd9f383ea4175d1f231651f9edcfa51a423</id>
<content type='text'>
The recv variable in sandbox_tpm2_fill_buf() is a pointer on a pointer
of a char array. It means accessing *recv is the char array pointer
itself while **recv is the first character of that array. There is no
need for such indirection here, so simplify the code.

Simplifying things will make the last assignment right: "*recv = NULL"
is now correct. The issue has been found by the following Coverity
Scan report:

    CID 183371:  Incorrect expression  (UNUSED_VALUE)
    Assigning value "4UL" to "*recv" here, but that stored value is overwritten before it can be used.
    232             *recv += sizeof(rc);
    233
    234             /* Add trailing \0 */
    235             *recv = NULL;

While at simplifying things, use '\0' instead of NULL when adding an
empty char at the end of the buffer.

Reported-by: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>tpm: sandbox: fix wrong check on pcr_map</title>
<updated>2018-08-13T18:04:04Z</updated>
<author>
<name>Miquel Raynal</name>
</author>
<published>2018-08-05T16:53:06Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=fd973ca6969e556bfeb74e69c5a6867785c9ea5c'/>
<id>urn:sha1:fd973ca6969e556bfeb74e69c5a6867785c9ea5c</id>
<content type='text'>
The second check on pcr_map in sandbox_tpm2_xfer() is wrong. It should
check for pcr_map not being empty. Instead, it is a pure copy/paste of
the first check which is redundant.

This has been found thanks to a Coverity Scan report:

    CID 183370:  Memory - illegal accesses  (UNINIT)
    Using uninitialized value "pcr_index".
        put_unaligned_be32(tpm-&gt;pcr_extensions[pcr_index], recv);

This is because pcr_index is initialized only if the user input is
correct, ie. at least one valid bit is set in pcr_map.

Fix the second check and also initialize pcr_index to 0 (which is
harmless in case of error) to make Coverity Scan happy.

Reported-by: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>tpm: make TPM_V2 be compiled by default</title>
<updated>2018-07-28T15:58:09Z</updated>
<author>
<name>Miquel Raynal</name>
</author>
<published>2018-07-19T20:35:11Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=58233075f972bacd2acfb47d1bc8fd069a1c3b10'/>
<id>urn:sha1:58233075f972bacd2acfb47d1bc8fd069a1c3b10</id>
<content type='text'>
TPM_V1 was already compiled by default. Now that both can be compiled
at the same time, compiled them both by default.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
