Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
nvbios: add config field in SENSE table
  • Loading branch information
karolherbst committed Apr 30, 2016
1 parent 0bb06ce commit f29db85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions nvbios/bios.h
Expand Up @@ -857,6 +857,7 @@ struct envy_bios_power_sense_entry {
uint8_t extdev_id;
uint8_t resistor_mohm;
uint8_t rail;
uint16_t config;
};

struct envy_bios_power_sense {
Expand Down
5 changes: 3 additions & 2 deletions nvbios/power.c
Expand Up @@ -671,6 +671,7 @@ int envy_bios_parse_power_sense(struct envy_bios *bios) {
err |= bios_u8(bios, data + 0x1, &sense->entries[i].extdev_id);
err |= bios_u8(bios, data + 0x5, &sense->entries[i].resistor_mohm);
err |= bios_u8(bios, data + 0x6, &sense->entries[i].rail);
err |= bios_u16(bios, data + 0xb, &sense->entries[i].config);
break;
};
}
Expand All @@ -697,8 +698,8 @@ void envy_bios_print_power_sense(struct envy_bios *bios, FILE *out, unsigned mas
struct envy_bios_power_sense_entry *e = &sense->entries[i];
switch (sense->version) {
case 0x20:
fprintf(out, "power rail %i: unk0 = 0x%x, extdev_id = %u, shunt resistor = %u mOhm, rail = %u\n",
i, e->mode, e->extdev_id, e->resistor_mohm, e->rail);
fprintf(out, "power rail %i: unk0 = 0x%x, extdev_id = %u, shunt resistor = %u mOhm, rail = %u, config = 0x%04x\n",
i, e->mode, e->extdev_id, e->resistor_mohm, e->rail, e->config);
break;
case 0x10:
fprintf(out, "power rail %i: unk1 = 0x%x, extdev_id = %u, shunt resistor = %u mOhm, rail = %u\n",
Expand Down

0 comments on commit f29db85

Please sign in to comment.