Attention is currently required from: Zheng Bao. Hello Zheng Bao,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/59383
to review the following change.
Change subject: amdfwtool: Change some hardcoded value to macros ......................................................................
amdfwtool: Change some hardcoded value to macros
Change-Id: Ie9659c739b333c97f420f50d0695a30161b1f579 Signed-off-by: Zheng Bao fishbaozi@gmail.com --- M util/amdfwtool/amdfwtool.c 1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/59383/1
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index 9450e45..94c9c27 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -699,11 +699,11 @@ continue; ctx->current = ALIGN(ctx->current, ERASE_ALIGNMENT); pspdir->entries[count].type = fw_table[i].type; - pspdir->entries[count].size = 4096; /* TODO: doc? */ + pspdir->entries[count].size = TABLE_ALIGNMENT; pspdir->entries[count].addr = RUN_CURRENT(*ctx); pspdir->entries[count].subprog = fw_table[i].subprog; pspdir->entries[count].rsvd = 0; - ctx->current = ALIGN(ctx->current + 4096, 0x100U); + ctx->current = ALIGN(ctx->current + TABLE_ALIGNMENT, BLOB_ALIGNMENT); count++; } else if (fw_table[i].type == AMD_PSP_FUSE_CHAIN) { pspdir->entries[count].type = fw_table[i].type; @@ -984,7 +984,7 @@
biosdir->entries[count].source = RUN_CURRENT(*ctx);
- ctx->current = ALIGN(ctx->current + bytes, 0x100U); + ctx->current = ALIGN(ctx->current + bytes, BLOB_ALIGNMENT); break; case AMD_BIOS_PSP_SHARED_MEM: biosdir->entries[count].dest = fw_table[i].dest; @@ -1006,7 +1006,7 @@ biosdir->entries[count].size = (uint32_t)bytes; biosdir->entries[count].source = RUN_CURRENT(*ctx);
- ctx->current = ALIGN(ctx->current + bytes, 0x100U); + ctx->current = ALIGN(ctx->current + bytes, BLOB_ALIGNMENT); break; }