Attention is currently required from: Julius Werner, Angel Pons, Subrata Banik, Aaron Durbin. Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/51445 )
Change subject: timestamp: Add helper fucntions ......................................................................
Patch Set 3:
(1 comment)
File src/include/timestamp.h:
https://review.coreboot.org/c/coreboot/+/51445/comment/c978b95e_c64e4721 PS3, Line 31: timestamp_add_raw_ts
Note that the cbmem utility will already sort timestamps before printing, so it's not quite that complicated. You can just add new timestamps at the end even if they refer to earlier events.
Interesting. I hadn't realized that we sort the entries in cbmem utility. That helps with the order.
But yes, needing to go "before the base" would be more tricky. Could we instead just set the base to 0 to begin with? It sounds like on these platforms, the TSC starts ticking at 0 anyway, and the "base" was just subtracting the time spent before coreboot starts.
Setting the base to 0 doesn't really help. TSC starts ticking from the point x86 is taken out of reset. The timestamps that are being collected in this series occur before that (i.e. before x86 is taken out of reset). Since we have to take the pre-x86 time into account, the base time needs to be updated as well.