mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-25 20:28:21 +00:00
Do not access I/O ports on PPC.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5124 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
10f1901765
commit
1dc288af38
2 files changed
+28
-22
No files matched your search
@@ -1,8 +1,9 @@
|
|||||||
lm-sensors CHANGES file
|
lm-sensors CHANGES file
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
SVN
|
SVN-HEAD
|
||||||
sensors-detect: Add SMSC SCH5027D detection
|
sensors-detect: Add SMSC SCH5027D detection
|
||||||
|
Do not access I/O ports on PPC
|
||||||
|
|
||||||
3.0.1 (2008-01-28)
|
3.0.1 (2008-01-28)
|
||||||
documentation: Update the application writing guidelines
|
documentation: Update the application writing guidelines
|
||||||
|
|||||||
+26
-21
@@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# sensors-detect - Detect PCI bus and chips
|
# sensors-detect - Detect PCI bus and chips
|
||||||
# Copyright (C) 1998 - 2002 Frodo Looijaard <frodol@dds.nl>
|
# Copyright (C) 1998 - 2002 Frodo Looijaard <frodol@dds.nl>
|
||||||
# Copyright (C) 2004 - 2007 Jean Delvare <khali@linux-fr.org>
|
# Copyright (C) 2004 - 2008 Jean Delvare <khali@linux-fr.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -2366,12 +2366,13 @@ sub initialize_conf
|
|||||||
# [2] -> SUBLEVEL
|
# [2] -> SUBLEVEL
|
||||||
# [3] -> EXTRAVERSION
|
# [3] -> EXTRAVERSION
|
||||||
#
|
#
|
||||||
use vars qw(@kernel_version);
|
use vars qw(@kernel_version $kernel_arch);
|
||||||
|
|
||||||
sub initialize_kernel_version
|
sub initialize_kernel_version
|
||||||
{
|
{
|
||||||
`uname -r` =~ /(\d+)\.(\d+)\.(\d+)(.*)/;
|
`uname -r` =~ /(\d+)\.(\d+)\.(\d+)(.*)/;
|
||||||
@kernel_version = ($1, $2, $3, $4);
|
@kernel_version = ($1, $2, $3, $4);
|
||||||
|
chomp($kernel_arch = `uname -m`);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub kernel_version_at_least
|
sub kernel_version_at_least
|
||||||
@@ -5810,27 +5811,31 @@ sub main
|
|||||||
}
|
}
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
print "Some chips are also accessible through the ISA I/O ports. We have to\n".
|
# Skip "random" I/O port probing on PPC
|
||||||
"write to arbitrary I/O ports to probe them. This is usually safe though.\n".
|
if ($kernel_arch ne 'ppc'
|
||||||
"Yes, you do have ISA I/O ports even if you do not have any ISA slots!\n";
|
&& $kernel_arch ne 'ppc64') {
|
||||||
print "Do you want to scan the ISA I/O ports? (YES/no): ";
|
print "Some chips are also accessible through the ISA I/O ports. We have to\n".
|
||||||
unless (<STDIN> =~ /^\s*n/i) {
|
"write to arbitrary I/O ports to probe them. This is usually safe though.\n".
|
||||||
initialize_ioports();
|
"Yes, you do have ISA I/O ports even if you do not have any ISA slots!\n";
|
||||||
scan_isa_bus();
|
print "Do you want to scan the ISA I/O ports? (YES/no): ";
|
||||||
close_ioports();
|
unless (<STDIN> =~ /^\s*n/i) {
|
||||||
}
|
initialize_ioports();
|
||||||
print "\n";
|
scan_isa_bus();
|
||||||
|
close_ioports();
|
||||||
|
}
|
||||||
|
print "\n";
|
||||||
|
|
||||||
print "Some Super I/O chips may also contain sensors. We have to write to\n".
|
print "Some Super I/O chips may also contain sensors. We have to write to\n".
|
||||||
"standard I/O ports to probe them. This is usually safe.\n";
|
"standard I/O ports to probe them. This is usually safe.\n";
|
||||||
print "Do you want to scan for Super I/O sensors? (YES/no): ";
|
print "Do you want to scan for Super I/O sensors? (YES/no): ";
|
||||||
unless (<STDIN> =~ /^\s*n/i) {
|
unless (<STDIN> =~ /^\s*n/i) {
|
||||||
initialize_ioports();
|
initialize_ioports();
|
||||||
scan_superio(0x2e, 0x2f);
|
scan_superio(0x2e, 0x2f);
|
||||||
scan_superio(0x4e, 0x4f);
|
scan_superio(0x4e, 0x4f);
|
||||||
close_ioports();
|
close_ioports();
|
||||||
|
}
|
||||||
|
print "\n";
|
||||||
}
|
}
|
||||||
print "\n";
|
|
||||||
|
|
||||||
print "Some CPUs or memory controllers may also contain embedded sensors.\n";
|
print "Some CPUs or memory controllers may also contain embedded sensors.\n";
|
||||||
print "Do you want to scan for them? (YES/no): ";
|
print "Do you want to scan for them? (YES/no): ";
|
||||||
|
|||||||
Reference in new issue
Block a user