2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-05 08:45:26 +00:00

Display the base I/O address of Super-I/O logical device if it is

set, even it the logical device in question is disabled.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5677 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2009-03-06 09:44:17 +00:00
parent 3dc6983a84
commit 531a6416f2
2 changed files with 15 additions and 9 deletions

View File

@@ -3225,23 +3225,28 @@ sub probe_superio
outb($addrreg, $superio{logdevreg});
outb($datareg, $chip->{logdev});
# Check the activation register
outb($addrreg, $superio{actreg});
$val = inb($datareg);
if (!($val & $superio{actmask})) {
print "\n (but not activated)\n";
return 0;
}
# Get the IO base register
# Get the IO base address
outb($addrreg, $superio{basereg});
$addr = inb($datareg);
outb($addrreg, $superio{basereg} + 1);
$addr = ($addr << 8) | inb($datareg);
# Check the activation register and base address
outb($addrreg, $superio{actreg});
$val = inb($datareg);
if (!($val & $superio{actmask})) {
if ($addr) {
printf "\n (address 0x\%x, but not activated)\n", $addr;
} else {
print "\n (but not activated)\n";
}
return 0;
}
if ($addr == 0) {
print "\n (but no address specified)\n";
return 0;
}
print "Success!\n";
printf " (address 0x\%x, driver `%s')\n", $addr, $chip->{driver};
my $new_hash = {