Bug #455
opensuperiotool detects Aspeed AST2400 instead of Nuvoton NCT6779D
0%
Description
sudo ./superiotool
Found Aspeed AST2400 (id=0x00) at 0x4e
sudo ./superiotool
superiotool r4.19-306-g12ec7901b7
No Super I/O found
Does superiotool provide debug symbols?
Without debug symbols I can't use gdb to provide more useful information.
Updated by shen Liu almost 2 years ago
sudo ./superiotool
superiotool r4.19-306-g12ec7901b7
Found Aspeed AST2400 (id=0x00) at 0x4e
sudo ./superiotool
superiotool r4.19-306-g12ec7901b7
No Super I/O found
A modification of little significance. To be honest, this Issue system is confusing. I can't edit the text, but my Github Issue allows me to edit the text, which is more efficient to be honest.
Updated by Nicholas Chin almost 2 years ago
shen Liu wrote:
sudo ./superiotool Found Aspeed AST2400 (id=0x00) at 0x4e sudo ./superiotool superiotool r4.19-306-g12ec7901b7 No Super I/O found
Does superiotool provide debug symbols?
Without debug symbols I can't use gdb to provide more useful information.
Not by default, but it should be pretty easy to compile them in i.e. CFLAGS="-g" make
or by editing the CFLAGS variable in the makefile. You may also want to remove the "-O2" flag to avoid GCC reordering code/optimizing out function calls which can make it harder to trace.
Updated by shen Liu almost 2 years ago
Nicholas Chin wrote in #note-2:
shen Liu wrote:
sudo ./superiotool Found Aspeed AST2400 (id=0x00) at 0x4e sudo ./superiotool superiotool r4.19-306-g12ec7901b7 No Super I/O found
Does superiotool provide debug symbols?
Without debug symbols I can't use gdb to provide more useful information.Not by default, but it should be pretty easy to compile them in i.e.
CFLAGS="-g" make
or by editing the CFLAGS variable in the makefile. You may also want to remove the "-O2" flag to avoid GCC reordering code/optimizing out function calls which can make it harder to trace.
Starting program: /home/test/coreboot/util/superiotool/superiotool
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Inferior 1 (process 1254) exited normally]
Exception ignored in: <gdb._GdbOutputFile object at 0x7f8f82fcf340>
Traceback (most recent call last):
File "/usr/share/gdb/python/gdb/__init__.py", line 47, in flush
def flush(self):
KeyboardInterrupt:
Starting program: /home/test/coreboot/util/superiotool/superiotool
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Inferior 1 (process 1385) exited normally]
It doesn't seem to have any useful information.
The obtained chip model is wrong. In fact, the correct chip model is NCT6779D
Updated by Nicholas Chin almost 2 years ago
shen Liu wrote in #note-3:
Starting program: /home/test/coreboot/util/superiotool/superiotool
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Inferior 1 (process 1254) exited normally]
Exception ignored in: <gdb._GdbOutputFile object at 0x7f8f82fcf340>
Traceback (most recent call last):
File "/usr/share/gdb/python/gdb/__init__.py", line 47, in flush
def flush(self):
KeyboardInterrupt:
Starting program: /home/test/coreboot/util/superiotool/superiotool
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Inferior 1 (process 1385) exited normally]It doesn't seem to have any useful information.
I'm not sure what you were expecting. GDB and debug symbols don't magically cause debug messages to be printed out when you just run it. If you just use run
in GDB, it will run the program until it hits a breakpoint or an exception (a runtime error). Debug symbols just tell GDB what line of code corresponds to each instruction in the compiled binary. It doesn't look like you had any breakpoints set and superiotool isn't running into any errors, so it just runs to completion (the [Inferior 1 (process 1385) exited normally]
line)
The obtained chip model is wrong. In fact, the correct chip model is NCT6779D
Superiotool isn't guaranteed to correctly detect the correct chip model, and can be limited by how the hardware is set up. Most superios have an ID register, and superiotool tries to read this register over commonly used IO ports such as 0x2e or 0x4e. If the superio is on a non-typical port, it may not be detected. However, the NCT6779D on the H81M-P33 appears to use port 0x4e based on the coreboot source code, and as that board is similar to your board I would assume it would be on the same port.
The AST2400 doesn't have such an ID register so superiotool attempts to read a characteristic value from a specific register to attempt to identify it. From your logs superiotool is detecting something on port 0x4e, which is probably the NCT6779D, but this limitation in the AST2400 detection method is causing a false positive. It's also possible that this method causes the NCT6779D to stop responding, which might explain why nothing is detected on subsequent runs of superiotool. Normally superiotool will print every chip that it detects during a run, but since Nuvoton chips are probed for after Aspeed chips, the initial probe for the AST2400 might be preventing the NCT6779D from being detected afterwards as it stops responding.
The AST2400 has been known to cause false positives and an idea had been proposed before to allow a user to specify a vendor to probe for, so in this case "only probe for nuvoton and nothing else" as it's often easy to determine the vendor from a visual inspection of the board.
As a workaround for now, you could try ignoring aspeed chips by commenting out line 233 in superiotool.h
227 /** Table of which config ports to probe for each Super I/O family. */
228 static const struct {
229 void (*probe_idregs) (uint16_t port);
230 int ports[MAXNUMPORTS]; /* Signed, as we need EOT. */
231 } superio_ports_table[] = {
232 {probe_idregs_ali, {0x3f0, 0x370, EOT}},
233 /* ignore aspeed {probe_idregs_aspeed, {0x2e, 0x4e, EOT}},*/
234 {probe_idregs_exar, {0x2e, 0x4e, EOT}},
235 {probe_idregs_fintek, {0x2e, 0x4e, EOT}},
236 {probe_idregs_fintek_alternative, {0x2e, 0x4e, EOT}},
237 /* Only use 0x370 for ITE, but 0x3f0 or 0x3bd would also be valid. */
238 {probe_idregs_ite, {0x20e, 0x25e, 0x2e, 0x4e, 0x370, 0x6e, EOT}},
239 {probe_idregs_nsc, {0x2e, 0x4e, 0x15c, 0x164e, EOT}},
240 /* I/O pairs on Nuvoton EC chips can be configured by firmware in
241 * addition to the following hardware strapping options. */
242 {probe_idregs_nuvoton, {0x164e, 0x2e, 0x4e, EOT}},
243 {probe_idregs_smsc, {0x2e, 0x4e, 0x162e, 0x164e, 0x3f0, 0x370, EOT}},
244 {probe_idregs_winbond, {0x2e, 0x4e, 0x3f0, 0x370, 0x250, EOT}},
245 #ifdef PCI_SUPPORT
246 {probe_idregs_via, {0x2e, 0x4e, 0x3f0, EOT}},
247 /* in fact read the BASE from HW */
248 {probe_idregs_amd, {0xaa, EOT}},
249 #endif
250 {probe_idregs_serverengines, {0x2e, EOT}},
251 {probe_idregs_infineon, {0x2e, 0x4e, EOT}},
252 };
You might need to power cycle the system to get the NCT6779D to respond again if the aspeed detection is indeed causing it to stop responding
Updated by Angel Pons almost 2 years ago
Have you tried running sudo superiotool -d
? This should show the register dump for the Nuvoton Super I/O on your board. The AST2400 detection procedure is delusional (read random registers, if any returns non-zero then we have an AST2400), so it often results in false positives.
Updated by shen Liu almost 2 years ago
Nicholas Chin wrote in #note-4:
As a workaround for now, you could try ignoring aspeed chips by commenting out line 233 in superiotool.h
I did this, but the result was that superio was not detected.
Angel Pons wrote in #note-5:
Have you tried running
sudo superiotool -d
? This should show the register dump for the Nuvoton Super I/O on your board. The AST2400 detection procedure is delusional (read random registers, if any returns non-zero then we have an AST2400), so it often results in false positives.
superiotool r4.19-306-g12ec7901b7
Found Aspeed AST2400 (id=0x00) at 0x4e
Register dump:
idx 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
val ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
def 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
LDN 0x02 (SUART1)
idx 30 60 61 70 71 f0
val ff ff ff ff ff ff
def 00 03 f8 04 02 RR
LDN 0x03 (SUART2)
idx 30 60 61 70 71 f0
val ff ff ff ff ff ff
def 00 02 f8 03 02 00
LDN 0x04 (SWC)
idx 30 60 61 62 63 64 65 66 67 70 71
val ff ff ff ff ff ff ff ff ff ff ff
def 00 08 e6 08 e0 08 e4 08 e8 09 01
LDN 0x05 (Keyboard config (KBC))
idx 30 60 61 62 63 70 71 72 73 f0
val ff ff ff ff ff ff ff ff ff ff
def 00 00 60 00 64 01 02 0c 02 83
LDN 0x07 (GPIO)
idx 30 38 70 71
val ff ff ff ff
def 00 00 0b 01
LDN 0x0b (SUART3)
idx 30 60 61 70 71 f0
val ff ff ff ff ff ff
def 00 03 e8 06 02 00
LDN 0x0c (SUART4)
idx 30 60 61 70 71 f0
val ff ff ff ff ff ff
def 00 02 e8 05 02 00
LDN 0x0d (iLPC2AHB)
idx 30 70 71 f0 f1 f2 f3 f4 f5 f6 f7 f8 fe
val ff ff ff ff ff ff ff ff ff ff ff ff ff
def 00 09 01 NA NA NA NA NA NA NA NA 00 00
LDN 0x0e (Mailbox)
idx 30 60 61 70 71
val ff ff ff ff ff
def 00 08 c0 09 01
Updated by Martin Roth almost 2 years ago
- Subject changed from superiotool recognizes the wrong chip and doesn't work. to superiotool detects Aspeed AST2400 instead of Nuvoton NCT6779D
Updated by Walter Sonius about 1 month ago · Edited
Quick and dirty fix!
The same issue on MSI H87-G43 (ms7816 rev1.2) appears, although NCT6779D is supported however not the specific model with ID0xc563
. In the "nuvoton.c" source file from the "superiotool" alter the ID on line number 551 from 0xc562
to 0xc563
. Since I don't know how to add an extra ID/condition to the source file, this will break detection for someone with the 0xc562
chip. Can someone please do pull request for superiotool?
https://github.com/coreboot/coreboot/blob/main/util/superiotool/nuvoton.c
{0xc562, "NCT6779D", {
replace with {0xc563, "NCT6779D", {
The first time using superiotool
without this fix, it will detect wrongly the Aspeed chipset just like the Original Poster reports but returns chip_id=0xc563
hinted multiple times. Subsequent runs of the superiotool
won't find any chipset anymore but will end with No Super I/O found
...
uname -a
Linux ubuntu-mate 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 2 20:41:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
sudo dmesg | grep H87
[ 0.000000] DMI: MSI MS-7816/H87-G43 (MS-7816), BIOS V2.9 07/16/2014
sudo superiotool -l | grep 6779
Nuvoton NCT6775F (A) (dump available)
Nuvoton NCT6775F (B) / NCT5572D (B) (not all LDNs supported) (dump available)
Nuvoton NCT6776F (B) (dump available)
Nuvoton NCT6776F/D (C) (dump available)
Nuvoton NCT6779D (dump available) <---------------Partly supported
sudo superiotool -aV
superiotool r
Probing for ALi Super I/O at 0x3f0...
Failed. Returned data: id=0xffff, rev=0xff
Probing for ALi Super I/O at 0x370...
Failed. Returned data: id=0xffff, rev=0xff
Probing for Aspeed Super I/O at 0x2e...
Failed. Returned data: scratch registers all read as 0xff
Probing for Aspeed Super I/O at 0x4e...
Found Aspeed AST2400 (id=0x00) at 0x4e <----------------Wrong
Probing for Exar Super I/O at 0x2e...
Failed. Returned data: vid=0xffff, id=0xffff
Probing for Exar Super I/O at 0x4e...
... truncated output...
Probing for Nuvoton Super I/O at 0x164e...
Failed. Returned data: chip_id=0xffff
Probing for Nuvoton Super I/O (sid=0xfc) at 0x164e...
Failed. Returned data: sid=0xff, id=0xffff, rev=0x00
Probing for Nuvoton Super I/O at 0x2e...
Failed. Returned data: chip_id=0xffff
Probing for Nuvoton Super I/O (sid=0xfc) at 0x2e...
Failed. Returned data: sid=0xff, id=0xffff, rev=0x00
Probing for Nuvoton Super I/O at 0x4e...
Failed. Returned data: chip_id=0xc563 <------------------------Hint
Probing for Nuvoton Super I/O (sid=0xfc) at 0x4e...
...truncated...
Fixed superiotool output, replaced line 551 ID c562 > c563 and it will dump/report real registers values:
sudo ./superiotool -dV
superiotool r
Probing for ALi Super I/O at 0x3f0...
Failed. Returned data: id=0xffff, rev=0xff
Probing for ALi Super I/O at 0x370...
Failed. Returned data: id=0xffff, rev=0xff
Probing for Aspeed Super I/O at 0x2e...
Failed. Returned data: scratch registers all read as 0xff
Probing for Aspeed Super I/O at 0x4e...
Failed. Returned data: scratch registers all read as 0xff
...truncated...
Probing for Nuvoton Super I/O (sid=0xfc) at 0x2e...
Failed. Returned data: sid=0xff, id=0xffff, rev=0x00
Probing for Nuvoton Super I/O at 0x4e...
Found Nuvoton NCT6779D (id=0xc563) at 0x4e
Register dump:
idx 10 11 13 14 1a 1b 1c 1d 20 21 22 24 25 26 27 28 2a 2b 2c 2f
val ff ff ff ff 30 70 08 00 c5 63 ff 04 00 40 00 00 40 00 00 0b <------------ real values not FFFFFFFFFFFFFFFFFFFFFFF
def ff ff 00 00 30 70 10 00 c5 62 ff 04 00 MM 00 00 c0 00 01 MM
LDN 0x01 (Parallel Port)
idx 30 60 61 70 74 f0
val 01 03 78 05 04 3c
def 01 03 78 07 04 3f
LDN 0x02 (UART A)
idx 30 60 61 70 f0 f2
val 01 03 f8 04 00 00
def 01 03 f8 04 00 00
LDN 0x03 (UART B, IR)
idx 30 60 61 70 f0 f1 f2
val 00 02 f8 03 00 00 00
def 01 02 f8 03 00 00 00
LDN 0x05 (Keyboard Controller)
idx 30 60 61 62 63 70 72 f0
val 01 00 60 00 64 01 0c 83
def 00 00 00 00 00 00 00 83
LDN 0x06 (CIR)
idx 30 60 61 70 f0 f1 f2 f3
val 00 00 00 00 08 09 32 00
def 00 00 00 00 08 09 32 00
LDN 0x07 (GPIO6, GPIO7, GPIO8)
idx e0 e1 e2 e3 e4 e5 e6 e7 ec ed f4 f5 f6 f7 f8
val 73 0f 00 0f ff ff ff ff 00 ff ff ff ff ff ff
def 0f 00 00 00 ff 00 00 00 00 00 ff 00 00 00 00
LDN 0x08 (WDT1, GPIO0, GPIO1)
idx 30 60 61 e0 e1 e2 e3 e4 f0 f1 f2 f3 f4 f5 f6 f7
val 00 00 00 ff ff ff ff ff ff d8 00 00 00 ff 00 ff
def 00 00 00 ff 00 00 00 00 ff 00 00 00 00 00 00 00
LDN 0x09 (GPIO1, GPIO2, GPIO3, GPIO4, GPIO5, GPIO6, GPIO7, GPIO8)
idx 30 e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ee f0 f1 f2 f4 f5 f6 f7 fe
val be df 60 00 60 7f 06 00 06 00 00 00 c0 00 ff 00 00 3f 00 00 c0 00
def 00 ff 00 00 00 7f 00 00 00 00 00 00 00 00 ff 00 00 ff 00 00 00 00
LDN 0x0a (ACPI)
idx e0 e1 e2 e3 e4 e5 e6 e7 e9 ee f0 f2 f3 f4 f6 f7 fe
val 01 00 00 15 08 02 5c 00 00 00 10 5c 00 00 00 c0 00
def 01 00 00 00 00 02 1c 00 00 00 10 5c 00 00 00 c0 00
LDN 0x0b (Hardware Monitor, Front Panel LED)
idx 30 60 61 62 63 70 e0 e1 e2 e4 f0 f1 f2 f5 f6 f7 f8 f9 fa
val 01 0a 00 0a 10 00 7f 7f ff 7f 00 00 00 00 00 87 47 00 00
def 00 00 00 00 00 00 7f 7f ff ff 00 00 00 10 00 87 47 00 00
LDN 0x0d (WDT1)
idx f0
val 00
def 00
LDN 0x0e (CIR WAKE-UP)
idx 30 60 61 70
val 00 00 00 00
def 00 00 00 00
LDN 0x0f (GPIO Push-Pull or Open-drain)
idx e0 e1 e2 e3 e4 e5 e6 e7 e9 f0 f1 f2
val ff df 7f ff ff ff 7b ff ff 9d 00 00
def ff ff 7f ff ff ff 0f ff ff 9d 00 00
LDN 0x14 (Port 80 UART)
idx e0 e1 e2 e3 e4
val 80 00 00 10 00
def 80 00 00 10 00
LDN 0x16 (Deep Sleep)
idx 30 e0 e1 e2
val 20 20 04 05
def 20 20 04 05
Probing for SMSC Super I/O (idregs=0x20/0x21) at 0x2e...
Failed. Returned data: id=0xff, rev=0xff
...truncated...
Other debug info related to lm_sensors
and this specific chipset.
sudo sensors-detect #truncated output
Found `Nuvoton NCT5532D/NCT6779D Super IO Sensors' Success!
(address 0xa00, driver `nct6775')
Driver `nct6775':
* ISA bus, address 0xa00
Chip `Nuvoton NCT5532D/NCT6779D Super IO Sensors' (confidence: 9)
sudo modprobe nct6775
sudo dmesg | tail -n 1
[ 506.259692] nct6775: Found NCT6779D or compatible chip at 0x4e:0xa00
sensors
radeon-pci-0100
Adapter: PCI adapter
temp1: +35.0 C (crit = +120.0 C, hyst = +90.0 C)
acpitz-acpi-0
Adapter: ACPI interface
temp1: +27.8 C
temp2: +29.8 C
nct6779-isa-0a00
Adapter: ISA adapter
Vcore: 872.00 mV (min = +0.00 V, max = +1.74 V)
in1: 1.04 V (min = +0.00 V, max = +0.00 V) ALARM
AVCC: 3.39 V (min = +0.00 V, max = +0.00 V) ALARM
+3.3V: 3.39 V (min = +0.00 V, max = +0.00 V) ALARM
in4: 1.10 V (min = +0.00 V, max = +0.00 V) ALARM
in5: 848.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in6: 1.06 V (min = +0.00 V, max = +0.00 V) ALARM
3VSB: 3.44 V (min = +0.00 V, max = +0.00 V) ALARM
Vbat: 3.31 V (min = +0.00 V, max = +0.00 V) ALARM
in9: 1.02 V (min = +0.00 V, max = +0.00 V) ALARM
in10: 24.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in11: 0.00 V (min = +0.00 V, max = +0.00 V)
in12: 1.02 V (min = +0.00 V, max = +0.00 V) ALARM
in13: 752.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in14: 784.00 mV (min = +0.00 V, max = +0.00 V) ALARM
fan1: 0 RPM (min = 0 RPM)
fan2: 1010 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
fan4: 0 RPM (min = 0 RPM)
fan5: 0 RPM (min = 0 RPM)
SYSTIN: +27.0 C (high = +0.0 C, hyst = +0.0 C) ALARM sensor = CPU diode
CPUTIN: +127.5 C (high = +80.0 C, hyst = +75.0 C) ALARM sensor = CPU diode
AUXTIN0: +22.0 C sensor = thermistor
AUXTIN1: +127.0 C sensor = thermistor
AUXTIN2: -128.0 C sensor = thermistor
AUXTIN3: -52.0 C sensor = thermal diode
PECI Agent 0: +31.0 C
PCH_CHIP_CPU_MAX_TEMP: +0.0 C
PCH_CHIP_TEMP: +0.0 C
PCH_CPU_TEMP: +0.0 C
PCH_MCH_TEMP: +0.0 C
PCH_DIM0_TEMP: +0.0 C
intrusion0: ALARM
intrusion1: ALARM
beep_enable: disabled
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +32.0 C (high = +80.0 C, crit = +100.0 C)
Core 0: +30.0 C (high = +80.0 C, crit = +100.0 C)
Core 1: +32.0 C (high = +80.0 C, crit = +100.0 C)