Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31649 )
Change subject: console: Add timestamp prints to boot stages. ......................................................................
Patch Set 2:
Patch Set 2:
This isn't gonna work on many platforms. RTCs can be hooked up via many different interfaces which may have prerequisites that will only get set up in later stages (possibly even only after ramstage starts). console_init() is pretty much the first thing that runs in the bootblock.
What is the main goal here, why do you want to log the RTC time for every stage? Most normal boots take less than a second so you'll likely just log the same string 3 times. Wouldn't a single timestamp at the end of ramstage would be enough (in fact, boards configured for using ELOG, like all Chromebooks, already print the RTC time there as part of logging the boot event)? If you wanted to figure out when the other stages started, you could just use coreboot's much more accurate subsecond timestamps to calculate backwards from there.
The purpose is to be able to match up events between coreboot's logs and say, an EC log as well. I have a corresponding patch in the ChromeOS EC codebase which prints the RTC time at certain stages in the boot sequence as well.