Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33397 )
Change subject: util/amdfwtool: Align PSP NVRAM ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/#/c/33397/1/util/amdfwtool/amdfwtool.c File util/amdfwtool/amdfwtool.c:
https://review.coreboot.org/#/c/33397/1/util/amdfwtool/amdfwtool.c@484 PS1, Line 484: ctx->current = ALIGN(ctx->current, ERASE_ALIGNMENT); Why the intermediate value with BLOB_ALIGNMENT?
https://review.coreboot.org/#/c/33397/1/util/amdfwtool/amdfwtool.c@508 PS1, Line 508: if (count > MAX_PSP_ENTRIES) { Unrelated, but you really should test for invalid indexing of arrays before the access happens.