Skip to content
Snippets Groups Projects
Commit 2d67abda authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

tools/intel_vbt_decode: Decode block 3 (Display Toggle Option)


Decode VBT block 3 (Display Toggle Option).

On ALM the block appears to contain some kind of actual toggle
list of child devices, on all more modern machines it just has
the feature bits.

Example output from ALM:
BDB block 3 (27 bytes, min 3 bytes) - Display toggle option block:
        0000: 03 1b 00 00 0c 00 08 00  01 00 09 00 02 00 00 00
        0010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00

        Feature bits: 0x00
        Num entries: 12
        Toggle list #1: LFP1 (0x0008)
        Toggle list #2: CRT (0x0001)
        Toggle list #3: CRT,LFP1 (0x0009)
        Toggle list #4: TV (0x0002)
        Toggle list #5: none (0x0000)
        Toggle list #6: none (0x0000)
        Toggle list #7: none (0x0000)
        Toggle list #8: none (0x0000)
        Toggle list #9: none (0x0000)
        Toggle list #10: none (0x0000)
        Toggle list #11: none (0x0000)
        Toggle list #12: none (0x0000)

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 04ba0372
No related branches found
No related tags found
No related merge requests found
...@@ -316,6 +316,8 @@ static size_t block_min_size(const struct context *context, int section_id) ...@@ -316,6 +316,8 @@ static size_t block_min_size(const struct context *context, int section_id)
return sizeof(struct bdb_general_features); return sizeof(struct bdb_general_features);
case BDB_GENERAL_DEFINITIONS: case BDB_GENERAL_DEFINITIONS:
return sizeof(struct bdb_general_definitions); return sizeof(struct bdb_general_definitions);
case BDB_DISPLAY_TOGGLE:
return sizeof(struct bdb_display_toggle);
case BDB_PSR: case BDB_PSR:
return sizeof(struct bdb_psr); return sizeof(struct bdb_psr);
case BDB_CHILD_DEVICE_TABLE: case BDB_CHILD_DEVICE_TABLE:
...@@ -1249,6 +1251,20 @@ static void dump_general_definitions(struct context *context, ...@@ -1249,6 +1251,20 @@ static void dump_general_definitions(struct context *context,
child_dev_num, defs->child_dev_size); child_dev_num, defs->child_dev_size);
} }
static void dump_display_toggle(struct context *context,
const struct bdb_block *block)
{
const struct bdb_display_toggle *t = block_data(block);
printf("\tFeature bits: 0x%02x\n", t->feature_bits);
printf("\tNum entries: %d\n", t->num_entries);
for (int i = 0; i < t->num_entries; i++)
printf("\tToggle list #%d: %s (0x%04x)\n",
i+1, child_device_handle(context, t->list[i]),
t->list[i]);
}
static void dump_legacy_child_devices(struct context *context, static void dump_legacy_child_devices(struct context *context,
const struct bdb_block *block) const struct bdb_block *block)
{ {
...@@ -2727,6 +2743,11 @@ struct dumper dumpers[] = { ...@@ -2727,6 +2743,11 @@ struct dumper dumpers[] = {
.name = "General definitions block", .name = "General definitions block",
.dump = dump_general_definitions, .dump = dump_general_definitions,
}, },
{
.id = BDB_DISPLAY_TOGGLE,
.name = "Display toggle option block",
.dump = dump_display_toggle,
},
{ {
.id = BDB_PSR, .id = BDB_PSR,
.min_bdb_version = 165, .min_bdb_version = 165,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment