I have inited the hw sensors in LinuxBIOS for s2881. So you could use lmsensor to check the FAN speed. The config file is on Tyan web.
For the Fan control, there should more some reg setting...to reduce the FAN speed winbond and adm1027...
YH
On Thu, Apr 20, 2006 at 04:59:52PM -0700, Lu, Yinghai wrote:
I have inited the hw sensors in LinuxBIOS for s2881. So you could use lmsensor to check the FAN speed. The config file is on Tyan web.
Yes; that's what I did today, it works well. I can even set the FAN speed. Thanks for doing that!
For the Fan control, there should more some reg setting...to reduce the FAN speed winbond and adm1027...
Any idea how hard that will be/how long it will take? So you're saying that would activate the automatic fan speed control?
Thanks, Ward.
On Thu, Apr 20, 2006 at 04:59:52PM -0700, Lu, Yinghai wrote:
I have inited the hw sensors in LinuxBIOS for s2881. So you could use lmsensor to check the FAN speed. The config file is on Tyan web.
For the Fan control, there should more some reg setting...to reduce the FAN speed winbond and adm1027...
An update on this.
As I reported earlier, setting fan speed works fine from LinuxBIOS. But it seems this is only the case until I unplug the power from the machine.
When the machine is newly powered in, I need to boot up the proprietary bios first to be able to _set_ the fan speed.
Once I've done that, I can reboot into LinuxBIOS, and set the speed just fine using
/sys/bus/i2c/drivers/lm85/0-002d/pwm1
for instance like this:
echo '60' > /sys/bus/i2c/drivers/lm85/0-002d/pwm1
See attached set_fan_speed_ok.txt for a typical output.
I can shut the machine down, do a cold boot into LinuxBIOS, and it still works.
Until I unplug the power to the machine, that is.
After that, I can still read out everything (see attached set_fan_speed_bad.txt) correctly, but now also _set_ the fan speed.
Suggestions?
Thanks, Ward.
On Fri, May 05, 2006 at 04:57:17PM -0400, Ward Vandewege wrote:
On Thu, Apr 20, 2006 at 04:59:52PM -0700, Lu, Yinghai wrote:
I have inited the hw sensors in LinuxBIOS for s2881. So you could use lmsensor to check the FAN speed. The config file is on Tyan web.
For the Fan control, there should more some reg setting...to reduce the FAN speed winbond and adm1027...
I can shut the machine down, do a cold boot into LinuxBIOS, and it still works.
Until I unplug the power to the machine, that is.
After that, I can still read out everything (see attached set_fan_speed_bad.txt) correctly, but now also _set_ the fan speed.
I'm sorry this is confusing. After unplugging and replugging the power to the machine, I need to boot the proprietary BIOS once to be able to set the fan speed on any consecutive (cold) boot.
Ward.
On Fri, May 05, 2006 at 04:57:17PM -0400, Ward Vandewege wrote:
On Thu, Apr 20, 2006 at 04:59:52PM -0700, Lu, Yinghai wrote:
I have inited the hw sensors in LinuxBIOS for s2881. So you could use lmsensor to check the FAN speed. The config file is on Tyan web.
For the Fan control, there should more some reg setting...to reduce the FAN speed winbond and adm1027...
I can shut the machine down, do a cold boot into LinuxBIOS, and it still works.
Until I unplug the power to the machine, that is.
After that, I can still read out everything (see attached set_fan_speed_bad.txt) correctly, but now also _set_ the fan speed.
I'm sorry this is confusing. After unplugging and replugging the power to the machine, I need to boot the proprietary BIOS once to be able to set the fan speed on any consecutive (cold) boot.
Ward.
* Ward Vandewege ward@gnu.org [060505 23:19]:
I can shut the machine down, do a cold boot into LinuxBIOS, and it still works.
Until I unplug the power to the machine, that is.
After that, I can still read out everything (see attached set_fan_speed_bad.txt) correctly, but now also _set_ the fan speed.
I'm sorry this is confusing. After unplugging and replugging the power to the machine, I need to boot the proprietary BIOS once to be able to set the fan speed on any consecutive (cold) boot.
Can you do an lspci -xxx on the machine while running LinuxBIOS after a cold boot
a) without factory bios running once before b) with factory bios running once before
and diff them to see if there's something we can easily do. (ie. in the "ACPI bridge" device?)
Stefan
On Sat, May 06, 2006 at 02:25:21PM +0200, Stefan Reinauer wrote:
- Ward Vandewege ward@gnu.org [060505 23:19]:
I can shut the machine down, do a cold boot into LinuxBIOS, and it still works.
Until I unplug the power to the machine, that is.
After that, I can still read out everything (see attached set_fan_speed_bad.txt) correctly, but now also _set_ the fan speed.
I'm sorry this is confusing. After unplugging and replugging the power to the machine, I need to boot the proprietary BIOS once to be able to set the fan speed on any consecutive (cold) boot.
Can you do an lspci -xxx on the machine while running LinuxBIOS after a cold boot
a) without factory bios running once before b) with factory bios running once before
and diff them to see if there's something we can easily do. (ie. in the "ACPI bridge" device?)
OK; I've attached the two files. Only three bytes are different in the ACPI bridge (in this comparison the first file is after proprietary boot, the second without).
0000:01:04.3 Bridge: Advanced Micro Devices [AMD] AMD-8111 ACPI (rev 05) 00: 22 10 6b 74 00 00 80 02 05 00 80 06 00 40 00 00 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 f1 10 81 28 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40: 80 f1 00 07 00 00 00 00 20 14 50 00 00 00 00 00 50: 00 80 00 00 0f 00 00 00 01 20 00 00 00 00 00 00 60: 00 00 80 06 13 00 00 00 00 00 00 00 00 00 00 00 70: 00 00 00 00 00 00 00 00 00 00 00 00 f1 10 81 28 80: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -f0: 19 5f 3b 00 00 00 00 00 00 00 00 00 00 00 00 00 +f0: c3 ad 1e 00 00 00 00 00 00 00 00 00 00 00 00 00
But there are actually quite a few other differences throughout the file, which surprises me a litte. Lots of differences in the various northbridge entries, and even the network cards and the sata controller. Is this normal?
Thanks, Ward.
(and now _with_ attachments... sigh)
On Sat, May 06, 2006 at 02:25:21PM +0200, Stefan Reinauer wrote:
- Ward Vandewege ward@gnu.org [060505 23:19]:
I can shut the machine down, do a cold boot into LinuxBIOS, and it still works.
Until I unplug the power to the machine, that is.
After that, I can still read out everything (see attached set_fan_speed_bad.txt) correctly, but now also _set_ the fan speed.
I'm sorry this is confusing. After unplugging and replugging the power to the machine, I need to boot the proprietary BIOS once to be able to set the fan speed on any consecutive (cold) boot.
Can you do an lspci -xxx on the machine while running LinuxBIOS after a cold boot
a) without factory bios running once before b) with factory bios running once before
and diff them to see if there's something we can easily do. (ie. in the "ACPI bridge" device?)
OK; I've attached the two files. Only three bytes are different in the ACPI bridge (in this comparison the first file is after proprietary boot, the second without). Both times the system was running LinuxBIOS.
0000:01:04.3 Bridge: Advanced Micro Devices [AMD] AMD-8111 ACPI (rev 05) 00: 22 10 6b 74 00 00 80 02 05 00 80 06 00 40 00 00 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 f1 10 81 28 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40: 80 f1 00 07 00 00 00 00 20 14 50 00 00 00 00 00 50: 00 80 00 00 0f 00 00 00 01 20 00 00 00 00 00 00 60: 00 00 80 06 13 00 00 00 00 00 00 00 00 00 00 00 70: 00 00 00 00 00 00 00 00 00 00 00 00 f1 10 81 28 80: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -f0: 19 5f 3b 00 00 00 00 00 00 00 00 00 00 00 00 00 +f0: c3 ad 1e 00 00 00 00 00 00 00 00 00 00 00 00 00
But there are actually quite a few other differences throughout the file, which surprises me a litte. Lots of differences in the various northbridge entries, and even the network cards and the sata controller. Is this normal?
Thanks, Ward.
On Tue, May 09, 2006 at 03:05:07PM -0400, Ward Vandewege wrote: ... lspci output ...
But there are actually quite a few other differences throughout the file, which surprises me a litte. Lots of differences in the various northbridge entries, and even the network cards and the sata controller. Is this normal?
A followup on this. First of all, I didn't realize that the PCI configuration space is dynamic - things change all the time.
Secondly;
0000:01:04.3 Bridge: Advanced Micro Devices [AMD] AMD-8111 ACPI (rev 05)
... snip ...
-f0: 19 5f 3b 00 00 00 00 00 00 00 00 00 00 00 00 00 +f0: c3 ad 1e 00 00 00 00 00 00 00 00 00 00 00 00 00
As it turns out, those three bytes change constantly, so I guess they are not significant.
Also, I missed one byte that IS consistently different after a boot with the proprietary BIOS:
0000:01:04.3 Bridge: Advanced Micro Devices [AMD] AMD-8111 ACPI (rev 05) ... -40: 80 f1 00 04 00 00 00 00 20 14 50 00 00 00 00 00 +40: 80 f1 00 07 00 00 00 00 20 14 50 00 00 00 00 00
How would I go about changing that byte during the LinuxBIOS boot? Do I need to edit resourcemap.c in src/mainboard/tyan/s2881?
Thanks, Ward.
* Ward Vandewege ward@gnu.org [060511 22:45]:
On Tue, May 09, 2006 at 03:05:07PM -0400, Ward Vandewege wrote: ... lspci output ...
But there are actually quite a few other differences throughout the file, which surprises me a litte. Lots of differences in the various northbridge entries, and even the network cards and the sata controller. Is this normal?
A followup on this. First of all, I didn't realize that the PCI configuration space is dynamic - things change all the time.
Its probably some timer that counts there. This kind of thing almost requires having the datasheet sitting in another window or printed out next to you.
Also, I missed one byte that IS consistently different after a boot with the proprietary BIOS:
0000:01:04.3 Bridge: Advanced Micro Devices [AMD] AMD-8111 ACPI (rev 05) ... -40: 80 f1 00 04 00 00 00 00 20 14 50 00 00 00 00 00 +40: 80 f1 00 07 00 00 00 00 20 14 50 00 00 00 00 00
Try the attached patch
On Thu, May 11, 2006 at 10:59:56PM +0200, Stefan Reinauer wrote:
Its probably some timer that counts there. This kind of thing almost requires having the datasheet sitting in another window or printed out next to you.
Right.
Also, I missed one byte that IS consistently different after a boot with the proprietary BIOS:
0000:01:04.3 Bridge: Advanced Micro Devices [AMD] AMD-8111 ACPI (rev 05) ... -40: 80 f1 00 04 00 00 00 00 20 14 50 00 00 00 00 00 +40: 80 f1 00 07 00 00 00 00 20 14 50 00 00 00 00 00
Try the attached patch
That didn't help. 0x43 was still set to 04, and I could not set the fan speed. There was a bracket missing from the patch, btw.
Suggestions? Ward.
* Ward Vandewege ward@gnu.org [060511 23:50]:
0000:01:04.3 Bridge: Advanced Micro Devices [AMD] AMD-8111 ACPI (rev 05) ... -40: 80 f1 00 04 00 00 00 00 20 14 50 00 00 00 00 00 +40: 80 f1 00 07 00 00 00 00 20 14 50 00 00 00 00 00
Try the attached patch
That didn't help. 0x43 was still set to 04, and I could not set the fan speed. There was a bracket missing from the patch, btw.
Looking at the datasheet of the 8111 this was a blind shot in the wrong direction.
The bits 0:2 in this register are:
PPSTATE. Previous power state. Read-only. This field holds the most previous power state from which the system came into the FON state. This field resides on the VDD_COREX plane. Here are the possible states:
PPSTATE Power state 0h Reserved 1h POS power on suspend 2h C2 3h C3 4h MOFF mechanical off 5h STR suspend to RAM 6h STD suspend to disk 7h SOFF soft off
So LinuxBIOS reports mechanical off while factory bios reports soft off. Interesting.
But I found some stuff that is worth following. Fans are controlled by the IO mapped power management registers (PMxx) of the 8111. They are called System Management I/O Mapped Registers in the specs on pages 218 et sqq.
The base of the PMxx registers can be read from DevB:3x58 (32bit) bits 15:8. (ie. pmbase=pci_read_dword(acpi_dev, 0x58) & 0xff00;) See the aruma acpi code for more information. Iirc PMbase is 0xDD00 per default. So PM12 would require inb/outb to 0xdd12.
Also, there's GPIOs connected with FAN control: (pg 244 et sqq) GPIO9 PMC9 FANCON1 08h (FANCON1 output) 1Xb N/A GPIO10 PMCA FANRPM 08h (FANRPM input) 1Xb direct
And on the SMBus you have the following registers: Fan Control Register PMF8 (Sounds like this belongs to the PMxx registers)
Ok, now we need to glue this all together so that it works.
Stefan
Hi YH,
Have you made any progress on this? Not being able to control the fans is the last thing that is stopping us from deploying LinuxBIOS. I'm worried that the fans will wear out because they come on at full speed after boot, and I can't control them under LinuxBIOS (except if I boot the proprietary BIOS once, and then don't unplug the power to the machine before booting in LinuxBIOS).
Any help would be _greatly_ appreciated...
Thanks, Ward.
On Thu, Apr 20, 2006 at 04:59:52PM -0700, Lu, Yinghai wrote:
I have inited the hw sensors in LinuxBIOS for s2881. So you could use lmsensor to check the FAN speed. The config file is on Tyan web.
For the Fan control, there should more some reg setting...to reduce the FAN speed winbond and adm1027...
YH
!DSPAM:444820c0151711016910990!