Attention is currently required from: Furquan Shaikh, Angel Pons, Subrata Banik, Aaron Durbin. Julius Werner 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/4d218418_ea115ad7 PS3, Line 31: timestamp_add_raw_ts
Yes, the way things are done in this patch series is not completely correct. […]
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.
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. If we know we want to backfill the other values in later anyway (and I assume that's a compile-time decision whether that feature is enabled), why not initialize the table to start counting at zero right away?