Martin Roth has uploaded this change for review.

View Change

util/amdfwtool: If no APOB_NV is specified, don't error out

amdfwtool currently assumes that we MUST have an apob_nv area if we
have an aopb. This is not required, so if neither the apob_nv size or
base are specified, just move on.

BUG=b:158363448
TEST=Build an image with no APOB_NV region. Dump regions to show that
it's not there.

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: Ibaeacd3dcdfd73f690df61c2a19d39bbb9dcc838
---
M util/amdfwtool/amdfwtool.c
1 file changed, 4 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/44045/1
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c
index 14ffdb3..26d8d04 100644
--- a/util/amdfwtool/amdfwtool.c
+++ b/util/amdfwtool/amdfwtool.c
@@ -930,7 +930,10 @@
if (fw_table[i].type == AMD_BIOS_APOB_NV && !fw_table[i].size) {
/* Attempt to determine whether this is an error */
apob_idx = find_bios_entry(AMD_BIOS_APOB);
- if (apob_idx < 0 || !fw_table[apob_idx].dest) {
+ if (!fw_table[i].src) {
+ /* With no source or size specified, don't use the APOV NV */
+ continue;
+ } else if (apob_idx < 0 || !fw_table[apob_idx].dest) {
/* APOV NV not expected to be used */
continue;
} else {

To view, visit change 44045. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibaeacd3dcdfd73f690df61c2a19d39bbb9dcc838
Gerrit-Change-Number: 44045
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth@google.com>
Gerrit-MessageType: newchange