Attention is currently required from: Boris Mittelberg, Caveh Jalali, Jayvik Desai, Julius Werner, Kapil Porwal, Paul Menzel.
Subrata Banik has posted comments on this change by Jayvik Desai. ( https://review.coreboot.org/c/coreboot/+/85326?usp=email )
Change subject: ec/google/chromeec: Add debug timestamp for host EC commands ......................................................................
Patch Set 11:
(1 comment)
File src/ec/google/chromeec/ec_lpc.c:
https://review.coreboot.org/c/coreboot/+/85326/comment/1c478dcc_c0a32ce4?usp... : PS9, Line 286: printk
I was thinking we could keep a data structure that maps EC host commands to timestamps. That way, we'd always know which timestamp belongs to which EC host command.
So you would basically be creating hundreds of new timestamps... I don't think this is worth it. I really don't think timestamps are the right tool for this level of debugging anyway.
Proposal is to add a timestamp to each host command. It's a good start, and we can always grow the list if we want. However, this is more about adding a timestamp around each host cmd. If we have better ways to append the host cmd number into the timestamp string, then we can avoid making several entries.
We already have a similar feature for FSP. When we build FSP with a specific flag, it adds more timestamps that aren't needed during regular boot.
Okay, but that's a bit of a different situation. The FSP only runs in one specific part of the boot flow and (I think?) there's already a timestamp right before and after it to mark that part. So if you turn on FSP debugging timestamps it's not that surprising that the time between start and end of the FSP is broken up by additional timestamps.
I think the proposed change is also valid for EC. There are timestamps before and after certain coreboot APIs that may call into other EC host commands. Therefore, when EC started populating more timestamps, it would only be in between those two outer layer timestamps. Of course, we would need to sync the EC and AP timestamps.
But EC commands happen all over the place, and will change the values for all sorts of timestamps that have nothing to do with the EC.
Not sure if i'm able to follow why would the existing time will change ? it will bring more granularity in timestamp which being elapse while performing EC host cmd.