[Intel-gfx] [IGT PATCH 3/4] intel_bios_reader: dump all sections, including unknown ones

Jani Nikula jani.nikula at intel.com
Tue Oct 8 20:15:28 CEST 2013


We still need to dump some of the known sections explicitly due to
dependencies on information extracted, such as LFP data pointers and
panel_type.

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 tools/intel_bios_reader.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index 30c3470..e906efd 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -779,13 +779,16 @@ static void dump_section(int section_id, int size)
 {
 	struct dumper *dumper = NULL;
 	const struct bdb_block *block;
+	static int done[256];
 	int i;
 
+	if (done[section_id])
+		return;
+	done[section_id] = 1;
+
 	block = find_section(section_id, size);
-	if (!block) {
-		printf("No section %d\n", section_id);
+	if (!block)
 		return;
-	}
 
 	for (i = 0; i < ARRAY_SIZE(dumpers); i++) {
 		if (block->id == dumpers[i].id) {
@@ -923,5 +926,8 @@ int main(int argc, char **argv)
 	dump_section(BDB_DRIVER_FEATURES, size);
 	dump_section(BDB_EDP, size);
 
+	for (i = 0; i < 256; i++)
+		dump_section(i, size);
+
 	return 0;
 }
-- 
1.7.10.4




More information about the Intel-gfx mailing list