[coreboot-gerrit] Change in coreboot[master]: drivers/i2c/tpm: use iobuf library for marshaling commands
Furquan Shaikh (Code Review)
gerrit at coreboot.org
Mon Apr 3 22:55:39 CEST 2017
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/19063 )
Change subject: drivers/i2c/tpm: use iobuf library for marshaling commands
......................................................................
Patch Set 2: Code-Review+2
(2 comments)
This looks like a great cleanup! It provides way-better and consistent error checking without having the caller to worry about that.
https://review.coreboot.org/#/c/19063/2/src/lib/tpm2_marshaling.c
File src/lib/tpm2_marshaling.c:
Line 105: if (obuf_splice(ob, &ob_sz, obuf_nr_written(ob), sizeof(uint32_t)) < 0)
> Might make sense to turn this sequence into a helper. i.e. splice_from_curr
Yes, that would be a useful helper function!
https://review.coreboot.org/#/c/19063/2/src/lib/tpm2_tlcl.c
File src/lib/tpm2_tlcl.c:
Line 46: if (tis_sendrecv(sendb, out_size, cr_buffer_ptr, &in_size)) {
> I want to introduce an struct tpm_cmd that deals with managing the buffers
That makes sense. I believe here is where the struct iobuf {} that you mentioned on the earlier CL comes into picture.
--
To view, visit https://review.coreboot.org/19063
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iec0bbff1312e8e6ec616d1528db8667f32e682c9
Gerrit-PatchSet: 2
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-HasComments: Yes
More information about the coreboot-gerrit
mailing list