Tim Wawrzynczak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 2 new timestamps to indicate the beginning and end of EC software sync.
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/sync_ec.c 2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/1
diff --git a/src/commonlib/include/commonlib/timestamp_serialized.h b/src/commonlib/include/commonlib/timestamp_serialized.h index 7b1a730..b6c7c4f 100644 --- a/src/commonlib/include/commonlib/timestamp_serialized.h +++ b/src/commonlib/include/commonlib/timestamp_serialized.h @@ -82,6 +82,8 @@ TS_START_COPYVPD = 550, TS_END_COPYVPD_RO = 551, TS_END_COPYVPD_RW = 552, + TS_START_EC_SYNC = 553, + TS_END_EC_SYNC = 554,
/* 900-920 reserved for vendorcode extensions (900-940: AMD AGESA) */ TS_AGESA_INIT_RESET_START = 900, @@ -202,6 +204,9 @@ { TS_END_COPYVPD_RO, "finished loading Chrome OS VPD (RO)" }, { TS_END_COPYVPD_RW, "finished loading Chrome OS VPD (RW)" },
+ { TS_START_EC_SYNC, "starting EC software sync" }, + { TS_END_EC_SYNC, "finished EC software sync" }, + { TS_DC_START, "depthcharge start" }, { TS_RO_PARAMS_INIT, "RO parameter init" }, { TS_RO_VB_INIT, "RO vboot init" }, diff --git a/src/security/vboot/sync_ec.c b/src/security/vboot/sync_ec.c index f40934b..6c3c55a 100644 --- a/src/security/vboot/sync_ec.c +++ b/src/security/vboot/sync_ec.c @@ -55,6 +55,8 @@ vb2_error_t retval = 0; uint8_t *p;
+ timestamp_add_now(TS_START_EC_SYNC); + /* Init workspace, VBNB, etc. */ ctx.workbuf_size = VB2_FIRMWARE_WORKBUF_RECOMMENDED_SIZE; ctx.workbuf = temp_workbuf; @@ -330,6 +332,7 @@ /* Callback for when Vboot is finished */ vb2_error_t VbExEcVbootDone(int in_recovery) { + timestamp_add_now(TS_END_EC_SYNC); return VB2_SUCCESS; }
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#2).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 2 new timestamps to indicate the beginning and end of EC software sync.
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/sync_ec.c 2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/2
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#3).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 2 new timestamps to indicate the beginning and end of EC software sync.
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c 2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/3
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#4).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 2 new timestamps to indicate the beginning and end of EC software sync.
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c 2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/4
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#5).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 2 new timestamps to indicate the beginning and end of EC software sync.
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c 2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/5
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#7).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 2 new timestamps to indicate the beginning and end of EC software sync.
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c 2 files changed, 16 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/7
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 8: Code-Review+2
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#9).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 2 new timestamps to indicate the beginning and end of EC software sync.
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c 2 files changed, 16 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/9
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 9:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36209/9/src/security/vboot/ec_sync.... File src/security/vboot/ec_sync.c:
https://review.coreboot.org/c/coreboot/+/36209/9/src/security/vboot/ec_sync.... PS9, Line 148: Might be worth to put another one here to see how long the hash took to become ready?
https://review.coreboot.org/c/coreboot/+/36209/9/src/security/vboot/ec_sync.... PS9, Line 425: ...and maybe one here so we can see how long we looped over limit power?
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 9:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36209/9/src/security/vboot/ec_sync.... File src/security/vboot/ec_sync.c:
https://review.coreboot.org/c/coreboot/+/36209/9/src/security/vboot/ec_sync.... PS9, Line 148:
Might be worth to put another one here to see how long the hash took to become ready?
Sounds reasonable to me.
https://review.coreboot.org/c/coreboot/+/36209/9/src/security/vboot/ec_sync.... PS9, Line 425:
... […]
Also sounds reasonable to me.
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#10).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 4 new timestamps to the EC software sync flow: 1) Beginning of EC software sync 2) EC finished calculating Vboot hash 3) EC is no longer requesting power limiting 4) End of EC software sync
BUG=none BRANCH=none TEST=verified timestamps show up in cbmem log
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c 2 files changed, 22 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/10
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#11).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 4 new timestamps to the EC software sync flow: 1) Beginning of EC software sync 2) EC finished calculating Vboot hash 3) EC is no longer requesting power limiting 4) End of EC software sync
BUG=none BRANCH=none TEST=verified timestamps show up in cbmem log
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c 2 files changed, 24 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/11
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36209/11/src/security/vboot/ec_sync... File src/security/vboot/ec_sync.c:
https://review.coreboot.org/c/coreboot/+/36209/11/src/security/vboot/ec_sync... PS11, Line 444: rv = VB2_SUCCESS; nit: unnecessary (is already initialized to that)
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#13).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 4 new timestamps to the EC software sync flow: 1) Beginning of EC software sync 2) EC finished calculating Vboot hash 3) EC is no longer requesting power limiting 4) End of EC software sync
BUG=none BRANCH=none TEST=verified timestamps show up in cbmem log
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c 2 files changed, 21 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/13
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 13:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36209/13/src/security/vboot/ec_sync... File src/security/vboot/ec_sync.c:
https://review.coreboot.org/c/coreboot/+/36209/13/src/security/vboot/ec_sync... PS13, Line 159: timestamp_add_now(TS_EC_HASH_READY); Should we add it only when we return success? That will be consistent with other error scenarios where HASH_READY timestamp is not added?
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 15:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36209/13/src/security/vboot/ec_sync... File src/security/vboot/ec_sync.c:
https://review.coreboot.org/c/coreboot/+/36209/13/src/security/vboot/ec_sync... PS13, Line 159: timestamp_add_now(TS_EC_HASH_READY);
Should we add it only when we return success? That will be consistent with other error scenarios whe […]
I figured leave it in, even if it returns the wrong type or doesn't finish, we'll have a timestamp saying it at least went through this path. Thoughts?
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 15: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/36209/13/src/security/vboot/ec_sync... File src/security/vboot/ec_sync.c:
https://review.coreboot.org/c/coreboot/+/36209/13/src/security/vboot/ec_sync... PS13, Line 159: timestamp_add_now(TS_EC_HASH_READY);
I figured leave it in, even if it returns the wrong type or doesn't finish, we'll have a timestamp s […]
I don't think it matters tbh.
Joel Kitching has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 15:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36209/15/src/commonlib/include/comm... File src/commonlib/include/commonlib/timestamp_serialized.h:
https://review.coreboot.org/c/coreboot/+/36209/15/src/commonlib/include/comm... PS15, Line 198: body hash Might want to specify *what* we're hashing here, now that we are adding EC hashing. Same with the name TS_DONE_HASHING.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 15:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36209/15/src/commonlib/include/comm... File src/commonlib/include/commonlib/timestamp_serialized.h:
https://review.coreboot.org/c/coreboot/+/36209/15/src/commonlib/include/comm... PS15, Line 198: body hash
Might want to specify *what* we're hashing here, now that we are adding EC hashing. […]
That's fair. Done.
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#16).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 4 new timestamps to the EC software sync flow: 1) Beginning of EC software sync 2) EC finished calculating Vboot hash 3) EC is no longer requesting power limiting 4) End of EC software sync
BUG=none BRANCH=none TEST=verified timestamps show up in cbmem log
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c M src/security/vboot/vboot_logic.c 3 files changed, 24 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/16
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 17: Code-Review+2
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#19).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 4 new timestamps to the EC software sync flow: 1) Beginning of EC software sync 2) EC finished calculating Vboot hash 3) EC is no longer requesting power limiting 4) End of EC software sync
BUG=none BRANCH=none TEST=verified timestamps show up in cbmem log
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c M src/security/vboot/vboot_logic.c 3 files changed, 24 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/19
Joel Kitching has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 19:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... File src/commonlib/include/commonlib/timestamp_serialized.h:
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... PS19, Line 74: TS_START_HASH_BODY = 507, : TS_DONE_LOADING = 508, : TS_DONE_HASHING_FW_MAIN = 509, Now I'm a little confused here -- is BODY the same as FW_MAIN? Or are these distinct things?
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... PS19, Line 211: W w
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 19:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... File src/commonlib/include/commonlib/timestamp_serialized.h:
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... PS19, Line 74: TS_START_HASH_BODY = 507, : TS_DONE_LOADING = 508, : TS_DONE_HASHING_FW_MAIN = 509,
Now I'm a little confused here -- is BODY the same as FW_MAIN? Or are these distinct things?
Same thing as far as I understand it. I'll change START too.
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... PS19, Line 211: W
w
Done
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 19:
(3 comments)
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... File src/commonlib/include/commonlib/timestamp_serialized.h:
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... PS19, Line 75: TS_DONE_LOADING = 508, nit: If you clarify DONE_HASHING, you should clarify this one too (this is loading the firmware body)
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... PS19, Line 74: TS_START_HASH_BODY = 507, : TS_DONE_LOADING = 508, : TS_DONE_HASHING_FW_MAIN = 509,
Same thing as far as I understand it. I'll change START too.
Yes, but I liked "BODY" better as the terminology here tbh.
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... PS19, Line 199: { TS_END_HASH_BODY, "finished verifying body signature (RSA)" }, All these timestamps talk about "body" either change them all or none of them (I don't see why it needs changing). Note that all the vboot timestamps will normally be together so I think it should be clear enough what is meant with body hash here.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 19:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... File src/commonlib/include/commonlib/timestamp_serialized.h:
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... PS19, Line 74: TS_START_HASH_BODY = 507, : TS_DONE_LOADING = 508, : TS_DONE_HASHING_FW_MAIN = 509,
Yes, but I liked "BODY" better as the terminology here tbh.
Done
https://review.coreboot.org/c/coreboot/+/36209/19/src/commonlib/include/comm... PS19, Line 199: { TS_END_HASH_BODY, "finished verifying body signature (RSA)" },
All these timestamps talk about "body" either change them all or none of them (I don't see why it ne […]
It's all the same to me, I'll change it back.
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#20).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 4 new timestamps to the EC software sync flow: 1) Beginning of EC software sync 2) EC finished calculating Vboot hash 3) EC is no longer requesting power limiting 4) End of EC software sync
BUG=none BRANCH=none TEST=verified timestamps show up in cbmem log
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c 2 files changed, 21 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/20
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 20: Code-Review+2
(2 comments)
https://review.coreboot.org/c/coreboot/+/36209/20/src/commonlib/include/comm... File src/commonlib/include/commonlib/timestamp_serialized.h:
https://review.coreboot.org/c/coreboot/+/36209/20/src/commonlib/include/comm... PS20, Line 86: TS_EC_HASH_READY = 554, nit: I think there's an intentional split between vboot stuff and non-vboot stuff here, so maybe insert these at 515 instead?
https://review.coreboot.org/c/coreboot/+/36209/20/src/security/vboot/ec_sync... File src/security/vboot/ec_sync.c:
https://review.coreboot.org/c/coreboot/+/36209/20/src/security/vboot/ec_sync... PS20, Line 473: timestamp_add_now(TS_END_EC_SYNC); nit: Is there a reason this is here and not at the end of vboot_sync_ec()? That would seem a bit more natural to me...
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 20:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36209/20/src/commonlib/include/comm... File src/commonlib/include/commonlib/timestamp_serialized.h:
https://review.coreboot.org/c/coreboot/+/36209/20/src/commonlib/include/comm... PS20, Line 86: TS_EC_HASH_READY = 554,
nit: I think there's an intentional split between vboot stuff and non-vboot stuff here, so maybe ins […]
Fair enough.
https://review.coreboot.org/c/coreboot/+/36209/20/src/security/vboot/ec_sync... File src/security/vboot/ec_sync.c:
https://review.coreboot.org/c/coreboot/+/36209/20/src/security/vboot/ec_sync... PS20, Line 473: timestamp_add_now(TS_END_EC_SYNC);
nit: Is there a reason this is here and not at the end of vboot_sync_ec()? That would seem a bit mor […]
Now that you say something it does look kinda weird. Will move.
Hello Aaron Durbin, Karthik Ramasubramanian, Julius Werner, Duncan Laurie, Shelley Chen, build bot (Jenkins), Joel Kitching, Furquan Shaikh, Patrick Georgi,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36209
to look at the new patch set (#21).
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 4 new timestamps to the EC software sync flow: 1) Beginning of EC software sync 2) EC finished calculating Vboot hash 3) EC is no longer requesting power limiting 4) End of EC software sync
BUG=none BRANCH=none TEST=verified timestamps show up in cbmem log
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c 2 files changed, 22 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/36209/21
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
Patch Set 22: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/36209 )
Change subject: security/vboot/sync_ec: Add timestamps ......................................................................
security/vboot/sync_ec: Add timestamps
Add 4 new timestamps to the EC software sync flow: 1) Beginning of EC software sync 2) EC finished calculating Vboot hash 3) EC is no longer requesting power limiting 4) End of EC software sync
BUG=none BRANCH=none TEST=verified timestamps show up in cbmem log
Change-Id: I6e5703c146b5ec27d01700fdb39cb3d2092ea8a8 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/36209 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Julius Werner jwerner@chromium.org --- M src/commonlib/include/commonlib/timestamp_serialized.h M src/security/vboot/ec_sync.c 2 files changed, 22 insertions(+), 6 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
diff --git a/src/commonlib/include/commonlib/timestamp_serialized.h b/src/commonlib/include/commonlib/timestamp_serialized.h index 7b1a730..d7d636e 100644 --- a/src/commonlib/include/commonlib/timestamp_serialized.h +++ b/src/commonlib/include/commonlib/timestamp_serialized.h @@ -79,6 +79,10 @@ TS_END_TPMPCR = 512, TS_START_TPMLOCK = 513, TS_END_TPMLOCK = 514, + TS_START_EC_SYNC = 515, + TS_EC_HASH_READY = 516, + TS_EC_POWER_LIMIT_WAIT = 517, + TS_END_EC_SYNC = 518, TS_START_COPYVPD = 550, TS_END_COPYVPD_RO = 551, TS_END_COPYVPD_RW = 552, @@ -202,6 +206,11 @@ { TS_END_COPYVPD_RO, "finished loading Chrome OS VPD (RO)" }, { TS_END_COPYVPD_RW, "finished loading Chrome OS VPD (RW)" },
+ { TS_START_EC_SYNC, "starting EC software sync" }, + { TS_EC_HASH_READY, "EC vboot hash ready" }, + { TS_EC_POWER_LIMIT_WAIT, "waiting for EC to allow higher power draw" }, + { TS_END_EC_SYNC, "finished EC software sync" }, + { TS_DC_START, "depthcharge start" }, { TS_RO_PARAMS_INIT, "RO parameter init" }, { TS_RO_VB_INIT, "RO vboot init" }, diff --git a/src/security/vboot/ec_sync.c b/src/security/vboot/ec_sync.c index ec048aa..c2a6b25 100644 --- a/src/security/vboot/ec_sync.c +++ b/src/security/vboot/ec_sync.c @@ -20,6 +20,7 @@ #include <security/vboot/vbnv.h> #include <security/vboot/vboot_common.h> #include <timer.h> +#include <timestamp.h> #include <vb2_api.h>
#define _EC_FILENAME(select, suffix) \ @@ -51,6 +52,8 @@ vb2_error_t retval = VB2_SUCCESS; struct vb2_context *ctx;
+ timestamp_add_now(TS_START_EC_SYNC); + ctx = vboot_get_context(); ctx->flags |= VB2_CONTEXT_EC_SYNC_SUPPORTED;
@@ -61,6 +64,8 @@ printk(BIOS_ERR, "EC software sync failed (%#x), rebooting\n", retval); vboot_reboot(); } + + timestamp_add_now(TS_END_EC_SYNC); }
/* Convert firmware image type into a flash offset */ @@ -138,6 +143,8 @@ } while (resp.status == EC_VBOOT_HASH_STATUS_BUSY && !stopwatch_expired(&sw));
+ timestamp_add_now(TS_EC_HASH_READY); + if (resp.status != EC_VBOOT_HASH_STATUS_DONE) { printk(BIOS_ERR, "%s: Hash status not done: %d\n", __func__, resp.status); @@ -415,7 +422,6 @@ int limit_power = 0; bool message_printed = false; struct stopwatch sw; - vb2_error_t rv = VB2_SUCCESS; int in_recovery = !!(ctx->flags & VB2_CONTEXT_RECOVERY_MODE);
/* @@ -425,15 +431,16 @@ if (in_recovery) return VB2_SUCCESS;
+ timestamp_add_now(TS_EC_POWER_LIMIT_WAIT); + stopwatch_init_msecs_expire(&sw, LIMIT_POWER_WAIT_TIMEOUT_MS);
- /* Ensure we have enough power to continue booting */ + /* Ensure we have enough power to continue booting. */ while (1) { if (google_chromeec_read_limit_power_request(&limit_power)) { printk(BIOS_ERR, "Failed to check EC limit power" "flag.\n"); - rv = VB2_ERROR_UNKNOWN; - break; + return VB2_ERROR_UNKNOWN; }
if (!limit_power || stopwatch_expired(&sw)) @@ -451,13 +458,13 @@ if (limit_power) { printk(BIOS_INFO, "EC requests limited power usage. Request shutdown.\n"); - rv = VBERROR_SHUTDOWN_REQUESTED; + return VBERROR_SHUTDOWN_REQUESTED; } else { printk(BIOS_INFO, "Waited %luus to clear limit power flag.\n", stopwatch_duration_usecs(&sw)); }
- return rv; + return VB2_SUCCESS; }
/*