Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44813 )
Change subject: util/ifdtool: Skip unused Flash Region Section ......................................................................
util/ifdtool: Skip unused Flash Region Section
This patch ensures all unused flash region sections are not getting listed while using -d option to dump FD.
BUG=b:153888802 TEST=List only used flash region section with below command
ifdtool -p tgl -d coreboot.rom
Without this CL : Found Region Section FLREG0: 0x00000000 Flash Region 0 (Flash Descriptor): 00000000 - 00000fff FLREG1: 0x1fff0400 Flash Region 1 (BIOS): 00400000 - 01ffffff FLREG2: 0x03ff0001 Flash Region 2 (Intel ME): 00001000 - 003fffff FLREG3: 0x00007fff Flash Region 3 (GbE): 07fff000 - 00000fff (unused) FLREG4: 0x00007fff Flash Region 4 (Platform Data): 07fff000 - 00000fff (unused) FLREG5: 0x00007fff Flash Region 5 (Reserved): 07fff000 - 00000fff (unused) FLREG6: 0x00007fff Flash Region 6 (Reserved): 07fff000 - 00000fff (unused) FLREG7: 0x00007fff Flash Region 7 (Reserved): 07fff000 - 00000fff (unused) FLREG8: 0x00007fff Flash Region 8 (EC): 07fff000 - 00000fff (unused)
With this CL : Found Region Section FLREG0: 0x00000000 Flash Region 0 (Flash Descriptor): 00000000 - 00000fff FLREG1: 0x1fff0400 Flash Region 1 (BIOS): 00400000 - 01ffffff FLREG2: 0x03ff0001 Flash Region 2 (Intel ME): 00001000 - 003fffff
Signed-off-by: Subrata Banik subrata.banik@intel.com Change-Id: I900a29d8968bd61d66c04012e60e1ba4baff786d --- M util/ifdtool/ifdtool.c 1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/13/44813/1
diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c index 6777316..e096864 100644 --- a/util/ifdtool/ifdtool.c +++ b/util/ifdtool/ifdtool.c @@ -373,10 +373,14 @@ static void dump_frba(const frba_t *frba) { unsigned int i; + region_t region; printf("Found Region Section\n"); for (i = 0; i < max_regions; i++) { - printf("FLREG%u: 0x%08x\n", i, frba->flreg[i]); - dump_region(i, frba); + region = get_region(frba, i); + if (region.size > 1) { + printf("FLREG%u: 0x%08x\n", i, frba->flreg[i]); + dump_region(i, frba); + } } }
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44813 )
Change subject: util/ifdtool: Skip unused Flash Region Section ......................................................................
Patch Set 1:
I'd prefer if unused regions like GbE, Platform Data and EC would still be printed, while skipping over reserved regions.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44813 )
Change subject: util/ifdtool: Skip unused Flash Region Section ......................................................................
Patch Set 1:
Patch Set 1:
I'd prefer if unused regions like GbE, Platform Data and EC would still be printed, while skipping over reserved regions.
+1
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44813 )
Change subject: util/ifdtool: Skip unused Flash Region Section ......................................................................
Patch Set 1:
Patch Set 1:
Patch Set 1:
I'd prefer if unused regions like GbE, Platform Data and EC would still be printed, while skipping over reserved regions.
+1
Done
Hello build bot (Jenkins), Furquan Shaikh, Tim Wawrzynczak, Stefan Reinauer, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44813
to look at the new patch set (#2).
Change subject: util/ifdtool: Skip unused and reserved Flash Region ......................................................................
util/ifdtool: Skip unused and reserved Flash Region
This patch ensures all unused and reserved flash region sections are not getting listed while using -d option to dump FD.
BUG=b:153888802 TEST=List only used flash region section with below command
ifdtool -p tgl -d coreboot.rom
Without this CL : Found Region Section FLREG0: 0x00000000 Flash Region 0 (Flash Descriptor): 00000000 - 00000fff FLREG1: 0x1fff0400 Flash Region 1 (BIOS): 00400000 - 01ffffff FLREG2: 0x03ff0001 Flash Region 2 (Intel ME): 00001000 - 003fffff FLREG3: 0x00007fff Flash Region 3 (GbE): 07fff000 - 00000fff (unused) FLREG4: 0x00007fff Flash Region 4 (Platform Data): 07fff000 - 00000fff (unused) FLREG5: 0x00007fff Flash Region 5 (Reserved): 07fff000 - 00000fff (unused) FLREG6: 0x00007fff Flash Region 6 (Reserved): 07fff000 - 00000fff (unused) FLREG7: 0x00007fff Flash Region 7 (Reserved): 07fff000 - 00000fff (unused) FLREG8: 0x00007fff Flash Region 8 (EC): 07fff000 - 00000fff (unused)
With this CL : Found Region Section FLREG0: 0x00000000 Flash Region 0 (Flash Descriptor): 00000000 - 00000fff FLREG1: 0x1fff0400 Flash Region 1 (BIOS): 00400000 - 01ffffff FLREG2: 0x03ff0001 Flash Region 2 (Intel ME): 00001000 - 003fffff FLREG3: 0x00007fff Flash Region 3 (GbE): 07fff000 - 00000fff (unused) FLREG4: 0x00007fff Flash Region 4 (Platform Data): 07fff000 - 00000fff (unused) FLREG8: 0x00007fff Flash Region 8 (EC): 07fff000 - 00000fff (unused)
Signed-off-by: Subrata Banik subrata.banik@intel.com Change-Id: I900a29d8968bd61d66c04012e60e1ba4baff786d --- M util/ifdtool/ifdtool.c 1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/13/44813/2
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44813 )
Change subject: util/ifdtool: Skip unused and reserved Flash Region ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44813 )
Change subject: util/ifdtool: Skip unused and reserved Flash Region ......................................................................
util/ifdtool: Skip unused and reserved Flash Region
This patch ensures all unused and reserved flash region sections are not getting listed while using -d option to dump FD.
BUG=b:153888802 TEST=List only used flash region section with below command
ifdtool -p tgl -d coreboot.rom
Without this CL : Found Region Section FLREG0: 0x00000000 Flash Region 0 (Flash Descriptor): 00000000 - 00000fff FLREG1: 0x1fff0400 Flash Region 1 (BIOS): 00400000 - 01ffffff FLREG2: 0x03ff0001 Flash Region 2 (Intel ME): 00001000 - 003fffff FLREG3: 0x00007fff Flash Region 3 (GbE): 07fff000 - 00000fff (unused) FLREG4: 0x00007fff Flash Region 4 (Platform Data): 07fff000 - 00000fff (unused) FLREG5: 0x00007fff Flash Region 5 (Reserved): 07fff000 - 00000fff (unused) FLREG6: 0x00007fff Flash Region 6 (Reserved): 07fff000 - 00000fff (unused) FLREG7: 0x00007fff Flash Region 7 (Reserved): 07fff000 - 00000fff (unused) FLREG8: 0x00007fff Flash Region 8 (EC): 07fff000 - 00000fff (unused)
With this CL : Found Region Section FLREG0: 0x00000000 Flash Region 0 (Flash Descriptor): 00000000 - 00000fff FLREG1: 0x1fff0400 Flash Region 1 (BIOS): 00400000 - 01ffffff FLREG2: 0x03ff0001 Flash Region 2 (Intel ME): 00001000 - 003fffff FLREG3: 0x00007fff Flash Region 3 (GbE): 07fff000 - 00000fff (unused) FLREG4: 0x00007fff Flash Region 4 (Platform Data): 07fff000 - 00000fff (unused) FLREG8: 0x00007fff Flash Region 8 (EC): 07fff000 - 00000fff (unused)
Signed-off-by: Subrata Banik subrata.banik@intel.com Change-Id: I900a29d8968bd61d66c04012e60e1ba4baff786d Reviewed-on: https://review.coreboot.org/c/coreboot/+/44813 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M util/ifdtool/ifdtool.c 1 file changed, 6 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Tim Wawrzynczak: Looks good to me, approved
diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c index 2835ba8..68e5b7b 100644 --- a/util/ifdtool/ifdtool.c +++ b/util/ifdtool/ifdtool.c @@ -373,8 +373,14 @@ static void dump_frba(const frba_t *frba) { unsigned int i; + region_t region; printf("Found Region Section\n"); for (i = 0; i < max_regions; i++) { + region = get_region(frba, i); + /* Skip unused & reserved Flash Region */ + if (region.size < 1 && !strcmp(region_name(i), "Reserved")) + continue; + printf("FLREG%u: 0x%08x\n", i, frba->flreg[i]); dump_region(i, frba); }