[PATCH i-g-t 12/20] tools/intel_vbt_decode: Allow dumpers to delcate min version for the block
Ville Syrjala
ville.syrjala at linux.intel.com
Fri May 31 14:23:46 UTC 2024
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Deal with the case where the same block ID got reused for
two different purposes by having the dumper declare a min
and max BDB versions.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
tools/intel_vbt_decode.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index 2d627c821978..e414a1436a01 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -2652,6 +2652,8 @@ get_device_id(unsigned char *bios, int size)
struct dumper {
uint8_t id;
+ uint16_t min_bdb_version;
+ uint16_t max_bdb_version;
const char *name;
void (*dump)(struct context *context,
const struct bdb_block *block);
@@ -2777,6 +2779,14 @@ static bool dump_section(struct context *context, int section_id)
return false;
for (i = 0; i < ARRAY_SIZE(dumpers); i++) {
+ if (dumpers[i].min_bdb_version &&
+ context->bdb->version < dumpers[i].min_bdb_version)
+ continue;
+
+ if (dumpers[i].max_bdb_version &&
+ context->bdb->version > dumpers[i].max_bdb_version)
+ continue;
+
if (block->id == dumpers[i].id) {
dumper = &dumpers[i];
break;
--
2.44.1
More information about the igt-dev
mailing list