Kangheui Won has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45059 )
Change subject: soc/amd/picasso: pass verstage timestamps to x86 ......................................................................
Patch Set 2:
(3 comments)
https://review.coreboot.org/c/coreboot/+/45059/2/src/lib/bootblock.c File src/lib/bootblock.c:
https://review.coreboot.org/c/coreboot/+/45059/2/src/lib/bootblock.c@28 PS2, Line 28: void bootblock_main_with_timestamp(uint64_t base_timestamp,
These bootblock changes should reside in their own patch.
Okay, I'll split patches.
https://review.coreboot.org/c/coreboot/+/45059/2/src/soc/amd/picasso/bootblo... File src/soc/amd/picasso/bootblock/bootblock.c:
https://review.coreboot.org/c/coreboot/+/45059/2/src/soc/amd/picasso/bootblo... PS2, Line 123: #if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
Why is this guarded by a macro and not a C if() ? […]
No particular reason, I just followed what's done in bootblock_soc_init() below.
https://review.coreboot.org/c/coreboot/+/45059/2/src/soc/amd/picasso/bootblo... PS2, Line 130: uint32_t tick_freq_mhz = timestamp_tick_freq_mhz();
This is the tsc frequency since we aren't selecting COLLECT_TIMESTAMPS_NO_TSC. […]
It's done in line 145-149. Since timestamps from psp is normalized as 1us scale we can just multiply this. However if timestamp_tick_freq_mhz() returns 0 (which means there was error getting it) we're leaving it as raw number.