From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilias Apalodimas Date: Mon, 25 Jan 2021 10:36:32 +0200 Subject: [PATCH v3 08/11] tpm: Add an implementation of define_space In-Reply-To: <20210123102600.v3.8.Id0d4b4dbb1473da74703264f0b20940f1d65dd81@changeid> References: <20210123172607.2879600-1-sjg@chromium.org> <20210123102600.v3.8.Id0d4b4dbb1473da74703264f0b20940f1d65dd81@changeid> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Jan 23, 2021 at 10:26:04AM -0700, Simon Glass wrote: > Add support for this so that the TPM can be set up for use with > Chromium OS verified boot. > > Signed-off-by: Simon Glass > --- [...] > + /* > + * Fill the command structure starting from the first buffer: > + * - the password (if any) > + */ > + ret = pack_byte_string(command_v2, sizeof(command_v2), "s", > + offset, nv_policy, nv_policy_size); > + offset += nv_policy_size; Do we need to increase offsetr here? It doesn't seem to be used afterwards. > + if (ret) > + return TPM_LIB_ERROR; > + > + return tpm_sendrecv_command(dev, command_v2, NULL, NULL); > +} > + > u32 tpm2_pcr_extend(struct udevice *dev, u32 index, u32 algorithm, > const u8 *digest, u32 digest_len) > { > -- > 2.30.0.280.ga3ce27912f-goog >