Skip to content
Permalink
Browse files

nvbios: add config field in SENSE table

  • Loading branch information
karolherbst committed Apr 30, 2016
1 parent 0bb06ce commit f29db85c12ead892aea0c0e9da21375604ef7ba5
Showing with 4 additions and 2 deletions.
  1. +1 −0 nvbios/bios.h
  2. +3 −2 nvbios/power.c
@@ -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 {
@@ -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;
};
}
@@ -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",

0 comments on commit f29db85

Please sign in to comment.
You can’t perform that action at this time.