The current implementation uses '%*s' which treats the calculated
str_len as a minimum field width. If the underlying string buffer is not
null-terminated, printk will continue reading past the buffer until it
encounters a null byte.
Switch to '%.*s' to correctly use the precision field, which specifies
the maximum number of characters to be printed from the string.
BUG=None
TEST=Able to dump FSP performance data with `DISPLAY_FSP_TIMESTAMPS`
Kconfig selected and meeting the FSP prerequisites. Verify that the
performance data table is printed correctly.
```
[INFO ] +---------------------------------------------------+
[INFO ] |------ FSP Performance Timestamp Table Dump -------|
[INFO ] +---------------------------------------------------+
[INFO ] | Perf-ID Timestamp(us) String/GUID |
[INFO ] +---------------------------------------------------+
[INFO ] 0 1242275 SEC/52c05b14-0b98-496c-bc3b04b50211d680
[INFO ] 50 1242282 PEI/52c05b14-0b98-496c-bc3b04b50211d680
[INFO ] 40 1242284 PreMem/52c05b14-0b98-496c-bc3b04b50211d680
```
Change-Id: Id95bd34b9c7d45d2c363339eb18adc5ac731c72b
Signed-off-by: Pranava Y N <pranavayn@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90788
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>