Change in flashrom[master]: writeprotect: print chip ranges truth table for debugging

Nikolai Artemiev has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/59909 ) Change subject: writeprotect: print chip ranges truth table for debugging ...................................................................... writeprotect: print chip ranges truth table for debugging Make it easier to add new chips and debug range decoding functions by printing a complete truth table of config bits / ranges. BUG=b:195381327,b:153800563 TEST=flashrom --wp-list -V BRANCH=none Change-Id: I2cda441229ffdcabff27906f7804efba82baa6bc Signed-off-by: Nikolai Artemiev <nartemiev@google.com> --- M writeprotect.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://review.coreboot.org:29418/flashrom refs/changes/09/59909/1 diff --git a/writeprotect.c b/writeprotect.c index 1a44c10..bcd0657 100644 --- a/writeprotect.c +++ b/writeprotect.c @@ -274,6 +274,13 @@ /* Get range using chip-specific decoding function */ ranges[range_index].cfg = cfg; flashrom_wp_get_range(flash, &cfg, &ranges[range_index].range); + + /* Debug: print config and range */ + char cfg_buf[FLASHROM_WP_OUT_STR_SIZE]; + char range_buf[FLASHROM_WP_OUT_STR_SIZE]; + flashrom_wp_config_to_str(&cfg, cfg_buf); + flashrom_wp_range_to_str(flash, &ranges[range_index].range, range_buf); + msg_gdbg("Enumerated range: %s : %s\n", cfg_buf, range_buf); } /* Sort ranges */ -- To view, visit https://review.coreboot.org/c/flashrom/+/59909 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: I2cda441229ffdcabff27906f7804efba82baa6bc Gerrit-Change-Number: 59909 Gerrit-PatchSet: 1 Gerrit-Owner: Nikolai Artemiev <nartemiev@google.com> Gerrit-MessageType: newchange
participants (1)
-
Nikolai Artemiev (Code Review)