Nikolai Artemiev has uploaded this change for review.
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 change 59909. To unsubscribe, or for help writing mail filters, visit settings.