./0000700000175000017500000000000011575435404007373 5ustar uweuwe./nsc.c0000600000175000017500000005557011534745507010343 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2006 Ronald Minnich * Copyright (C) 2007 Uwe Hermann * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "superiotool.h" #define CHIP_ID_REG 0x20 /* Super I/O ID (SID) / family */ #define CHIP_REV_REG 0x27 /* Super I/O revision ID (SRID) */ static const struct superio_registers reg_table[] = { {0xcf, "PC97307", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x27,EOT}, {0xcf,MISC,MISC,0x00,0x00,NANA,EOT}}, {0x0, "Keyboard", {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75, 0xf0,EOT}, {MISC,0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04, 0x40,EOT}}, {0x1, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x2, "Real-time clock (RTC), advanced power control (APC)", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,EOT}, {MISC,0x00,0x00,0x70,0x08,0x00,0x04,0x04,EOT}}, {0x3, "Floppy", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1, EOT}, {MISC,0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x20,0x00, EOT}}, {0x4, "Parallel port", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x02,0x78,0x07,0x00,0x04,0x04,0xf2,EOT}}, {0x5, "COM2 / IR", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x6, "COM1", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x7, "GPIO", {0x30,0x31,0x60,0x61,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x04,0x04,EOT}}, {0x8, "Power management", {0x30,0x31,0x60,0x61,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x04,0x04,EOT}}, {EOT}}}, {0xd0, "PC87317", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,EOT}, {0xd0,MISC,MISC,0x00,0x00,0x00,EOT}}, {0x0, "Keyboard", {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75, 0xf0,EOT}, {MISC,0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04, 0x40,EOT}}, {0x1, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x2, "Real-time clock (RTC), advanced power control (APC)", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,EOT}, {MISC,0x00,0x00,0x70,0x08,0x00,0x04,0x04,EOT}}, {0x3, "Floppy", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1, EOT}, {MISC,0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x20,0x00, EOT}}, {0x4, "Parallel port", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x02,0x78,0x07,0x00,0x04,0x04,0xf2,EOT}}, {0x5, "COM2 / IR", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x6, "COM1", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x7, "GPIO", {0x30,0x31,0x60,0x61,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x04,0x04,EOT}}, {0x8, "Power management", {0x30,0x31,0x60,0x61,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x04,0x04,EOT}}, {EOT}}}, {0xdf, "PC97317", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x27,EOT}, {0xdf,MISC,MISC,0x00,0x00,0x00,NANA,EOT}}, {0x0, "Keyboard", {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75, 0xf0,EOT}, {MISC,0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04, 0x40,EOT}}, {0x1, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x2, "Real-time clock (RTC), advanced power control (APC)", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,EOT}, {MISC,0x00,0x00,0x70,0x08,0x00,0x04,0x04,EOT}}, {0x3, "Floppy", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1, EOT}, {MISC,0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x20,0x00, EOT}}, {0x4, "Parallel port", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x02,0x78,0x07,0x00,0x04,0x04,0xf2,EOT}}, {0x5, "COM2 / IR", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x6, "COM1", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x7, "GPIO", {0x30,0x31,0x60,0x61,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x04,0x04,EOT}}, {0x8, "Power management", {0x30,0x31,0x60,0x61,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x04,0x04,EOT}}, {EOT}}}, {0xe0, "PC87309", { {NOLDN, NULL, {0x20,0x21,0x22,0x27,0x2e,EOT}, {0xe0,MISC,0x00,NANA,RSVD,EOT}}, {0x0, "Floppy", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1, EOT}, {MISC,0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x20,0x00, EOT}}, {0x1, "Parallel port", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x02,0x78,0x07,0x00,0x04,0x04,0xf2,EOT}}, {0x2, "COM2 / IR", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x3, "COM1", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x4, "Power management", {0x30,0x31,0x60,0x61,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x04,0x04,EOT}}, {0x5, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x6, "Keyboard", {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75, 0xf0,EOT}, {0x01,0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04, 0x40,EOT}}, {EOT}}}, {0xe1, "PC87360", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x2a, 0x2b,0x2c,0x2d,0x2e,EOT}, {0xe1,0x11,0x00,0x03,0x00,0x00,0x00,NANA,0x00,MISC, 0x00,0x00,0x00,RSVD,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT}, {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0x78,0x07,0x02,0x04,0x04,0xf2,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x3, "COM1", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x4, "System wake-up control (SWC)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}}, {0x5, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x6, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0, EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,0x40, EOT}}, {0x7, "GPIO", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2, EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,0x00,0x00, EOT}}, {0x8, "ACCESS.bus (ACB)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,EOT}}, {0x9, "Fan speed control and monitor (FSCM)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,EOT}}, {0xa, "Watchdog timer", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x02,EOT}}, {EOT}}}, {0xe2, "PC87351", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x27,0x2e,EOT}, {0xe2,0x11,0xa1,0x00,MISC,NANA,RSVD,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT}, {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0x78,0x07,0x02,0x04,0x04,0xf2,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x3, "COM1", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x4, "System wake-up control (SWC)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}}, {0x5, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x6, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75, 0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04, 0x40,EOT}}, {0x7, "GPIO", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,0x00,EOT}}, {0x8, "Fan speed control", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,EOT}}, {EOT}}}, {0xe4, "PC87364", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x2a, 0x2b,0x2c,0x2d,0x2e,EOT}, {0xe4,0x11,0x00,0x03,0x00,0x00,0x00,NANA,0x00,MISC, 0x00,0x00,NANA,RSVD,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT}, {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0x78,0x07,0x02,0x04,0x04,0xf2,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x3, "COM1", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x4, "System wake-up control (SWC)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}}, {0x5, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x6, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0, EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,0x40, EOT}}, {0x7, "GPIO", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2, EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,0x00,0x00, EOT}}, {0x8, "ACCESS.bus (ACB)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,EOT}}, {0x9, "Fan speed control and monitor (FSCM)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,0x00,EOT}}, {0xa, "Watchdog timer", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x02,EOT}}, {EOT}}}, {0xe5, "PC87365", { /* SRID[7..0] == chip revision */ {EOT}}}, {0xe8, "PC87363", { {EOT}}}, {0xe9, "PC87366", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x27,0x28,0x2a,0x2b, 0x2c,0x2d,0x2e,EOT}, {0xe9,0x11,0x00,0x03,0x00,0x00,NANA,0x00,MISC,MISC, 0x00,MISC,RSVD,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT}, {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0x78,0x07,0x02,0x04,0x04,0xf2,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x3, "COM1", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x4, "System wake-up control (SWC)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}}, {0x5, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x6, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0, EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,0x40, EOT}}, {0x7, "GPIO", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2, EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,0x00,0x00, EOT}}, {0x8, "ACCESS.bus (ACB)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,EOT}}, {0x9, "Fan speed control and monitor (FSCM)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2, EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,0x00,0x00, EOT}}, {0xa, "Watchdog timer (WDT)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x02,EOT}}, {0xb, "Game port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0x00,0x00,0x03,0x04,0x04,0x00,EOT}}, {0xc, "MIDI port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0x30,0x00,0x03,0x04,0x04,0x00,EOT}}, {0xd, "Voltage level monitor (VLM)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}}, {0xe, "Temperature sensor (TMS)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}}, {EOT}}}, {0xf4, "PC87382", { {NOLDN, NULL, {0x20,0x21,0x22,0x26,0x27,0x29,EOT}, {0xf4,0x11,0x63,0x00,0x00,0x00,EOT}}, {0x02, "IR", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x03, "COM1", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x07, "GPIO", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1, 0xf2,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,MISC, 0x01,EOT}}, {0x19, "Docking LPC switch", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x00,0x04,0x04,EOT}}, {EOT}}}, /* SID[7..0]: family, SRID[7..5]: ID, SRID[4..0]: rev. */ {0xea, "PC8739x", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29, 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0xea,0x11,MISC,MISC,MISC,0x80,0x00,NANA,0x00,MISC, 0x37,RSVD,RSVD,RSVD,RSVD,RSVD,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT}, {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0x78,0x07,0x02,0x04,0x04,0xf2,EOT}}, {0x2, "COM2 / FIR", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x3, "COM1", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x7, "GPIO", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2, EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,0x44,0x01, EOT}}, {0xa, "Watchdog timer (WDT)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x02,EOT}}, {0xb, "Game port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0x01,0x00,0x03,0x04,0x04,0x00,EOT}}, {0xc, "MIDI port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0x30,0x00,0x03,0x04,0x04,0x00,EOT}}, {0xf, "X-Bus", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2, 0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,EOT}, {0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {EOT}}}, {0xec, "PC87591x", { /* SRID[7..5]: 000=PC87591E, 001=PC87591S, 100=PC87591L */ {EOT}}}, {0xee, "PC8741x", { /* SRID[7..5] is marked as "not applicable for the PC8741x". */ {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29, 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0xee,0x11,0x20,MISC,MISC,MISC,0x00,NANA,0x00,MISC, 0x00,RSVD,RSVD,RSVD,RSVD,RSVD,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT}, {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0x78,0x07,0x02,0x04,0x04,0xf2,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x3, "COM1", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x4, "System wake-up control (SWC)", {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x70, 0x71,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x03,0x04,0x04,EOT}}, {0x5, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x6, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0, EOT}, {0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,0x40, EOT}}, {0x7, "GPIO", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2, 0xf3,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,MISC,0x01, 0x00,EOT}}, {0xf, "X-Bus", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2, 0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc, EOT}, {0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, EOT}}, {0x10, "Real-time clock (RTC)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0, 0xf1,0xf2,0xf3,EOT}, {0x00,0x00,0x70,0x00,0x72,0x08,0x00,0x04,0x04,0x00, 0x00,0x00,0x00,EOT}}, {EOT}}}, {0xf0, "PC87372", { {EOT}}}, {0x0f1, "PC8374L", { {NOLDN, NULL, {0x10,0x12,0x13,0x20,0x21,0x22,0x23,0x24,0x25,0x26, 0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0x00,0x00,0x00,0xf1,0x11,0x00,0x00,0x00,RSVD,0x00, MISC,RSVD,0x01,0x2e,RSVD,RSVD,RSVD,RSVD,RSVD,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf8, EOT}, {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,0x24, EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf8,EOT}, {0x00,0x02,0x78,0x07,0x02,0x04,0x04,0xf2,0x07,EOT}}, {0x2, "COM2 / IR", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x3, "COM1", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x4, "System wake-up control (SWC)", {0x30,0x50,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75, EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04, EOT}}, {0x5, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x6, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0, EOT}, {0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,0x40, EOT}}, {0x7, "GPIO", {0x30,0x50,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1, 0xf2,0xf3,0xf8,EOT}, {0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,MISC, 0x00,MISC,0x01,EOT}}, {0x8, "Health management", {0x30,0x50,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x05,EOT}}, {EOT}}}, {0x8f1, "WPCD376I", { {NOLDN, NULL, {0x10,0x12,0x13,0x20,0x21,0x22,0x23,0x24,0x25,0x26, 0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0x00,0x00,0x00,0xf1,0x11,0x00,0x00,0x00,RSVD,0x00, MISC,RSVD,0x01,0x2e,RSVD,RSVD,RSVD,RSVD,RSVD,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf8, EOT}, {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,0x24, EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf8,EOT}, {0x00,0x02,0x78,0x07,0x02,0x04,0x04,0xf2,0x07,EOT}}, {0x2, "IR", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x3, "COM1", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x4, "System wake-up control (SWC)", {0x30,0x50,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75, EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04, EOT}}, {0x5, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x6, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0, EOT}, {0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,0x40, EOT}}, {0x7, "GPIO", {0x30,0x50,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1, 0xf2,0xf3,0xf8,EOT}, {0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,MISC, 0x00,MISC,0x01,EOT}}, {EOT}}}, {0xf2, "PC87427", { /* SRID[7..5] is marked as "not applicable for the PC87427". */ {NOLDN, NULL, {0x10,0x12,0x13,0x1d,0x20,0x21,0x22,0x23,0x24,0x25, 0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f, EOT}, {0x00,0x00,0x00,0x00,0xf2,0x11,0xa0,MISC,MISC,MISC, 0x02,NANA,0x00,MISC,0x00,0x00,MISC,MISC,RSVD,RSVD, EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT}, {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {0x3, "COM1", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x4, "System wake-up control (SWC)", {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x70, 0x71,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x03,0x04,0x04,EOT}}, {0x5, "Mouse", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x02,0x04,0x04,EOT}}, {0x6, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0, EOT}, {0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,0x40, EOT}}, {0x7, "GPIO", {0x30,0x50,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1, 0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,EOT}, {0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,MISC, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x9, "Fan Monitor and Control (FMC)", {0x30,0x50,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1, EOT}, {0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x19,0x06, EOT}}, {0xa, "Watchdog timer (WDT)", {0x30,0x50,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,EOT}}, {0xf, "X-Bus", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2, 0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc, 0xfd,0xfe,0xff,EOT}, {0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x80,0x10,EOT}}, {0x10, "Real-time clock (RTC)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0, 0xf1,0xf2,0xf3,0xf6,0xf7,EOT}, {0x00,0x00,0x70,0x00,0x72,0x08,0x00,0x04,0x04,0x00, 0x00,0x00,0x00,MISC,0x00,EOT}}, {0x14, "Health monitoring and control (HMC)", {0x30,0x50,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75, 0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04, 0x05,EOT}}, {EOT}}}, {0xf3, "PC87373", { {EOT}}}, {EOT} }; void probe_idregs_nsc(uint16_t port) { uint8_t id, rev; uint16_t magic; probing_for("NSC", "", port); OUTB(CHIP_ID_REG, port); if (INB(port) != CHIP_ID_REG) { if (verbose) printf(NOTFOUND "port=0x%02x, port+1=0x%02x\n", INB(port), INB(port + 1)); return; } id = INB(port + 1); OUTB(CHIP_REV_REG, port); if (INB(port) != CHIP_REV_REG) { printf("Warning: Can't get chip revision. Setting to 0xff.\n"); rev = 0xff; } else { rev = INB(port + 1); } /* * NSC PC8374L has ID 0xf1, rev 0b000xxxxx according to datasheet. * Winbond WPCD376I has ID 0xf1, rev 0b100xxxxx according to datasheet. */ if (id == 0xf1) magic = ((rev & 0xe0) << 4) | id; else magic = id; if (superio_unknown(reg_table, magic)) { if (verbose) printf(NOTFOUND "sid=0x%02x, srid=0x%02x\n", id, rev); return; } printf("Found %s %s (sid=0x%02x, srid=0x%02x) at 0x%x\n", magic == 0x8f1 ? "Winbond" : "NSC", get_superio_name(reg_table, magic), id, rev, port); chip_found = 1; dump_superio(magic == 0x8f1 ? "Winbond" : "NSC", reg_table, port, magic, LDN_SEL); } void print_nsc_chips(void) { print_vendor_chips("NSC", reg_table); } ./COPYING0000600000175000017500000004310310700762763010431 0ustar uweuwe GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. ./via.c0000600000175000017500000000522211326723316010315 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2009 Carl-Daniel Hailfinger * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "superiotool.h" #define DEVICE_ID_VT82C686_REG 0xe0 #define DEVICE_REV_VT82C686_REG 0xe1 static const struct superio_registers reg_table[] = { {0x3c, "VT82C686A/VT82C686B", { {EOT}}}, {EOT} }; static uint8_t vt82c686_conf = 0; static int enter_conf_mode_via_vt82c686(void) { struct pci_dev *dev; dev = pci_dev_find(0x1106, 0x0686); if (!dev) { if (verbose) printf(" PCI device 1106:0686 not found.\n"); return 1; } vt82c686_conf = pci_read_byte(dev, 0x85); if (verbose) printf(" Super I/O %sabled, Super I/O configuration %sabled\n", (vt82c686_conf & (1 << 0)) ? "en" : "dis", (vt82c686_conf & (1 << 1)) ? "en" : "dis"); /* If the Super I/O is not enabled, skip it. */ if (!(vt82c686_conf & (1 << 0))) return 1; /* Enable Super I/O configuration mode. */ pci_write_byte(dev, 0x85, vt82c686_conf | (1 << 1)); return 0; } static void exit_conf_mode_via_vt82c686(void) { struct pci_dev *dev; dev = pci_dev_find(0x1106, 0x0686); if (!dev) { printf("Bug: PCI device 1106:0686 not found during shutdown.\n" "Please report to coreboot@coreboot.org.\n"); return; } /* Restore (disable?) Super I/O configuration mode setting. */ pci_write_byte(dev, 0x85, vt82c686_conf); } void probe_idregs_via(uint16_t port) { uint16_t id; uint8_t rev; probing_for("VIA", "", port); if (enter_conf_mode_via_vt82c686()) return; id = regval(port, DEVICE_ID_VT82C686_REG); rev = regval(port, DEVICE_REV_VT82C686_REG); if (superio_unknown(reg_table, id)) { if (verbose) printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev); exit_conf_mode_via_vt82c686(); return; } printf("Found VIA %s (id=0x%04x, rev=0x%02x) at 0x%x\n", get_superio_name(reg_table, id), id, rev, port); chip_found = 1; exit_conf_mode_via_vt82c686(); } void print_via_chips(void) { print_vendor_chips("VIA", reg_table); } ./smsc.c0000600000175000017500000006670011527070462010513 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2007 Uwe Hermann * Copyright (C) 2008 coresystems GmbH * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "superiotool.h" #define DEVICE_ID_REG_OLD 0x0d #define DEVICE_REV_REG_OLD 0x0e #define DEVICE_ID_REG 0x20 #define DEVICE_REV_REG 0x21 static const struct superio_registers reg_table[] = { /* The following Super I/Os use the 0x20/0x21 ID registers. */ {0x02, "FDC37C932", { {NOLDN, NULL, {0x02,0x03,0x20,0x21,0x22,0x23,0x24,0x2d,0x2e, 0x2f,EOT}, {0x00,0x03,0x02,0x01,0x00,0x00,0x04,NANA,NANA, 0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x00,EOT}}, {0x1, "IDE 1", {0x30,0x60,0x61,0x62,0x63,0x70,EOT}, {0x00,0x01,0xf0,0x03,0xf6,0x0e,EOT}}, {0x2, "IDE 2", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x6, "Real-time clock (RTC)", {0x30,0x70,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,EOT}, {0x00,0x00,0x00,0x00,0x00,NANA,MISC,NANA,NANA,EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,EOT}, {0x00,0x00,0x00,EOT}}, {0x8, "Aux I/O", {0x30,0x60,0x61,0x62,0x63,0xe0,0xe1,0xe2,0xe3,0xe4, 0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xf0, 0xf1,0xf2,0xf3,0xf4,EOT}, {0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00, 0x00,0x00,0x00,MISC,EOT}}, {EOT}}}, {0x03, "FDC37C93xFR", { /* FIXME: There's another 0x03 but found on port 0x0d/0x0e! */ {EOT}}}, {0x0a, "FDC37N971", { {NOLDN, NULL, {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0x00,0x0a,0x00,0x00,0x00,0x04,0x04,NANA,NANA,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf3,0xf4, 0xf5,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,RSVD,0x00, 0x00,EOT}}, {0x1, "Power management (PM1)", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1, 0xf2,0xf7,0xf8,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02, 0x03,0x00,0x00,EOT}}, {0x6, "Real-time clock (RTC)", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,EOT}, {0x00,0x00,0x70,0x00,0x74,0x00,0x00,NANA,EOT}}, {0x7, "Keyboard", {0x30,0x60,0x61,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x8, "Embedded controller (EC)", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x62,EOT}}, {0x9, "Mailbox", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {EOT}}}, {0x0b, "FDC37N972", { {NOLDN, NULL, {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0x00,0x0b,0x00,0x00,0x00,0x04,0x04,NANA,NANA,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf3,0xf4, 0xf5,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,RSVD,0x00, 0x00,EOT}}, {0x1, "Power management (PM1)", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1, 0xf2,0xf7,0xf8,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02, 0x03,0x00,0x00,EOT}}, {0x6, "Real-time clock (RTC)", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,EOT}, {0x00,0x00,0x70,0x00,0x74,0x00,0x00,NANA,EOT}}, {0x7, "Keyboard", {0x30,0x60,0x61,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x8, "Embedded controller (EC)", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x62,EOT}}, {0x9, "Mailbox", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {EOT}}}, {0x0e, "LPC47N252", { /* From sensors-detect */ {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0x0e,NANA,0x00,0x00,0x04,0x04,NANA,NANA,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf3,0xf4, 0xf5,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,RSVD,0x00, 0x00,EOT}}, {0x1, "Power management (PM1)", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2 / IRCC", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1, 0xf2,0xf7,0xf8,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02, 0x03,0x00,0x00,EOT}}, {0x6, "Real-time clock (RTC)", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,EOT}, {0x00,0x00,0x70,0x00,0x74,0x00,0x00,NANA,EOT}}, {0x7, "Keyboard", {0x30,0x60,0x61,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x8, "Embedded controller (EC)", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x62,EOT}}, {0x9, "Mailbox Interface", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0xa, "LPC/8051 addressable GPIO (LGPIO)", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {EOT}}}, {0x14, "LPC47M172", { {EOT}}}, {0x30, "FDC37C93xAPM", { {EOT}}}, {0x40, "FDC37C67x", { /* E.g. FDC37C672. Chiprev: 0x01 */ {NOLDN, NULL, {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x2b,0x2c, 0x2d,0x2e,0x2f,EOT}, {0x03,0x40,NANA,0x00,0x00,0x04,MISC,MISC,NANA,NANA, NANA,NANA,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5, EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00, EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2, EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03, EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x8, "Aux I/O", {0x30,0xb4,0xb5,0xb6,0xb7,0xc0,0xc1,0xc2,0xc3,0xc4, 0xf1,0xf2,0xf3,0xf4,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb, EOT}, {0x00,NANA,NANA,NANA,NANA,0x06,0x03,NANA,NANA,NANA, 0x00,0x00,0x00,MISC,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD, EOT}}, {EOT}}}, {0x42, "FDC37B80x/FDC37M707", { {EOT}}}, {0x09, "FDC37N958FR", { /* Found in e.g. Dell Latitude CPi A366XT. */ {NOLDN, NULL, {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2b, 0x2c,0x2d,0x2e,0x2f,EOT}, {0x03,0x44,0x00,0x00,0x00,0x04,MISC,MISC,0x00,NANA, NANA,NANA,NANA,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5, EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00, EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2, EOT}, {NANA,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03, EOT}}, {0x6, "Real-time clock (RTC)", {0x30,0x62,0x63,0x70,0xf0,EOT}, {0x00,0x00,0x70,0x00,0x00,EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x8, "Aux I/O", {0x30,0xb0,0xb1,0xb2,0xb3,0xb8,0xc0,0xc1,0xc2,0xc3, 0xc4,0xc5,0xc6,0xc8,0xca,0xcb,0xcc,0xd0,0xd1,0xd2, 0xd3,0xd4,0xd5,0xd6,0xd7,0xe0,0xe1,0xe2,0xe3,0xe4, 0xe5,0xe6,0xe7,0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6, 0xf9,0xfa,EOT}, {0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x01,NANA,NANA, NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,0x00,0x00,0x00,0x00,NANA, NANA,NANA,EOT}}, {0xa, "ACPI", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,NANA,NANA,EOT}}, {EOT}}}, {0x43, "FDC37B77x", { {EOT}}}, {0x44, "FDC37B78x", { {NOLDN, NULL, {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2b, 0x2c,0x2d,0x2e,0x2f,EOT}, {0x03,0x44,0x00,0x00,0x00,0x04,MISC,MISC,0x00,NANA, NANA,NANA,NANA,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5, EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00, EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2, EOT}, {NANA,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03, EOT}}, {0x6, "Real-time clock (RTC)", {0x30,0x62,0x63,0x70,0xf0,EOT}, {0x00,0x00,0x70,0x00,0x00,EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x8, "Aux I/O", {0x30,0xb0,0xb1,0xb2,0xb3,0xb8,0xc0,0xc1,0xc2,0xc3, 0xc4,0xc5,0xc6,0xc8,0xca,0xcb,0xcc,0xd0,0xd1,0xd2, 0xd3,0xd4,0xd5,0xd6,0xd7,0xe0,0xe1,0xe2,0xe3,0xe4, 0xe5,0xe6,0xe7,0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6, 0xf9,0xfa,EOT}, {0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x01,NANA,NANA, NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,0x00,0x00,0x00,0x00,NANA, NANA,NANA,EOT}}, {0xa, "ACPI", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,NANA,NANA,EOT}}, {EOT}}}, {0x46, "FDC37M602", { /* Found in Biostar M6TLD. */ {EOT}}}, {0x47, "FDC37M60x", { /* TODO: Not yet in sensors-detect */ {EOT}}}, {0x4c, "FDC37B72x", { {NOLDN, NULL, {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2b, 0x2c,0x2d,0x2e,0x2f,EOT}, {0x03,0x4c,0x00,0x00,0x00,0x04,MISC,MISC,0x00,NANA, NANA,NANA,NANA,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5, EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00, EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {NANA,0x00,0x00,0x00,0x00,0x02,0x03,EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x8, "Aux I/O", {0x30,0xb0,0xb1,0xb2,0xb3,0xb8,0xc0,0xc1,0xc2,0xc3, 0xc4,0xc5,0xc6,0xc8,0xca,0xcb,0xcc,0xd0,0xd1,0xd2, 0xd3,0xd4,0xd5,0xd6,0xd7,0xe0,0xe1,0xe2,0xe3,0xe4, 0xe5,0xe6,0xe7,0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6, 0xf9,0xfa,EOT}, {0x00,NANA,NANA,NANA,NANA,NANA,0x00,0x01,NANA,NANA, NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,0x00,0x00,0x00,MISC,NANA, NANA,NANA,EOT}}, {0xa, "ACPI", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,NANA,NANA,EOT}}, {EOT}}}, #if 0 /* FIXME: FDC37M81x and MEC1308 have conflicting device IDs */ {0x4d, "FDC37M81x", { {NOLDN, NULL, {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x2b,0x2c, 0x2d,0x2e,0x2f,EOT}, {0x03,0x4d,NANA,0x00,0x00,0x04,MISC,MISC,NANA,NANA, NANA,NANA,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x00,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x00,RSVD,RSVD,0x00,0x00,0x02,0x03,EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x8, "Aux I/O", /* Only 0xf6 existing (and reserved) or 0xf6..0xfb? */ {0x30,0xb4,0xb5,0xb6,0xb7,0xc0,0xc1,0xc2,0xc3,0xc4, 0xc5,0xc6,0xc7,0xc8,0xf1,0xf2,0xf3,0xf4,0xf6,0xf7, 0xf8,0xf9,0xfa,0xfb,EOT}, {0x00,NANA,NANA,NANA,NANA,0x02,0x01,NANA,NANA,NANA, NANA,NANA,NANA,NANA,0x00,0x00,0x00,0x00,RSVD,RSVD, RSVD,RSVD,RSVD,RSVD,EOT}}, {EOT}}}, #endif {0x4d, "MEC1308", { {NOLDN, NULL, {0x02,0x03,0x07,0x17,0x20,0x21,0x22,0x23,0x24,0x25, 0x26,0x27,0X28,0X29,0X2a,0X2b,0X2c,0X2d,0X2e,0X2f, EOT}, {0x00,RSVD,0x00,RSVD,0x4d,0x00,0x00,0x00,0x04,0x04, MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC, EOT}}, {0x1, "PM1", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x7, "KBD", {0x30,0x70,0x72,0xF0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x8, "EC/ACPI", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x62,EOT}}, {0x9, "Mailbox", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0x10, "CIRV", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf3,0xf4,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {EOT}}}, {0x51, "LPC47B27x", { {NOLDN, NULL, {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28, 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {RSVD,0x51,NANA,0x00,0x00,0x04,MISC,MISC,RSVD, NANA,NANA,NANA,NANA,NANA,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5, EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00, EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1,0xf2, EOT}, {NANA,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x03, EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x9, "Game port", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0xa, "Power-management events (PME)", {0x30,0x60,0x61,0xf0,0xf1,EOT}, {0x00,0x00,0x00,NANA,NANA,EOT}}, {0xb, "MIDI port (MPU-401)", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x03,0x30,0x05,EOT}}, {EOT}}}, {0x52, "LPC47B37x", { {EOT}}}, {0x54, "LPC47U33x", { {NOLDN, NULL, {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x2a,0x2b, 0x2c,0x2d,0x2e,0x2f,EOT}, {RSVD,0x54,NANA,0x00,0x00,0x04,MISC,MISC,NANA,NANA, NANA,NANA,NANA,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5, EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00, EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "MIDI port (MPU-401)", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x03,0x30,0x05,EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x9, "Game port", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0xa, "Runtime registers", {0x30,0x60,0x61,0xf0,0xf1,EOT}, {0x00,0x00,0x00,NANA,NANA,EOT}}, {0xb, "SMBus", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {EOT}}}, {0x56, "LPC47B34x", { {EOT}}}, {0x57, "LPC47S42x", { {EOT}}}, {0x59, "LPC47M10x/112/13x", { {NOLDN, NULL, {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a, 0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {RSVD,0x59,NANA,0x00,0x00,0x44,MISC,MISC,RSVD,NANA, NANA,NANA,NANA,NANA,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x00,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,0xf1, 0xf2,EOT}, {NANA,0x00,0x00,RSVD,RSVD,0x00,RSVD,0x00,0x02, 0x03,EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x9, "Game port", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0xa, "Power management events (PME)", {0x30,0x60,0x61,0xf0,0xf1,EOT}, {0x00,0x00,0x00,NANA,RSVD,EOT}}, {0xb, "MPU-401", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x03,0x30,0x05,EOT}}, {EOT}}}, {0x5d, "LPC47B357", { /* From sensors-detect (no datasheet) */ {EOT}}}, {0x5f, "LPC47M14x", { {EOT}}}, {0x60, "LPC47M15x/192/997", { {NOLDN, NULL, {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a, 0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {RSVD,0x60,NANA,0x00,0x00,0x44,MISC,MISC,RSVD,NANA, NANA,NANA,NANA,NANA,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5, EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00, EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2 / IR", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {NANA,0x00,0x00,0x00,0x00,0x02,0x03,EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x9, "Game port", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0xa, "Power management events (PME)", {0x30,0x60,0x61,0xf0,EOT}, {0x00,0x00,0x00,NANA,EOT}}, {0xb, "MPU-401", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x03,0x30,0x05,EOT}}, {EOT}}}, {0x62, "LPC47S45x", { {EOT}}}, {0x67, "EMC2700LPC", { /* From sensors-detect */ {EOT}}}, {0x6b, "LPC47M292", { /* From sensors-detect */ {EOT}}}, {0x6e, "LPC47B387", { /* TODO: Not yet in sensors-detect */ /* Found in the HP Compaq Business Desktop d530 Series */ /* http://article.gmane.org/gmane.linux.bios/27192 */ /* We cannot find a public datasheet for this Super I/O. */ {EOT}}}, {0x6f, "LPC47B397", { {EOT}}}, {0x74, "LPC47M182", { /* Only for LD_NUM = 0 */ {NOLDN, NULL, {0x02,0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27, 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0x00,RSVD,0x74,RSVD,0x00,RSVD,0x44,MISC,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf8,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x24,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf8,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,0x08,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}}, {0x3, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x4, "Power control", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,NANA,0x00,EOT}}, {0x5, "Mouse", {0x30,0x70,EOT}, {0x00,0x00,EOT}}, {0x6, "Keyboard", {0x30,0x70,0xf0,EOT}, {0x00,0x00,0x00,EOT}}, {0x7, "GPIO", {0x30,0x60,0x61,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0xa, "Runtime registers", {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}}, {EOT}}}, {0x76, "LPC47M584", { /* From sensors-detect (no datasheet) */ {EOT}}}, {0x77, "A8000", { /* ASUS A8000, a rebranded DME1737(?) */ {NOLDN, NULL, {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a, 0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {RSVD,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD,NANA, NANA,NANA,NANA,NANA,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x00,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0xa, "Runtime registers", {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}}, {EOT}}}, {0x78, "DME1737", { {NOLDN, NULL, {0x03,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,0x2a, 0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {RSVD,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD,NANA, NANA,NANA,NANA,NANA,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x00,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0xa, "Runtime registers", {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}}, {EOT}}}, {0x79, "SCH5504", { /* From sensors-detect (no datasheet) */ {EOT}}}, {0x7a, "LPC47N217", { /* Found in Toshiba Satellite A80-117. */ {EOT}}}, {0x7c, "SCH3112", { {EOT}}}, {0x7d, "SCH3114", { {EOT}}}, {0x7f, "SCH3116", { {EOT}}}, {0x81, "SCH5307", { {EOT}}}, {0x83, "SCH5514D", { /* From sensors-detect */ {EOT}}}, {0x85, "SCH5317", { /* From sensors-detect */ /* The SCH5317 can have either 0x85 or 0x8c as device ID. */ {EOT}}}, {0x86, "SCH5127", { /* From sensors-detect */ {EOT}}}, {0x89, "SCH5027", { /* From sensors-detect (no public datasheet) */ {EOT}}}, {0x8c, "SCH5317", { /* From sensors-detect */ /* The SCH5317 can have either 0x85 or 0x8c as device ID. */ {EOT}}}, {0x90, "SCH4307", { /* From sensors-detect */ {EOT}}}, /* The following Super I/Os use the 0x0d/0x0e ID registers. */ {0x03, "FDC37C669", { /* Init: 0x55, 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */ /* Chiprev: 0x02. */ /* FIXME: There's another 0x03 but found on port 0x20/0x21! */ {EOT}}}, {0x04, "FDC37C669FR", { /* TODO: Not yet in sensors-detect. */ /* Init: 0x55, 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */ {EOT}}}, {0x13, "LPC47N237", { /* Init: 0x55. Exit: 0xaa. Ports: 0x2e/0x4e. */ {EOT}}}, {0x28, "FDC37N769", { /* Init: 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */ {NOLDN, NULL, {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d, 0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27, 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0x28,0x9c,0x88,0x70,0x00,0x00,0xff,0x00,0x00,0x00, 0x00,0x00,0x02,0x28,NANA,0x00,0x00,0x80,RSVD,RSVD, NANA,NANA,NANA,0x03,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD, 0x80,0x00,0x3c,RSVD,RSVD,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,RSVD,0x00,0x00,0x03,0x00,0x00,EOT}}, {EOT}}}, {0x29, "FDC37N3869/FDC37N869", { /* Init: 0x55. Exit: 0xaa. Ports: 0x3f0/0x370. */ {EOT}}}, {0x5a, "LPC47N227", { /* Init: 0x55. Exit: 0xaa. Ports: 0x2e/0x4e. */ {NOLDN, NULL, {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d, 0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27, 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31, 0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,EOT}, {0x28,0x9c,0x08,0x70,0x00,0x00,0xff,0x00,RSVD,0x00, 0x00,0x00,0x02,0x5a,NANA,0x00,0x00,0x80,MISC,0x00, NANA,NANA,NANA,0x03,RSVD,RSVD,RSVD,RSVD,RSVD,RSVD, RSVD,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x80,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,EOT}}, {EOT}}}, {0x5b, "SIO10N268", { /* Init: 0x55. Exit: 0xaa. Ports: 0x2e/0x4e. */ {NOLDN, NULL, {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d, 0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27, 0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31, 0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b, 0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43,0x44,0x45, 0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f, 0x50,0x51,0x52,0x53,0x54,EOT}, {0x20,0x98,0x00,0x70,0x00,0x00,0xff,0x00,0x00,0x00, 0x00,0x00,0x02,0x5b,NANA,0x00,0x00,0x00,MISC,0x00, NANA,NANA,NANA,0x03,0x00,NANA,NANA,0x00,0x00,0x00, NANA,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0xff,0x00, 0x00,0x80,0x00,0x00,0x0f,0x03,0x00,0x00,0x00,NANA, NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x00, 0x00,0x00,0x00,0x00,NANA,NANA,NANA,NANA,NANA,0x50, NANA,0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x01, 0x00,0x01,0x00,0x8c,MISC,EOT}}, {EOT}}}, {0x65, "FDC37C665GT/IR", { /* Init: 0x55, 0x55. Exit: 0xaa. Port: 0x3f0. */ /* Chiprev: 0x02 = FDC37C665GT, 0x82 = FDC37C665IR */ {EOT}}}, {0x66, "FDC37C666GT", { /* Init: 0x55, 0x55. Exit: 0xaa. Port: 0x3f0. Chiprev: 0x02. */ {EOT}}}, {EOT} }; static void enter_conf_mode_smsc(uint16_t port) { /* Some of the SMSC Super I/Os have an 0x55,0x55 init, some only * require one 0x55. We do 0x55,0x55 for all of them at the moment, * in the assumption that the extra 0x55 won't hurt the other * Super I/Os. This is verified to be true on (at least) the FDC37N769. */ OUTB(0x55, port); OUTB(0x55, port); } static void exit_conf_mode_smsc(uint16_t port) { OUTB(0xaa, port); } static void probe_idregs_smsc_helper(uint16_t port, uint8_t idreg, uint8_t revreg) { uint8_t id, rev; uint16_t runtime_base; const char *info = (idreg == 0x20) ? "(idregs=0x20/0x21) " : "(idregs=0x0d/0x0e) "; probing_for("SMSC", info, port); enter_conf_mode_smsc(port); id = regval(port, idreg); rev = regval(port, revreg); if (superio_unknown(reg_table, id)) { if (verbose) printf(NOTFOUND "id=0x%02x, rev=0x%02x\n", id, rev); exit_conf_mode_smsc(port); return; } printf("Found %s %s (id=0x%02x, rev=0x%02x) at 0x%x\n", (id == 0x77 ? "ASUS" : "SMSC"), get_superio_name(reg_table, id), id, rev, port); chip_found = 1; dump_superio((id == 0x77 ? "ASUS" : "SMSC"), reg_table, port, id, LDN_SEL); if (extra_dump) { switch (id) { case 0x5a: /* LPC47N227 */ runtime_base = regval(port, 0x30) << 4; if (runtime_base) dump_io(runtime_base, 16); else printf("Runtime Register Block not mapped on this Super I/O.\n"); break; default: printf("No extra registers known for this chip.\n"); } } exit_conf_mode_smsc(port); } void probe_idregs_smsc(uint16_t port) { probe_idregs_smsc_helper(port, DEVICE_ID_REG, DEVICE_REV_REG); probe_idregs_smsc_helper(port, DEVICE_ID_REG_OLD, DEVICE_REV_REG_OLD); } void print_smsc_chips(void) { print_vendor_chips("SMSC", reg_table); printf("SMSC LPC47N227 runtime register block\n\n"); } ./ali.c0000600000175000017500000000560311114771121010276 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2007 Uwe Hermann * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "superiotool.h" #define DEVICE_ID_BYTE1_REG 0x20 #define DEVICE_ID_BYTE2_REG 0x21 #define DEVICE_REV_REG 0x1f static const struct superio_registers reg_table[] = { /* TODO: M5113 doesn't seem to have ID registers? */ {0x5315, "M1535/M1535D/M1535+/M1535D+", { {NOLDN, NULL, {0x1f,0x20,0x21,0x22,0x23,0x2c,0x2d,0x2e,EOT}, {NANA,0x53,0x15,0x00,0x00,RSVD,RSVD,RSVD,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x08,0x00,0xff,0x00,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x03,0x78,0x05,0x04,0x8c,0xc5,EOT}}, {0x4, "COM1", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x03,0xf8,0x04,0x00,0x00,0x0c,EOT}}, {0x5, "COM2", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,EOT}, {0x00,0x03,0xe8,0x09,0x04,0x80,0x00,0x0c,EOT}}, {0x7, "Keyboard", {0x30,0x70,0x72,0xf0,EOT}, {NANA,0x01,0x00,0x00,EOT}}, {0x8, "COM3", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x02,0xf8,0x03,0x00,0x00,0x0c,EOT}}, {0xc, "Hotkey", {0x30,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,EOT}, {0x00,0x35,0x14,0x11,0x71,RSVD,0x05,EOT}}, {EOT}}}, {0x2351, "M512x", { {EOT}}}, {EOT} }; static void enter_conf_mode_ali(uint16_t port) { OUTB(0x51, port); OUTB(0x23, port); } static void exit_conf_mode_ali(uint16_t port) { OUTB(0xbb, port); } void probe_idregs_ali(uint16_t port) { uint16_t id; uint8_t rev; probing_for("ALi", "", port); enter_conf_mode_ali(port); id = regval(port, DEVICE_ID_BYTE1_REG) << 8; id |= regval(port, DEVICE_ID_BYTE2_REG); /* TODO: Not documented/available on M512x (?) */ rev = regval(port, DEVICE_REV_REG); if (superio_unknown(reg_table, id)) { if (verbose) printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev); exit_conf_mode_ali(port); return; } printf("Found ALi %s (id=0x%04x, rev=0x%02x) at 0x%x\n", get_superio_name(reg_table, id), id, rev, port); chip_found = 1; dump_superio("ALi", reg_table, port, id, LDN_SEL); exit_conf_mode_ali(port); } void print_ali_chips(void) { print_vendor_chips("ALi", reg_table); } ./fintek.c0000600000175000017500000002563011474712367011033 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2006 coresystems GmbH * Copyright (C) 2007-2008 Uwe Hermann * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "superiotool.h" #define DEVICE_ID_BYTE1_REG 0x20 #define DEVICE_ID_BYTE2_REG 0x21 #define VENDOR_ID_BYTE1_REG 0x23 #define VENDOR_ID_BYTE2_REG 0x24 #define FINTEK_VENDOR_ID 0x3419 static const struct superio_registers reg_table[] = { {0x0106, "F71862FG / F71863FG", { /* Same ID? Datasheet typo? */ /* We assume reserved bits are read as 0. */ {NOLDN, NULL, {0x20,0x21,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a, 0x2b,0x2c,0x2d,EOT}, {0x06,0x01,0x19,0x34,0x00,0x00,MISC,0x00,0x00,0x00, 0x00,0x00,0x08,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x03,0x42,EOT}}, {0x4, "Hardware monitor", {0x30,0x60,0x61,0x70,EOT}, {0x01,0x02,0x95,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x70,0x72,EOT}, {0x01,0x00,0x60,0x00,0x00,EOT}}, {0x6, "GPIO", {0xf0,0xf1,0xf2,0xf3,0xe0,0xe1,0xe2,0xe3,0xd0,0xd1, 0xd2,0xd3,0xc0,0xc1,0xc2,0xc3,0xb0,0xb1,0xb2,0xb3, EOT}, {0x00,0x0f,NANA,0x00,0x00,0xff,NANA,0x00,0x00,0xff, NANA,0x00,0x00,0x0f,NANA,0x00,0x00,0x3f,NANA,0x00, EOT}}, {0x7, "VID", {0x30,0x60,0x61, 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6, 0xf7,EOT}, {0x00,0x00,0x00, 0x00,0x00,MISC,0x00,NANA,0x00,0x00, 0x00,EOT}}, {0x8, "SPI", {0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xfa, 0xfb,0xfc,0xfd,0xfe,0xff,EOT}, {0x10,0x04,0x01,NANA,0x00,0x00,0x00,NANA,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,EOT}}, {0xa, "PME, ACPI", {0x30,0xf0,0xf1,0xf4,0xf5,0xf7,EOT}, {0x00,0x00,NANA,0x06,0x1c,0x01,EOT}}, {EOT}}}, {0x2307, "F71889", { /* We assume reserved bits are read as 0. */ {NOLDN, NULL, {0x20,0x21,0x23,0x24,0x25,0x26,0x27,0x28,0x2a,0x2b, 0x2c,0x2d,EOT}, {0x07,0x23,0x19,0x34,0x00,0x00,0x00,0x00,0xf0,0x30, 0x00,0x08,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x04,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x03,0x42,EOT}}, {0x4, "Hardware monitor", {0x30,0x60,0x61,0x70,EOT}, {0x01,0x02,0x95,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x70,0x72,0xfe,EOT}, {0x01,0x00,0x60,0x01,0x0c,0x81,EOT}}, {0x6, "GPIO", {0x80,0x81,0x82,0x83,0x90,0x91,0x92,0x93,0xa0,0xa1, 0xa2,0xa3,0xb0,0xb1,0xb2,0xc0,0xc1,0xc2,0xc3,0xd0, 0xd1,0xd2,0xd3,0xe0,0xe1,0xe2,0xe3,0xf0,0xf1,0xf2, 0xf3,0xfe,0xff,EOT}, {0x00,0xff,NANA,0x00,0x00,0xff,NANA,0x00,0x00,0x1f, NANA,0x00,0x00,0xff,NANA,0x00,0xff,NANA,0x00,0x00, 0xff,NANA,0x00,0x00,0x7f,NANA,0x00,0x00,0x7f,NANA, 0x00,0x00,0x00,EOT}}, {0x7, "VID", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0x8, "SPI", {0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xfa, 0xfb,0xfc,0xfd,0xfe,0xff,EOT}, {0x00,RSVD,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,EOT}}, {0xa, "PME, ACPI", {0x30,0xf0,0xf1,0xf4,0xf5,0xf6,EOT}, {0x00,0x00,0x00,0x26,0x1c,0x07,EOT}}, {0xb, "VREF", {0xf0,0xf1,0xf2,0xf3,0xff,EOT}, {0x64,0x64,0x64,0x00,0x00,EOT}}, {EOT}}}, {0x4103, "F71872F/FG / F71806F/FG", { /* Same ID? Datasheet typo? */ {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, 0x29,0x2a,0x2b,0x2c,0x2d,EOT}, {0x03,0x41,RSVD,0x19,0x34,0x00,0x00,MISC,0x66, 0x80,0x00,0x00,0x00,0x04,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x04,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x03,0x42,EOT}}, {0x4, "Hardware monitor", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x02,0x95,0x00,EOT}}, {0x5, "Keyboard", /* Only documented on F71872F/FG. */ {0x30,0x60,0x61,0x70,0x72,0xf0,0xf1,EOT}, {0x01,0x00,0x60,0x00,0x00,0x83,0x00,EOT}}, {0x6, "GPIO", {0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8, 0xe9,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, EOT}, {0x00,0x00,0x00,NANA,0x00,0x00,0x00,0x00,0x00,0x00, 0x7f,0x00,0x7f,NANA,0x00,0xff,NANA,0x00,0x03,NANA, EOT}}, {0x7, "VID", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0xa, "PME, ACPI", {0x30,0xf0,0xf1,0xf4,0xf5,EOT}, {0x00,0x00,0x61,0x06,0x3c,EOT}}, {EOT}}}, {0x4105, "F71882FG/F71883FG", { /* Same ID? Datasheet typo? */ /* We assume reserved bits are read as 0. */ {NOLDN, NULL, {0x20,0x21,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a, 0x2b,0x2c,0x2d,EOT}, {0x05,0x41,0x19,0x34,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x08,0x08,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x04,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x03,0x42,EOT}}, {0x4, "Hardware monitor", {0x30,0x60,0x61,0x70,EOT}, {0x01,0x02,0x95,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x70,0x72,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x00,0x83,EOT}}, {0x6, "GPIO", {0x70,0xe0,0xe1,0xe2,0xe3,0xd0,0xd1,0xd2,0xd3,0xc0, 0xc1,0xc2,0xc3,0xb0,0xb1,0xb2,0xb3,0xf0,0xf1,0xf2, 0xf3,EOT}, {0x00,0x00,0xff,NANA,0x00,0x00,0xff,NANA,0x00,0x00, 0x0f,NANA,0x00,0x00,0x0f,NANA,0x00,0x00,0xff,NANA, 0x00,EOT}}, {0x7, "VID", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0x7, "SPI", {0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xfa, 0xfb,0xfc,0xfd,0xfe,0xff,EOT}, {0x10,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,EOT}}, {0xa, "PME, ACPI", {0x30,0xf0,0xf1,0xf4,0xf5,EOT}, {0x00,0x00,0x01,0x06,0x1c,EOT}}, {EOT}}}, {0x0604, "F71805F/FG", { /* We assume reserved bits are read as 0. */ {NOLDN, NULL, {0x20,0x21,0x23,0x24,0x25,0x26,0x27,0x28,0x29,EOT}, {0x04,0x06,0x19,0x34,0x00,0x00,0x3f,0x08,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf2,0xf4,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x03,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x04,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x03,0x42,EOT}}, {0x4, "Hardware monitor", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x02,0x95,0x00,EOT}}, {0x6, "GPIO", {0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8, 0xe9,0xf0,0xf1,0xf3,0xf4,EOT}, {0x00,0x00,0x00,NANA,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,NANA,0x00,NANA,EOT}}, {0xa, "PME", {0x30,0xf0,0xf1,EOT}, {0x00,0x00,0x00,EOT}}, {EOT}}}, {0x0581, "F8000", { /* Fintek/ASUS F8000 */ {EOT}}}, {0x0802, "F81216D/DG", { {NOLDN, NULL, {0x25,0x2f,EOT}, {0x00,RSVD,EOT}}, {0x0, "UART1", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {NANA,NANA,NANA,NANA,0x00,0x40,EOT}}, {0x1, "UART2", {0x30,0x60,0x61,0x70,0xf0,EOT}, {NANA,NANA,NANA,NANA,0x00,EOT}}, {0x2, "UART3", {0x30,0x60,0x61,0x70,0xf0,EOT}, {NANA,NANA,NANA,NANA,0x00,EOT}}, {0x3, "UART4", {0x30,0x60,0x61,0x70,0xf0,EOT}, {NANA,NANA,NANA,NANA,0x00,EOT}}, {0x8, "WDT", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x00,NANA,NANA,NANA,NANA,NANA,EOT}}, {EOT}}}, {0x1602, "F81216AD", { {NOLDN, NULL, {0x25,0x27,EOT}, {0x00,NANA,EOT}}, {0x0, "UART1", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf4,0xf5,EOT}, {NANA,NANA,NANA,NANA,0x00,0x40,0x00,0x00,EOT}}, {0x1, "UART2", {0x30,0x60,0x61,0x70,0xf0,0xf4,0xf5,EOT}, {NANA,NANA,NANA,NANA,0x00,0x00,0x00,EOT}}, {0x2, "UART3", {0x30,0x60,0x61,0x70,0xf0,0xf4,0xf5,EOT}, {NANA,NANA,NANA,NANA,0x00,0x00,0x00,EOT}}, {0x3, "UART4", {0x30,0x60,0x61,0x70,0xf0,0xf4,0xf5,EOT}, {NANA,NANA,NANA,NANA,0x00,0x00,0x00,EOT}}, {0x8, "WDT", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x00,NANA,NANA,NANA,NANA,NANA,EOT}}, {EOT}}}, {0x0407, "F81865F/F-I", { {EOT}}}, {EOT} }; void probe_idregs_fintek(uint16_t port) { uint16_t vid, did; probing_for("Fintek", "", port); enter_conf_mode_winbond_fintek_ite_8787(port); did = regval(port, DEVICE_ID_BYTE1_REG); did |= (regval(port, DEVICE_ID_BYTE2_REG) << 8); vid = regval(port, VENDOR_ID_BYTE1_REG); vid |= (regval(port, VENDOR_ID_BYTE2_REG) << 8); if (vid != FINTEK_VENDOR_ID || superio_unknown(reg_table, did)) { if (verbose) printf(NOTFOUND "vid=0x%04x, id=0x%04x\n", vid, did); exit_conf_mode_winbond_fintek_ite_8787(port); return; } printf("Found Fintek %s (vid=0x%04x, id=0x%04x) at 0x%x\n", get_superio_name(reg_table, did), vid, did, port); chip_found = 1; dump_superio("Fintek", reg_table, port, did, LDN_SEL); exit_conf_mode_winbond_fintek_ite_8787(port); } void probe_idregs_fintek_alternative(uint16_t port) { uint16_t vid, did; probing_for("Fintek", "", port); enter_conf_mode_fintek_7777(port); did = regval(port, DEVICE_ID_BYTE1_REG); did |= (regval(port, DEVICE_ID_BYTE2_REG) << 8); vid = regval(port, VENDOR_ID_BYTE1_REG); vid |= (regval(port, VENDOR_ID_BYTE2_REG) << 8); if (vid != FINTEK_VENDOR_ID || superio_unknown(reg_table, did)) { if (verbose) printf(NOTFOUND "vid=0x%04x, id=0x%04x\n", vid, did); exit_conf_mode_fintek_7777(port); return; } printf("Found Fintek %s (vid=0x%04x, id=0x%04x) at 0x%x\n", get_superio_name(reg_table, did), vid, did, port); chip_found = 1; dump_superio("Fintek", reg_table, port, did, LDN_SEL); exit_conf_mode_fintek_7777(port); } void print_fintek_chips(void) { print_vendor_chips("Fintek", reg_table); } ./README0000600000175000017500000000661511327101602010246 0ustar uweuwe------------------------------------------------------------------------------- Superiotool README ------------------------------------------------------------------------------- Superiotool is a user-space utility which can - detect which Super I/O chip is soldered onto your mainboard, - at which configuration port it's located (usually 0x2e or 0x4e), and - dump all register contents of the Super I/O chip, together with the default values as per datasheet (to make comparing the values easy). It is mainly used for coreboot development purposes (see coreboot.org for details on coreboot), but it may also be useful for other things. Installation ------------ $ svn co svn://coreboot.org/repos/trunk/util/superiotool $ cd superiotool Optional: Edit the Makefile and set 'CONFIG_PCI = no' if you don't want to support PCI-attached "Super I/Os" (which needs libpci-dev) such as the VIA VT82686A/B southbridge with integrated Super I/O functionality. $ make $ sudo make install Usage ----- Please read the superiotool(8) manpage or type 'superiotool --help'. Per default (no options) superiotool will just probe for a Super I/O and print its vendor, name, ID, revision, and config port. Typical usage of superiotool: - Probe/detect the Super I/O in your mainboard: $ superiotool - Register dump as table of hex-values of the Super I/O (if detected): $ superiotool -d Supported Super I/O Chips ------------------------- Please see http://coreboot.org/Superiotool#Supported_devices, or type $ superiotool -l There's also a collection of sample register dumps from various Super I/O chips on that web page. Please send further register dumps (either from a proprietary BIOS and/or from coreboot) to the coreboot mailing list (http://coreboot.org/Mailinglist). Website and Mailing List ------------------------ The main website is http://coreboot.org/Superiotool. For additional information, patches, and discussions, please join the coreboot mailing list at http://coreboot.org/Mailinglist, where most superiotool developers are subscribed. Copyright and License --------------------- Superiotool is copyrighted by a number of individual developers. Please refer to the respective source code files for details. It is licensed under the terms of the GNU General Public License (GPL), either version 2 of the license, or (at your option) any later version. Contributors ------------ Anders Juel Jensen Andriy Gapon Arjan Koers <0h3q2rmn2bdb@list.nospam.xutrox.com> Bingxun Shi Carl-Daniel Hailfinger David Bartley David Hendricks François-Regis Vuillemin Frieder Ferlemann Idwer Vollering Ioannis Barkas Josh Profitt Luc Verhaegen Michael Gold Michał Mirosław Nikos Barkas Rasmus Wiman Robinson P. Tryon Ronald Hoogenboom Ronald Minnich Sean Young Stefan Reinauer Tom Sylla Ulf Jordan Urja Rannikko Uwe Hermann Ward Vandewege ./Makefile0000600000175000017500000000454611550530723011037 0ustar uweuwe## ## This file is part of the superiotool project. ## ## Copyright (C) 2007-2010 Uwe Hermann ## ## 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 ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## PROGRAM = superiotool CC = gcc INSTALL = /usr/bin/install PREFIX = /usr/local # Set the superiotool version string from the highest revision number # of the checked out superiotool files. SVNDEF := -D'SUPERIOTOOL_VERSION="$(shell svnversion -cn . \ | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/")"' CFLAGS += -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \ -Werror-implicit-function-declaration -ansi -pedantic $(SVNDEF) LDFLAGS += -lz OBJS = superiotool.o serverengines.o ali.o fintek.o ite.o nsc.o nuvoton.o \ smsc.o winbond.o OS_ARCH = $(shell uname) ifeq ($(OS_ARCH), Darwin) LIBS = -framework IOKit -framework DirectHW -lpci -lz endif ifeq ($(OS_ARCH), FreeBSD) CFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -Wundef -Wstrict-aliasing \ -Werror-implicit-function-declaration -ansi $(SVNDEF) \ -I/usr/local/include LDFLAGS += -L/usr/local/lib LIBS = -lz endif ifeq ($(OS_ARCH), NetBSD) LDFLAGS = -l$(shell uname -p) endif # Support for PCI-attached "Super I/Os" (e.g. in VIA VT82686A/B). CONFIG_PCI = yes ifeq ($(CONFIG_PCI), yes) CFLAGS += -DPCI_SUPPORT LIBS += -lpci OBJS += pci.o via.o endif all: $(PROGRAM) superiotool.o: *.c superiotool.h $(PROGRAM): $(OBJS) superiotool.h $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS) install: $(PROGRAM) mkdir -p $(DESTDIR)$(PREFIX)/sbin $(INSTALL) $(PROGRAM) $(DESTDIR)$(PREFIX)/sbin mkdir -p $(DESTDIR)$(PREFIX)/share/man/man8 $(INSTALL) $(PROGRAM).8 $(DESTDIR)$(PREFIX)/share/man/man8 clean: rm -f $(PROGRAM) *.o .PHONY: all install clean ./ite.c0000600000175000017500000010102711522550434010314 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2007 Carl-Daniel Hailfinger * Copyright (C) 2007-2008 Uwe Hermann * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "superiotool.h" #define CHIP_ID_BYTE1_REG 0x20 #define CHIP_ID_BYTE2_REG 0x21 #define CHIP_VERSION_REG 0x22 #define ISA_PNP_ADDR 0x279 static const struct superio_registers reg_table[] = { {0x8228, "IT8228E", { {EOT}}}, {0x8500, "IT8500B/E", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x25,0x2d,0x2e,0x2f,0x30,EOT}, {0x85,0x00,0x01,0x01,0x00,0x00,NANA,NANA,0x00,EOT}}, {0x04, "System Wake-Up Control (SWUC)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x01,EOT}}, {0x05, "KBC/Mouse Interface", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x00,0x00,0x00,0x0c,0x01,EOT}}, {0x06, "KBC/Keyboard Interface", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x60,0x00,0x64,0x01,0x01,EOT}}, {0x0f, "Shared Memory/Flash Interface (SMFI)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,NANA,EOT}}, {0x10, "BRAM", {0x30,0x62,0x63,0x70,0x71,0xf3,0xf4,0xf5,EOT}, {0x00,0x00,0x72,0x08,0x01,NANA,NANA,NANA,EOT}}, {0x11, "Power Management I/F Channel 1 (PMC1)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x62,0x00,0x66,0x01,0x01,EOT}}, {0x12, "Power Management I/F Channel 2 (PMC2)", {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x71,0xf0,EOT}, {0x00,0x00,0x68,0x00,0x6c,0x00,0x00,0x01,0x01,NANA,EOT}}, {EOT}}}, {0x8502, "IT8502E/TE/G", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29, 0x2A,0x2B,0x2C,0x2D,0x2E,EOT}, {0x85,0x02,0x71,0x01,NANA,0x00,0x00,NANA,NANA,NANA, NANA,NANA,NANA,0x00,NANA,EOT}}, {0x1, "UART1", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x00,0x03,0xf8,0x00,0x00,0x04,0x02,0x00,EOT}}, {0x4, "System Wake-Up", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,EOT}}, {0x5, "Mouse", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x01,0x00,0x00,0x00,0x00,0x0C,0x01,NANA,EOT}}, {0x6, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x01,NANA,EOT}}, {0xf, "Shared Memory/Flash", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,0xf5, 0xf6,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,EOT}}, {0x10, "BRAM", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf3,0xf4, 0xf5,EOT}, {0x00,0x00,0x70,0x00,0x72,0x08,0x01,NANA,NANA, NANA,EOT}}, {0x11, "Power Channel 1", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x62,0x00,0x66,0x01,0x01,EOT}}, {0x12, "Power Channel 2", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x68,0x00,0x6c,0x01,0x01,EOT}}, {0x17, "Power Channel 3", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x6a,0x00,0x6e,0x01,0x01,EOT}}, {EOT}}}, {0x8510, "IT8510E/TE/G", { {NOLDN, "Chip ID", {0x20,0x21, EOT}, {0x85,0x10, EOT}}, {NOLDN, "Chip Version", {0x22,EOT}, {0x21,EOT}}, {NOLDN, "Super I/O Control Reigster (SIOCTRL)", {0x23,EOT}, {0x01,EOT}}, {NOLDN, "Super I/O Configuration Register (SIOIRQ)", {0x25,EOT}, {0x00,EOT}}, {NOLDN, "Super I/O General Purpose Register (SIOGP)", {0x26,EOT}, {0x00,EOT}}, {NOLDN, "Super I/O Power Mode Register (SIOPWR)", {0x2d,EOT}, {0x00,EOT}}, {NOLDN, "Logical Device Activate Register (LDA)", {0x30,EOT}, {0x00,EOT}}, {NOLDN, "I/O Port Base Address for Descriptor 0 (IOBAD0)", {0x60,0x61,EOT}, {NANA,NANA,EOT}}, {NOLDN, "I/O Port Base Address for Descriptor 1 (IOBAD1)", {0x62,0x63,EOT}, {NANA,NANA,EOT}}, {NOLDN, "Interupt Request Number and Wake-Up on IRQ Enable (IRQNUMX)", {0x70,EOT}, {NANA,EOT}}, {NOLDN, "Interrupt Request Type Select (IRQTP)", {0x71,EOT}, {NANA,EOT}}, {NOLDN, "DMA Channel Select 0 (DMAS0)", {0x74,EOT}, {0x04,EOT}}, {NOLDN, "DMA Channel Select 1 (DMAS1)", {0x75,EOT}, {0x04,EOT}}, {0x4, "System Wakup-Up (SWUC)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x03,EOT}}, {0x5, "Keyboard/Mouse", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x00,0x00,0x00,0x0c,0x03,EOT}}, {0x6, "Keyboard/Mouse", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x60,0x00,0x64,0x01,0x03,EOT}}, {0xf, "Shared Memory/Flash Interface (SMFI)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,0xf5,0xf6,0xf7,0xf8,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x10, "Real Time Clock (RTC)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x70,0x00,0x72,0x08,0x00,0x00,0x49,0x4a,EOT}}, {0x11, "Power Management Interface Channel 1", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x62,0x00,0x66,0x01,0x03,EOT}}, {0x12, "Power Management Interface Channel 2", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x68,0x00,0x6c,0x01,0x03,EOT}}, {EOT}}}, {0x8511, "IT8511E/TE/G", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29, 0x2A,0x2B,0x2C,0x2D,0x2E,EOT}, {0x85,0x11,0x10,0x01,NANA,0x00,0x00,NANA,NANA,NANA, NANA,NANA,NANA,0x00,NANA,EOT}}, {0x4, "System Wake-Up", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,EOT}}, {0x5, "Mouse", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x01,0x00,0x00,0x00,0x00,0x0C,0x03,NANA,EOT}}, {0x6, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x03,NANA,EOT}}, {0xf, "Shared Memory/Flash", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,0xf5, 0xf6,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,EOT}}, {0x10, "Real-Time Clock", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,0xf1, 0xf2,0xf3,0xf4,0xf5,EOT}, {0x00,0x00,0x70,0x00,0x72,0x08,0x00,0x00,0x49, 0x4A,NANA,NANA,NANA,EOT}}, {0x11, "Power Channel 1", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x62,0x00,0x66,0x01,0x03,EOT}}, {0x12, "Power Channel 2", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x68,0x00,0x6c,0x01,0x03,EOT}}, {EOT}}}, {0x8512, "IT8512E/F/G", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29, 0x2A,0x2B,0x2C,0x2D,0x2E,EOT}, {0x85,0x12,0x22,0x01,NANA,0x00,0x00,NANA,NANA,NANA, NANA,NANA,NANA,0x00,NANA,EOT}}, {0x4, "System Wake-Up", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x03,EOT}}, {0x5, "Mouse", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x0C,0x03,NANA,EOT}}, {0x6, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x00,0x00,0x60,0x00,0x64,0x01,0x03,NANA,EOT}}, {0xf, "Shared Memory/Flash", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,0xf5, 0xf6,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,EOT}}, {0x10, "BRAM", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf3,0xf4, 0xf5,EOT}, {0x00,0x00,0x70,0x00,0x72,0x08,0x00,NANA,NANA, NANA,EOT}}, {0x11, "Power Channel 1", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x62,0x00,0x66,0x01,0x03,EOT}}, {0x12, "Power Channel 2", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT}, {0x00,0x00,0x68,0x00,0x6c,0x01,0x03,EOT}}, {EOT}}}, {0x8513, "IT8513E/F/G", { {EOT}}}, {0x8661, "IT8661F/IT8770F", { {NOLDN, NULL, {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x20,0x21,0x22, 0x23,0x24,EOT}, {NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x86,0x61,0x00, 0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0xf0,EOT}, {0x00,0x00,0x03,0xf0,0x06,0x02,0x02,0x00,EOT}}, {0x1, "COM1", {0x30,0x31,0x60,0x61,0x70,0x71,0xf0,EOT}, {0x00,0x00,0x03,0xf8,0x04,0x02,0x00,EOT}}, {0x2, "COM2", {0x30,0x31,0x60,0x61,0x70,0x71,0xf0,EOT}, {0x00,0x00,0x02,0xf8,0x03,0x02,0x00,EOT}}, {0x3, "Parallel port", {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74, 0xf0,EOT}, {0x00,0x00,0x03,0x78,0x07,0x78,0x07,0x02,0x03, 0x03,EOT}}, {0x4, "IR", {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x72,0x73, 0x74,0x75,0xf0,EOT}, {0x00,0x00,0x02,0xe8,0x03,0x00,0x0a,0x02,0x0b,0x02, 0x01,0x00,0x00,EOT}}, {0x5, "GPIO", {0x25,0x26,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67, 0x70,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, 0xf9,0xfa,0xfb,0xfc,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,EOT}}, {EOT}}}, {0x8673, "IT8673F", { {EOT}}}, {0x8681, "IT8671F/IT8687R", { {NOLDN, NULL, {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x20,0x21,0x22, 0x23,0x24,0x25,0x26,0x2e,0x2f,EOT}, {NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x86,0x81,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0xf0,EOT}, {0x00,0x00,0x03,0xf0,0x06,0x02,0x02,0x00,EOT}}, {0x1, "COM1", {0x30,0x31,0x60,0x61,0x70,0x71,0xf0,EOT}, {0x00,0x00,0x03,0xf8,0x04,0x02,0x00,EOT}}, {0x2, "COM2", {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x72,0x73, 0x74,0x75,0xf0,0xf1,EOT}, {0x00,0x00,0x02,0xf8,0x03,0x00,0x03,0x02,0x0a,0x02, 0x00,0x01,0x00,0x00,EOT}}, {0x3, "Parallel port", {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74, 0xf0,EOT}, {0x00,0x00,0x03,0x78,0x07,0x78,0x07,0x02,0x03, 0x03,EOT}}, {0x4, "APC", {0x30,0xf0,0xf1,0xf2,0xf4,0xf5,0xf6,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {MISC,0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x00,EOT}}, {0x6, "Mouse", {0x30,0x70,0x71,0xf0,EOT}, {0x00,0x0c,0x02,0x00,EOT}}, {0x7, "GPIO", {0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69, 0x70,0x71,0x72,0x73,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5, 0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff, 0xe0,0xe1,0xe2,0xe3,0xe4,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,EOT}}, {EOT}}}, {0x8701, "IT8703F", { {NOLDN, NULL, {0x20,0x21,0x23,0x24,0x26,0x29,0x2a,0x2b,EOT}, {0x87,0x00,0x00,0x80,0x00,0x00,0x7c,0xc0,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf3,0xf4, 0xf5,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00, 0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT}, {0x00,0x03,0x78,0x00,0x80,0x07,0x03,0x03,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x00,EOT}}, {0x3, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x02,0xf8,0x03,0x00,0x00,0x00,0x7f,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x80,EOT}}, {0x6, "Consumer IR", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x7, "Game port, MIDI, GPIO set 1", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x02,0x01,0x03,0x30,0x00,0xff,0x00,0x00,EOT}}, {0x8, "GPIO set 2", {0x30,0xf0,0xf1,0xf2,0xf3,0xf5,EOT}, {0x00,0xff,0x00,0x00,0x00,0x00,EOT}}, {0x9, "GPIO set 3 and 4", {0x30,0x60,0x61,0xf0,0xf1,0xf2,0xf3,0xf4,EOT}, {0x00,0x02,0x90,0xff,0x00,0x00,0x00,0x00,EOT}}, {0xa, "ACPI", {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xf3,0xf4,0xf6,0xf7,0xf9,EOT}, {0x00,0x00,0x00,0x00,NANA,NANA,0x00,0x00,0x00,0x00, NANA,NANA,0x00,0x00,0x00,EOT}}, {0xc, "GPIO set 5, 6 and 7", {0x30,0x60,0x61,0xf0,0xf3,0xf6,EOT}, {0x00,0x03,0x70,0x00,0xff,0xff,EOT}}, {EOT}}}, {0x8702, "IT8702F", { {EOT}}}, {0x8705, "IT8705F/AF / IT8700F", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,EOT}, {0x87,0x05,0x00,0x00,NANA,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x00,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x74, 0xf0,EOT}, {0x00,0x03,0x78,0x07,0x78,0x00,0x80,0x07,0x03, 0x03,EOT}}, {0x4, "Environment controller", {0x2b,0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2, 0xf3,0xf4,0xf5,0xf6,EOT}, {0x00,0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00, 0x00,0x00,NANA,NANA,EOT}}, {0x5, "GPIO", {0x25,0x26,0x27,0x28,0x29,0x2a,0x60,0x61,0x62,0x63, 0x64,0x65,0x70,0x71,0x72,0xb0,0xb1,0xb2,0xb3,0xb4, 0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xc0,0xc1,0xc2, 0xc3,0xc4,0xc5,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xd0, 0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd8,0xd9,0xda,0xf0, 0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc, 0xfd,0xfe,0xff,EOT}, {0x00,0x00,0x00,0xff,0xe0,0xff,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,NANA,0x00,EOT}}, {0x6, "Game port", {0x30,0x60,0x61,EOT}, {0x00,0x02,0x01,EOT}}, {0x7, "Consumer IR", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x10,0x0b,0x00,EOT}}, {0x8, "MIDI port", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x00,0x0a,0x00,EOT}}, {EOT}}}, {0x8706, "IT8706R", { /* TODO: Not yet in sensors-detect */ /* This is a "Special General Purpose I/O chip". */ {EOT}}}, {0x8707, "IT8707F", { {EOT}}}, {0x8708, "IT8708F", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29, 0x2a,0x2e,0x2f,EOT}, {0x87,0x08,0x00,0x00,NANA,0x3f,0x00,0xff,0xff,0xff, 0xff,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x00,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x74, 0xf0,EOT}, {0x00,0x03,0x78,0x07,0x78,0x00,0x80,0x07,0x03, 0x03,EOT}}, {0x4, "SWC", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,EOT}, {NANA,NANA,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,NANA,NANA,EOT}}, {0x5, "Keyboard", /* Note: 0x30 can actually be 0x00 _or_ 0x01. */ {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x00,EOT}}, {0x6, "Mouse", {0x30,0x70,0x71,0xf0,EOT}, {0x00,0x0c,0x02,0x00,EOT}}, {0x7, "GPIO", {0x70,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba, 0xbb,0xbc,0xbd,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc8, 0xc9,0xca,0xcb,0xcc,0xcd,0xd0,0xd1,0xd2,0xd3,0xd4, 0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xf0,0xf1, 0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb, 0xfc,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,NANA, 0x00,EOT}}, {0x8, "Game port", {0x30,0x60,0x61,EOT}, {0x00,0x02,0x01,EOT}}, {0x9, "Consumer IR", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x10,0x0b,0x00,EOT}}, {0xa, "MIDI port", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x00,0x0a,0x00,EOT}}, {EOT}}}, {0x8710, "IT8710F", { /* TODO: Not yet in sensors-detect */ {EOT}}}, {0x8711, "IT8711F", { /* 0x8711 is a guess, not found in datasheet. */ {EOT}}}, {0x8712, "IT8712F", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x2b,EOT}, {0x87,0x12,0x08,0x00,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x03,0xf8,0x04,0x00,0x50,0x00,0x7f,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT}, {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}}, {0x4, "Environment controller", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3, 0xf4,0xf5,0xf6,EOT}, {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,0x00, 0x00,NANA,NANA,EOT}}, {0x5, "Keyboard", /* TODO: 0xf0: Error in datasheet? */ {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x08,EOT}}, {0x6, "Mouse", {0x30,0x70,0x71,0xf0,EOT}, {0x00,0x0c,0x02,0x00,EOT}}, {0x7, "GPIO", /* TODO: 0x72, 0x73: Errors in datasheet? */ {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x60,0x61,0x62, 0x63,0x64,0x65,0x70,0x71,0x72,0x73,0x74,0xb0,0xb1, 0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd, 0xc0,0xc1,0xc2,0xc3,0xc4,0xc8,0xc9,0xca,0xcb,0xcc, 0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4, 0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,EOT}, {0x01,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x40,0x00,0x01,0x00,0x00,0x40,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,NANA,0x00,EOT}}, {0x8, "MIDI port", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x00,0x0a,0x00,EOT}}, {0x9, "Game port", {0x30,0x60,0x61,EOT}, {0x00,0x02,0x01,EOT}}, {0xa, "Consumer IR", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x10,0x0b,0x00,EOT}}, {EOT}}}, {0x8716, "IT8716F", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x2b,EOT}, {0x87,0x16,0x01,0x00,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x03,0xf8,0x04,0x00,0x50,0x00,0x7f,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT}, {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}}, {0x4, "Environment controller", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3, 0xf4,0xf5,0xf6,EOT}, {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,0x00, 0x00,NANA,NANA,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x00,EOT}}, {0x6, "Mouse", {0x30,0x70,0x71,0xf0,EOT}, {0x00,0x0c,0x02,0x00,EOT}}, {0x7, "GPIO", {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x60,0x61,0x62, 0x63,0x64,0x65,0x70,0x71,0x72,0x73,0x74,0xb0,0xb1, 0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd, 0xc0,0xc1,0xc2,0xc3,0xc4,0xc8,0xc9,0xca,0xcb,0xcc, 0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4, 0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,EOT}, {0x01,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x20,0x38,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x40,0x00,0x01,0x00,0x00,0x40,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,NANA,0x00,EOT}}, {0x8, "MIDI port", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x00,0x0a,0x00,EOT}}, {0x9, "Game port", {0x30,0x60,0x61,EOT}, {0x00,0x02,0x01,EOT}}, {0xa, "Consumer IR", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x10,0x0b,0x00,EOT}}, {EOT}}}, {0x8718, "IT8718F", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x2b,EOT}, {0x87,0x18,0x01,0x00,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x03,0xf8,0x04,0x00,0x50,0x00,0x7f,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT}, {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}}, {0x4, "Environment controller", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3, 0xf4,0xf5,0xf6,EOT}, {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,0x00, 0x00,NANA,NANA,EOT}}, {0x5, "Keyboard", /* 0xf0: Datasheet page 33: 0x00; page 56: 0x08. */ {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x00,EOT}}, {0x6, "Mouse", {0x30,0x70,0x71,0xf0,EOT}, {0x00,0x0c,0x02,0x00,EOT}}, {0x7, "GPIO", /* 0x2c: Datasheet page 30: 0x00; page 43: 0x1f. */ {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x60,0x61,0x62, 0x63,0x64,0x65,0x70,0x71,0x72,0x73,0x74,0xb0,0xb1, 0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd, 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc8,0xc9,0xca,0xcb, 0xcc,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf0, 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa, 0xfb,0xfc,0xfd,0xfe,0xff,EOT}, {0x01,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x20,0x38,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x40,0x00,0x00,0x01,0x00,0x00,0x40, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,NANA,0x00,0x00,0x00,EOT}}, {0xa, "Consumer IR", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x10,0x0b,0x00,EOT}}, {EOT}}}, {0x8720, "IT8720F", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x2b,EOT}, {0x87,0x20,0x05,0x00,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x00,0x03,0xf8,0x04,0x00,0x50,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x00,0x02,0xf8,0x03,0x00,0x50,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT}, {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}}, {0x4, "Environment controller", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3, 0xf4,0xf5,0xf6,EOT}, {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,0x00, 0x00,NANA,NANA,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x48,EOT}}, {0x6, "Mouse", {0x30,0x70,0x71,0xf0,EOT}, {0x00,0x0c,0x02,0x00,EOT}}, {0x7, "GPIO", {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x60,0x61,0x62, 0x63,0x64,0x65,0x70,0x71,0x72,0x73,0x74,0xb0,0xb1, 0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd, 0xc0,0xc1,0xc2,0xc3,0xc4,0xc8,0xc9,0xca,0xcb,0xcc, 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xf0, 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa, 0xfb,0xfc,0xfd,0xfe,0xff,EOT}, {0x00,0xff,0x00,0x40,0x00,0x00,0x03,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,NANA,0x38,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x40,0x00,0x01,0x00,0x00,0x40,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,NANA,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,NANA,0x00,0x00,0x00,EOT}}, {0xa, "Consumer IR", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x10,0x0b,0x06,EOT}}, {EOT}}}, {0x8721, "IT8721F", { {EOT}}}, {0x8722, "IT8722F", { {EOT}}}, {0x8726, "IT8726F", { /* Datasheet wrongly says that the ID is 0x8716. */ {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x2b,EOT}, {0x87,0x26,0x01,0x00,MISC,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT}, {0x00,0x03,0xf0,0x06,0x02,0x00,0x00,EOT}}, {0x1, "COM1", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x03,0xf8,0x04,0x00,0x50,0x00,0x7f,EOT}}, {0x2, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x02,0xf8,0x03,0x00,0x50,0x00,0x7f,EOT}}, {0x3, "Parallel port", {0x30,0x60,0x61,0x62,0x63,0x70,0x74,0xf0,EOT}, {0x00,0x03,0x78,0x07,0x78,0x07,0x03,0x03,EOT}}, {0x4, "Environment controller", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3, 0xf4,0xf5,0xf6,EOT}, {0x00,0x02,0x90,0x02,0x30,0x09,0x00,0x00,0x00,0x00, 0x00,MISC,MISC,EOT}}, {0x5, "Keyboard", /* 0xf0: Datasheet page 35: 0x00; page 59: 0x08. */ {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x08,EOT}}, {0x6, "Mouse", {0x30,0x70,0x71,0xf0,EOT}, {0x00,0x0c,0x02,0x00,EOT}}, {0x7, "GPIO", /* 0x2c: Datasheet page 33: 0x00; page 45: 0x1f. */ {0x25,0x26,0x27,0x28,0x29,0x2a,0x2c,0x60,0x61,0x62, 0x63,0x64,0x65,0x70,0x71,0x72,0x73,0x74,0xb0,0xb1, 0xb2,0xb3,0xb4,0xb5,0xb8,0xb9,0xba,0xbb,0xbc,0xbd, 0xc0,0xc1,0xc2,0xc3,0xc4,0xc8,0xc9,0xca,0xcb,0xcc, 0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4, 0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,EOT}, {0x01,0x00,0x00,0x40,0x00,0x00,0x1f,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,MISC,0x38,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x40,0x00,0x01,0x00,0x00,0x40,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,MISC,0x00,EOT}}, {0x8, "MIDI port", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x00,0x0a,0x00,EOT}}, {0x9, "Game port", {0x30,0x60,0x61,EOT}, {0x00,0x02,0x01,EOT}}, {0xa, "Consumer IR", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x03,0x10,0x0b,0x00,EOT}}, {EOT}}}, {0x8761, "IT8761E", { {EOT}}}, {0x8780, "IT8780F", { {EOT}}}, {EOT} }; static const struct superio_registers ec_table[] = { {0x8716, "IT8716F", { {NOLDN, NULL, {0x00,0x04,0x05,0x06,0x07,0x08,0x09,0x0b,0x0c,0x10, 0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x1b,0x1c,0x1d, 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39, 0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43, 0x44,0x45,0x48,0x50,0x51,0x52,0x53,0x54,0x56,0x57, 0x59,0x5c, 0x5d,0x5e,0x5f,0x60,0x61,0x62,0x63,0x64,0x65,0x68, 0x69,0x6a,0x6b,0x6c,0x6d,0x70,0x71,0x72,0x73,0x74, 0x75,0x84,0x85,0x86,0x87,0x88,0x89,0x8c,0x8d,0x8e, 0x8f,0x90,0x91,0x92,0x93,0x94,0x95,0x98,0x99,0x9a, 0x9b,0x9c,0x9d,EOT}, {0x18,0x00,0x00,0x00,0x00,0x00,0x80,0x09,0x00,NANA, NANA,NANA,0x07,0x50,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,RSVD,0x00,0x00,0x7f,0x7f,0x7f,0x00,0x00, 0x00,0x00, 0x00,0x00,0x00,0x7f,0x7f,0x7f,0x00,0x00,0x7f,0x7f, 0x7f,0x7f,0x00,0x00,0x7f,0x7f,0x7f,0x7f,0x00,0x00, 0x7f,NANA,NANA,NANA,NANA,0x00,0x00,0x02,0x00,0x99, 0x99,0x7f,0x7f,0x7f,0x00,0x00,0x7f,0x7f,0x7f,0x7f, 0x00,0x00,0x7f,EOT}}, {EOT}}}, {0x8718, "IT8718F", { {NOLDN, NULL, {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29, 0x2a,0x2b,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37, 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x40,0x41, 0x42,0x43,0x44,0x45,0x50,0x51,0x52,0x53,0x54,0x56, 0x57,0x58,0x59,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x61, 0x62,0x63,0x64,0x65,0x68,0x69,0x6a,0x6b,0x6c,0x6d, 0x70,0x71,0x72,0x73,0x74,0x75,0x80,0x81,0x82,0x83, 0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91, 0x92,0x94,0x95,0x96,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5, 0xa6,EOT}, {0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, 0x40,0x09,0x00,NANA,NANA,NANA,NANA,NANA,NANA,0x07, 0x50,MISC,MISC,MISC,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, NANA,NANA,NANA,NANA,0x00,0x00,0x7f,0x7f,0x7f,0x00, 0x00,0x90,0x00,0x12,0x00,0x00,0x00,0x00,0x7f,0x7f, 0x7f,0x00,0x00,0x7f,0x7f,0x7f,0x7f,0x00,0x00,0x7f, 0x7f,0x7f,0x7f,0x00,0x00,0x7f,NANA,NANA,NANA,NANA, 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0xff,0x00, 0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,EOT}}, {EOT}}}, {EOT} }; /* Works for: IT8661F/IT8770F */ static const uint8_t initkey_it8661f[][4] = { {0x86, 0x61, 0x55, 0x55}, /* 0x3f0 */ {0x86, 0x61, 0x55, 0xaa}, /* 0x3bd */ {0x86, 0x61, 0xaa, 0x55}, /* 0x370 */ }; /* Works for: IT8671F/IT8687R, IT8673F */ static const uint8_t initkey_it8671f[][4] = { {0x86, 0x80, 0x55, 0x55}, /* 0x3f0 */ {0x86, 0x80, 0x55, 0xaa}, /* 0x3bd */ {0x86, 0x80, 0xaa, 0x55}, /* 0x370 */ }; /* Works for: IT8661F/IT8770F, IT8671F/IT8687R, IT8673F. */ static const uint8_t initkey_mbpnp[] = { 0x6a, 0xb5, 0xda, 0xed, 0xf6, 0xfb, 0x7d, 0xbe, 0xdf, 0x6f, 0x37, 0x1b, 0x0d, 0x86, 0xc3, 0x61, 0xb0, 0x58, 0x2c, 0x16, 0x8b, 0x45, 0xa2, 0xd1, 0xe8, 0x74, 0x3a, 0x9d, 0xce, 0xe7, 0x73, 0x39, }; /* Works for: IT8661F/IT8770F, IT8671F/IT8687R, IT8673F. */ static void enter_conf_mode_ite_legacy(uint16_t port, const uint8_t init[][4]) { int i, idx; /* Determine Super I/O config port. */ idx = (port == 0x3f0) ? 0 : ((port == 0x3bd) ? 1 : 2); for (i = 0; i < 4; i++) OUTB(init[idx][i], ISA_PNP_ADDR); /* Sequentially write the 32 MB PnP init values. */ for (i = 0; i < 32; i++) OUTB(initkey_mbpnp[i], port); } static void enter_conf_mode_ite(uint16_t port) { OUTB(0x87, port); OUTB(0x01, port); OUTB(0x55, port); OUTB((port == 0x2e) ? 0x55 : 0xaa, port); } static void enter_conf_mode_ite_it8502e(uint16_t port) { OUTB(0x85, port); OUTB(0x02, port); OUTB(0x55, port); OUTB((port == 0x2e) ? 0x55 : 0xaa, port); } static void enter_conf_mode_ite_it8761e(uint16_t port) { OUTB(0x87, port); OUTB(0x61, port); OUTB(0x55, port); OUTB((port == 0x2e) ? 0x55 : 0xaa, port); } static void enter_conf_mode_ite_it8228e(uint16_t port) { OUTB(0x82, port); OUTB(0x28, port); OUTB(0x55, port); OUTB((port == 0x2e) ? 0x55 : 0xaa, port); } static void exit_conf_mode_ite(uint16_t port) { regwrite(port, 0x02, 0x02); } static int chip_found_at_port; static void probe_idregs_ite_helper(const char *init, uint16_t port) { uint16_t id, chipver, ecport; probing_for("ITE", init, port); id = regval(port, CHIP_ID_BYTE1_REG) << 8; id |= regval(port, CHIP_ID_BYTE2_REG); chipver = regval(port, CHIP_VERSION_REG) & 0x0f; /* Only bits 3..0 */ if (superio_unknown(reg_table, id)) { if (verbose) printf(NOTFOUND "id=0x%04x, rev=0x%01x\n", id, chipver); return; } printf("Found ITE %s (id=0x%04x, rev=0x%01x) at 0x%x\n", get_superio_name(reg_table, id), id, chipver, port); chip_found = 1; chip_found_at_port = 1; dump_superio("ITE", reg_table, port, id, LDN_SEL); if (extra_dump) { regwrite(port, LDN_SEL, 0x04); /* Select LDN 4 (EC). */ /* Get EC base address (stored in LDN 4, index 0x60/0x61). */ ecport = regval(port, 0x60) << 8; ecport |= regval(port, 0x61); /* EC address register = EC base address + 5. */ ecport += 5; printf("Environment controller (0x%04x)\n", ecport); dump_superio("ITE-EC", ec_table, ecport, id, LDN_SEL); } } void probe_idregs_ite(uint16_t port) { chip_found_at_port = 0; if (port == 0x3f0 || port == 0x3bd || port == 0x370) { enter_conf_mode_ite_legacy(port, initkey_it8661f); probe_idregs_ite_helper("(init=legacy/it8661f) ", port); exit_conf_mode_ite(port); if (chip_found_at_port) return; enter_conf_mode_ite_legacy(port, initkey_it8671f); probe_idregs_ite_helper("(init=legacy/it8671f) ", port); exit_conf_mode_ite(port); if (chip_found_at_port) return; } else { enter_conf_mode_ite(port); probe_idregs_ite_helper("(init=standard) ", port); exit_conf_mode_ite(port); if (chip_found_at_port) return; enter_conf_mode_ite_it8502e(port); probe_idregs_ite_helper("(init=it8502e) ", port); exit_conf_mode_ite(port); if (chip_found_at_port) return; enter_conf_mode_ite_it8761e(port); probe_idregs_ite_helper("(init=it8761e) ", port); exit_conf_mode_ite(port); if (chip_found_at_port) return; enter_conf_mode_ite_it8228e(port); probe_idregs_ite_helper("(init=it8228e) ", port); exit_conf_mode_ite(port); if (chip_found_at_port) return; enter_conf_mode_winbond_fintek_ite_8787(port); probe_idregs_ite_helper("(init=0x87,0x87) ", port); exit_conf_mode_winbond_fintek_ite_8787(port); if (chip_found_at_port) return; } } void print_ite_chips(void) { print_vendor_chips("ITE", reg_table); print_vendor_chips("ITE-EC", ec_table); } ./nuvoton.c0000600000175000017500000002471611554405550011257 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2010 Google Inc. * Written by David Hendricks for Nuvoton Technology Corp. * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "superiotool.h" #define DEVICE_ID_REG 0x20 /* Super I/O ID (SID) / family */ #define DEVICE_REV_REG 0x27 /* Super I/O revision ID (SRID) */ static const struct superio_registers reg_table[] = { {0xfc, "WPCE775x / NPCE781x", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0xfc,0x11,RSVD,RSVD,RSVD,0x00,0x00,MISC,0x00, 0x04,RSVD,RSVD,RSVD,0x00,RSVD,RSVD,EOT}}, {0x03, "CIR Port (CIRP)", /* where supported */ {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}}, {0x04, "Mobile System Wake-Up Control Config (MSWC)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}}, {0x05, "Mouse config (KBC)", {0x30,0x70,0x71,0x74,0x75,EOT}, {0x00,0x0c,0x03,0x04,0x04,EOT}}, {0x06, "Keyboard config (KBC)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x60,0x00,0x64,0x01,0x03,0x04,0x04,EOT}}, {0x0f, "Shared memory (SHM)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2, 0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,EOT}, {0x00,0x00,0x00,0x00,0x00,0x04,0x04,MISC,0x07,RSVD, RSVD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x11, "Power management I/F Channel 1 (PM1)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x62,0x00,0x66,0x01,0x03,0x04,0x04,EOT}}, {0x12, "Power management I/F Channel 2 (PM2)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x68,0x00,0x6c,0x01,0x03,0x04,0x04,EOT}}, {0x15, "Enhanced Wake On CIR (EWOC)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}}, {0x17, "Power Management I/F Channel 3 (PM3)", {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,EOT}, {0x00,0x00,0x6a,0x00,0x6e,0x01,0x03,0x04,0x04,EOT}}, {0x1a, "Serial Port with Fast Infrared Port (FIR)", {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT}, {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}}, {EOT}}}, {0x1a, "WPCM450", { {EOT}}}, {0xc332, "NCT6776F (B)", { {NOLDN, NULL, {0x10,0x11,0x13,0x14,0x16,0x17,0x18,0x19,0x1a, 0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23, 0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,0x2c,0x2d, 0x2e,0x2f,EOT}, {0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xf0, 0x78,0x00,0x00,0xff,0xff,0xc3,0x32,0xff,0x00, 0x64,0x00,MISC,0x00,0x00,0xc0,0x00,0x81,0x00, 0x00,MISC,EOT}}, {0x00, "FDC", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x00,EOT}}, {0x01, "Parallel Port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}}, {0x02, "UART A", {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT}, {0x01,0x03,0xf8,0x04,0x00,0x00,EOT}}, {0x03, "UART B, IR", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,EOT}}, {0x05, "Keyboard Controller", {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}}, {0x06, "CIR", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT}}, {0x07, "GPIO6, GPIO7, GPIO8, GPIO9", {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf4,0xf5, 0xf6,0xf7,0xf8,EOT}, {0x03,0xff,0x00,0x00,0x00,0xef,0x00,0x00,0x00, 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00, 0x00,0x00,0x00,EOT}}, {0x08, "WDT1, GPIO0, GPIO1, GPIOA", {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0, 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT}, {0x02,0x00,0x00,0xff,0x00,0x00,0x00,0xef,0xff, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x09, "GPIO2, GPIO3, GPIO4, GPIO5", {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4, 0xf5,0xf6,0xf7,0xfe,EOT}, {0x04,0xdf,0x00,0x00,0x00,0xff,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff, 0x00,0x00,0x00,0x00,EOT}}, {0x0a, "ACPI", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9, 0xee,0xf0,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT}, {0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,EOT}}, {0x0b, "Hardware Monitor, Front Panel LED", {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2, 0xf0,0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa, EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff, 0x00,0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00, EOT}}, {0x0d, "VID", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe9,0xee, 0xef,0xf0,0xf4,0xf5,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88, 0x00,0x00,0x00,0x00,EOT}}, {0x0e, "CIR WAKE-UP", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x0f, "GPIO Push-Pull or Open-drain", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8, 0xe9,0xf0,0xf1,0xf2,EOT}, {0xff,0xdf,0xff,0xfe,0xf6,0xff,0xff,0xd3,0xff, 0x9f,0x00,0x00,0x00,EOT}}, {0x14, "SVID", {0xe0,0xe1,0xe3,0xe4,EOT}, {0x00,0x80,0x00,0x00,EOT}}, {0x16, "Deep Sleep", {0x30,0xe0,0xe1,0xe2,EOT}, {0x20,0x20,0x04,0x05,EOT}}, {0x17, "GPIOA", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,EOT}, {0x01,0x00,0x00,0x00,0x01,0x00,EOT}}, {EOT}}}, {0xc333, "NCT6776F (C)", { {NOLDN, NULL, {0x10,0x11,0x13,0x14,0x16,0x17,0x18,0x19,0x1a, 0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23, 0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,0x2c,0x2d, 0x2e,0x2f,EOT}, {0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xf0, 0x78,0x00,0x00,0xff,0xff,0xc3,0x33,0xff,0x00, 0x64,0x00,MISC,0x00,0x00,0xc0,0x00,0x81,0x00, 0x00,MISC,EOT}}, {0x00, "FDC", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x00,EOT}}, {0x01, "Parallel Port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}}, {0x02, "UART A", {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT}, {0x01,0x03,0xf8,0x04,0x00,0x00,EOT}}, {0x03, "UART B, IR", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,EOT}}, {0x05, "Keyboard Controller", {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}}, {0x06, "CIR", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT}}, {0x07, "GPIO6, GPIO7, GPIO8, GPIO9", {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf4,0xf5, 0xf6,0xf7,0xf8,EOT}, {0x03,0xff,0x00,0x00,0x00,0xef,0x00,0x00,0x00, 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00, 0x00,0x00,0x00,EOT}}, {0x08, "WDT1, GPIO0, GPIO1, GPIOA", {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0, 0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT}, {0x02,0x00,0x00,0xff,0x00,0x00,0x00,0xef,0xff, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x09, "GPIO2, GPIO3, GPIO4, GPIO5", {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4, 0xf5,0xf6,0xf7,0xfe,EOT}, {0x04,0xdf,0x00,0x00,0x00,0xff,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff, 0x00,0x00,0x00,0x00,EOT}}, {0x0a, "ACPI", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9, 0xee,0xf0,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT}, {0x01,0x00,0x00,0x00,0x00,0x02,0x1c,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,EOT}}, {0x0b, "Hardware Monitor, Front Panel LED", {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2, 0xf0,0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa, EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff, 0x00,0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00, EOT}}, {0x0d, "VID", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe9,0xee, 0xef,0xf0,0xf4,0xf5,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88, 0x00,0x00,0x00,0x00,EOT}}, {0x0e, "CIR WAKE-UP", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x0f, "GPIO Push-Pull or Open-drain", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8, 0xe9,0xf0,0xf1,0xf2,EOT}, {0xff,0xdf,0xff,0xfe,0xf6,0xff,0xff,0xd3,0xff, 0x9f,0x00,0x00,0x00,EOT}}, {0x14, "SVID", {0xe0,0xe1,0xe3,0xe4,EOT}, {0x00,0x80,0x00,0x00,EOT}}, {0x16, "Deep Sleep", {0x30,0xe0,0xe1,0xe2,EOT}, {0x20,0x20,0x04,0x05,EOT}}, {0x17, "GPIOA", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,EOT}, {0x01,0x00,0x00,0x00,0x01,0x00,EOT}}, {EOT}}}, {EOT} }; void probe_idregs_nuvoton(uint16_t port) { uint8_t sid, srid; uint16_t chip_id = 0; uint8_t chip_rev = 0; /* Probe for the 16bit IDs first to avoid collisions */ probing_for("Nuvoton", "", port); enter_conf_mode_winbond_fintek_ite_8787(port); chip_id = (regval(port, DEVICE_ID_REG) << 8) | regval(port, DEVICE_ID_REG + 1); exit_conf_mode_winbond_fintek_ite_8787(port); if (!superio_unknown(reg_table, chip_id)) { printf("Found Nuvoton %s (id=0x%02x) at 0x%x\n", get_superio_name(reg_table, chip_id), chip_id, port); chip_found = 1; dump_superio("Nuvoton", reg_table, port, chip_id, LDN_SEL); return; } if (verbose) printf(NOTFOUND "chip_id=0x%04x\n", chip_id); probing_for("Nuvoton", "(sid=0xfc) ", port); sid = regval(port, DEVICE_ID_REG); srid = regval(port, DEVICE_REV_REG); if (sid == 0xfc) { /* WPCE775xL family */ /* * bits 7-5: Chip ID * bits 4-0: Chip revision */ chip_id = srid >> 5; chip_rev = srid & 0x1f; } if (superio_unknown(reg_table, sid)) { if (verbose) printf(NOTFOUND "sid=0x%02x, id=0x%02x, rev=0x%02x\n", sid, chip_id, chip_rev); return; } printf("Found Nuvoton %s (id=0x%02x, rev=0x%02x) at 0x%x\n", get_superio_name(reg_table, sid), chip_id, chip_rev, port); chip_found = 1; dump_superio("Nuvoton", reg_table, port, sid, LDN_SEL); } void print_nuvoton_chips(void) { print_vendor_chips("Nuvoton", reg_table); } ./winbond.c0000600000175000017500000006442311544345073011210 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2007 Uwe Hermann * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "superiotool.h" #define DEVICE_ID_REG_OLD 0x09 #define DEVICE_ID_REG 0x20 #define DEVICE_REV_REG 0x21 /** * The ID entries must be in 0xYYZ format, where YY is the device ID, * and Z is bits 7..4 of the device revision register. We do not match * bits 3..0 of the device revision here (at least for newer Super I/Os). * * But some of the older versions use both bytes (0x20 and 0x21), where * register 0x21 holds the ID and the full 8 bits of 0x21 hold the revision. * * Some other Super I/Os only use bits 3..0 of 0x09 as ID. */ static const struct superio_registers reg_table[] = { /* ID and rev[3..0] */ {0x527, "W83977CTF", { /* TODO: Not yet in sensors-detect */ {EOT}}}, {0x52f, "W83977EF/EG", { {NOLDN, NULL, {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x2a, 0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {RSVD,0x52,MISC,0xff,0xfe,MISC,0x00,MISC,0x00,0x00, 0x00,0x00,RSVD,RSVD,RSVD,EOT}}, /* Some register defaults depend on the value of PNPCSV. */ {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x3, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}}, {0x7, "GPIO 1", {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x72,0xe0, 0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,EOT}}, {0x8, "GPIO 2", {0x30,0x60,0x61,0x70,0x72,0xe8,0xe9,0xea,0xeb,0xec, 0xed,0xf0,0xf1,0xf2,0xf3,0xf4,EOT}, {0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01, 0x01,0x00,RSVD,0x00,0x00,0x00,EOT}}, {0xa, "ACPI", {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,0xfe,0xff,EOT}, {0x00,0x00,0x00,0x00,MISC,MISC,MISC,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,RSVD,RSVD,EOT}}, {EOT}}}, {0x595, "W83627SF", { /* TODO: Not yet in sensors-detect */ {EOT}}}, {0x601, "W83697HF/F/HG", { /* No G version? */ {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29, 0x2a,EOT}, {0x60,NANA,0xff,0x00,0x00,0x00,0x00,0x00,0x00, MISC,EOT}}, /* Some register defaults depend on the value of PNPCSV. */ {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x3, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}}, {0x6, "Consumer IR", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x7, "Game port, GPIO 1", {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT}, {0x00,0x02,0x01,0x00,0x00,0xff,0x00,0x00,EOT}}, {0x8, "MIDI port, GPIO 5", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3, 0xf4,0xf5,EOT}, {0x00,0x03,0x30,0x00,0x00,0x09,0xff,0x00,0x00,0x00, 0x00,0x00,EOT}}, {0x9, "GPIO 2, GPIO 3, GPIO 4", {0x30,0x60,0x61,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6, 0xf7,0xf8,0xf5,EOT}, {0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff, 0x00,0x00,0x00,EOT}}, {0xa, "ACPI", {0x30,0x70,0xe0,0xe1,0xe2,0xe5,0xe6,0xe7, 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,EOT}, {0x00,0x00,0x00,0x00,NANA,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0xb, "Hardware monitor", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {EOT}}}, {0x610, "W83L517D/D-F", { {EOT}}}, {0x708, "W83637HF/HG", { {EOT}}}, {0x828, "W83627THF/THG", { /* We assume rev is bits 3..0 of 0x21. */ {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29,0x2a, 0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0x82,NANA,0xff,0x00,MISC,0x00,MISC,0x00,0x00,0x00, MISC,MISC,MISC,0x00,0x00,EOT}}, /* Some register defaults depend on the value of PNPCSV. */ {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x3, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x80,EOT}}, {0x7, "GPIO 1, GPIO 5, game port, MIDI port", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3, 0xf4,0xf5,EOT}, {0x00,0x02,0x01,0x03,0x30,0x09,0xff,0x00,0x00,0xff, 0x00,0x00,EOT}}, {0x8, "GPIO 2", {0x30,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,EOT}, {0x00,0xff,0x00,0x00,0x00,RSVD,0x00,0x00,0x00,EOT}}, {0x9, "GPIO 3, GPIO 4", {0x30,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,EOT}, {0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,EOT}}, {0xa, "ACPI", /* Note: Datasheet says 0xe2 can't be read/written. */ {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,0xfe,0xff,EOT}, {0x00,0x00,0x00,0x00,MISC,MISC,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,RSVD,RSVD,EOT}}, {0xb, "Hardware monitor", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {EOT}}}, #if 0 {0x85x, "W83687THF", { /* TODO: sensors-detect: 0x85 */ {EOT}}}, #endif {0xa02, "W83627DHG", { {NOLDN, NULL, {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0x00,0xa0,NANA,0xff,0x00,MISC,0x00,MISC,RSVD,0x50, 0x00,0x00,RSVD,0xe2,0x21,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5, EOT}, {0x01,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,0x00, EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x3, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}}, {0x6, "Serial peripheral interface", {0x30,0x62,0x63,EOT}, {0x00,0x00,0x00,EOT}}, {0x7, "GPIO 6", {0x30,0xf4,0xf5,0xf6,0xf7,EOT}, {0x00,0xff,0x00,0x00,0x00,EOT}}, {0x8, "WDTO#, PLED", {0x30,0xf5,0xf6,0xf7,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x9, "GPIO 2, GPIO 3, GPIO 4, GPIO 5", {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8, 0xe9,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xfe, EOT}, {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00, 0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00, EOT}}, {0xa, "ACPI", {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xe8,0xe9,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT}, {0x00,0x00,0x01,0x00,0xff,0x08,0x00,RSVD,0x1c,0x00, RSVD,RSVD,0x7c,0x00,0x00,0x00,0x00,0x00,EOT}}, {0xb, "Hardware monitor", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x00,0x00,0x81,0x00,0x00,EOT}}, {0xc, "PECI, SST", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe8,0xf1,0xfe,0xff, EOT}, {0x00,0x48,0x48,0x48,0x48,0x00,0x00,0x48,0x00,0x00, EOT}}, {EOT}}}, {0xa23, "W83627UHG", {/* TODO: Not yet in sensors-detect */ {EOT}}}, {0xa51, "W83667HG", { /* See also: http://lists.lm-sensors.org/pipermail/lm-sensors/2008-July/023683.html */ {EOT}}}, {0xb07, "W83627DHG-P/-PT", { {NOLDN, NULL, {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0x00,0xb0,NANA,0xff,0x00,MISC,0x00,MISC,RSVD,0x50, 0x00,0x00,RSVD,0xe2,0x21,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5, EOT}, {0x01,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00,0x00, EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x3, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}}, {0x6, "Serial peripheral interface", {0x30,0x62,0x63,EOT}, {0x00,0x00,0x00,EOT}}, {0x7, "GPIO 6", {0x30,0xf4,0xf5,0xf6,0xf7,0xf8,EOT}, {0x00,0xff,0x00,0x00,0x00,0x00,EOT}}, {0x8, "WDTO#, PLED", {0x30,0xf5,0xf6,0xf7,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x9, "GPIO 2, GPIO 3, GPIO 4, GPIO 5", {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8, 0xe9,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, 0xf9,0xfa,0xfe,EOT}, {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00, 0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,EOT}}, {0xa, "ACPI", {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xe8,0xe9,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT}, {0x00,0x00,0x01,0x00,0xff,0x08,0x00,RSVD,0x1c,0x00, RSVD,RSVD,0x7c,0x00,0x00,0x00,0x00,0x00,EOT}}, {0xb, "Hardware monitor", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x00,0x00,0x81,0x00,0x00,EOT}}, {0xc, "PECI, SST", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe8,0xe9,0xea,0xec, 0xee,0xef,0xf1,0xf2,0xf3,0xfe,0xff,EOT}, {0x00,0x48,0x48,0x48,0x48,0x00,0x00,RSVD,0x00,0x00, 0x01,0x5a,0x48,0x50,0x10,0x00,0x00,EOT}}, {EOT}}}, {0xb35, "Nuvoton NCT5571D", { {NOLDN, NULL, {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29, 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {RSVD,0xb3,NANA,0xff,0x00,0x40,0x00,MISC,0xff,0x20,0x00, 0x00,0x7f,0x0a,0x08,0x00,MISC,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}}, {0x7, "GPIO 6, GPIO 8, GPIO 9", {0x30,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed, 0xee,0xf4,0xf5,0xf6,0xf7,0xf8,EOT}, {0x18,0xef,MISC,0x00,0x00,0xff,MISC,0x00,0x00,RSVD,0x00, 0x00,0xff,MISC,0x00,0x00,0x00,EOT}}, {0x9, "GPIO 2, GPIO 3, GPIO 5", {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xea, 0xeb,0xf4,0xf5,0xf6,0xf7,0xfe,EOT}, {0x05,0xff,MISC,0x00,0x00,0xff,MISC,0x00,0x00,0x00,0x00, 0x00,0xff,MISC,0x00,0x00,0x00,EOT}}, {0xa, "ACPI", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xf2, 0xf3,0xf4,0xf6,0xf7,0xfe,0xff,EOT}, {0x01,0x00,0xff,0x00,0x00,0x02,0x1c,0x00,RSVD,0x00,0x7c, 0x00,0x00,0x00,0x00,0x00,0x30,EOT}}, {0xb, "Hardware monitor", {0x30,0x60,0x61,0x70,0xe0,0xe1,0xe2,0xe3,0xf0,0xf5,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc1,0x10,EOT}}, {0xc, "PECI", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe8,0xe9,0xea,0xec, 0xee,0xef,0xf1,0xf2,0xf3,0xfe,0xff,EOT}, {0x00,0x48,0x48,0x48,0x48,0x00,0x00,0x00,RSVD,0x00,0x00, 0x01,0x5a,0x48,0x50,0x10,0x80,0x01,EOT}}, {0xd, "SUSLED", {0xec,EOT}, {0x01,EOT}}, {0xf, "GPIO Push-Pull/OD Select", {0xe0,0xe1,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xf0,0xf1, 0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc, 0xfd,0xfe,0xff,EOT}, {RSVD,0xfd,RSVD,0xf7,0xcb,RSVD,0xff,0xff,0x00,MISC,MISC, MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC, MISC,MISC,MISC,EOT}}, {EOT}}}, /* ID and rev */ {0x9771, "W83977F-A/G-A/AF-A/AG-A", { {EOT}}}, {0x9777, "W83977AF", { /* * W83977AF as found on the Advantech PCM-5820. We weren't able * to find a datasheet (so far) which lists the 0x77 revision, * but the hardware is there in the wild, so detect it... */ {EOT}}}, {0x9773, "W83977TF", { {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x2a,0x2b, 0x2c,0x2d,0x2e,0x2f,EOT}, {0x97,0x73,0xff,0xfe,MISC,0x00,MISC,0x00,0x00,0x00, 0x00,RSVD,RSVD,RSVD,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5, EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00, EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x3, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}}, {0x5, "Keyboard / mouse", {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}}, {0x7, "GPIO 1", {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x72,0xe0, 0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,EOT}}, {0x8, "GPIO 2", {0x30,0x60,0x61,0x70,0x72,0xe8,0xe9,0xea,0xeb,0xec, 0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,EOT}, {0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01, 0x01,0x01,0x00,RSVD,0x00,0x00,0x00,EOT}}, {0x9, "GPIO 3", {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0x72,0xe0, 0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xf1,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,EOT}}, {0xa, "ACPI", {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x70,0xe0,0xe1, 0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6, 0xf7,0xfe,0xff,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, NANA,MISC,RSVD,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,RSVD,RSVD,EOT}}, {EOT}}}, {0x9774, "W83977ATF", { {EOT}}}, {0xb07, "W83527HG", { /* TODO: Not yet in sensors-detect */ {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29, 0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0xB0,0x73,0xff,0x00,MISC,0x00,0x00,RSVD,0x50,0x00, 0x00,RSVD,0xe2,0x21,0x00,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}}, {0x8, "WDTO#, PLED", {0x30,0xf5,0xf6,0xf7,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x9, "GPIO 2, GPIO3, GPIO5", {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9, 0xf0,0xf1,0xf2,0xf3,0xf8,0xf9,0xfa,0xfe,EOT}, {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00, 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0xa, "ACPI", {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xe8,0xe9,0xf2,0xf3,0xf4,0xf6,0xf7,0xfe,EOT}, {0x00,0x00,0x01,0x00,0xff,0x08,0x00,0x00,0x1c,0x00, RSVD,RSVD,0x7c,0x00,0x00,0x00,0x00,0x00,EOT}}, {0xb, "Hardware monitor", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x00,0x00,0x81,RSVD,0x00,EOT}}, {0xc, "PECI", {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe8,0xe9,0xea,0xec, 0xfe,0xff,EOT}, {0x00,0x48,0x48,0x48,0x48,0x00,0x00,RSVD,0x00,0x00, 0x00,0x00,EOT}}, {EOT}}}, /* ID only */ {0x52, "W83627HF/F/HG/G", { {NOLDN, NULL, {0x02,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29, 0x2a,0x2b,0x2c,0x2e,0x2f,EOT}, {0x00,0x52,NANA,0xff,0x00,MISC,0x00,0x00,0x00,0x00, 0x7c,0xc0,0x00,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00, 0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x3, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x80,EOT}}, {0x6, "Consumer IR", {0x30,0x60,0x61,0x70,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x7, "Game port, MIDI port, GPIO 1", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x02,0x01,0x03,0x30,0x09,0xff,0x00,0x00,EOT}}, {0x8, "GPIO 2, watchdog timer", {0x30,0xf0,0xf1,0xf2,0xf3,0xf5,0xf6,0xf6,0xf7,EOT}, {0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0x9, "GPIO 3", {0x30,0xf0,0xf1,0xf2,0xf3,EOT}, {0x00,0xff,0x00,0x00,0x00,EOT}}, {0xa, "ACPI", {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xf0,0xf1,0xf3,0xf4,0xf6,0xf7,0xf9,0xfe,0xff,EOT}, {0x00,0x00,0x00,0x00,NANA,NANA,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, {0xb, "Hardware monitor", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {EOT}}}, {0x68, "W83697SF/UF/UG", { /* ID: 0x68 (for W83697SF/UF/UG) * Rev: 0x1X (for W83697SF) * 0x0X (for W83697SF) -- sic! * 0x1X (for W83697UF/UG) */ {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x28,0x29,0x2a, 0x2b,0x2c,EOT}, {0x68,NANA,0xef,0xfe,MISC,0x00,0x00,0x00,0x00,MISC, 0x00,0x30,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,0xf5, EOT}, {0x01,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,0x00, EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x03,0x3f,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x3, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}}, {0x7, "Game port, GPIO 1", {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT}, {0x00,0x02,0x01,0x00,0x00,0xff,0x00,0x00,EOT}}, {0x8, "MIDI port, GPIO 5", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3, 0xf4,0xf5,EOT}, {0x00,0x03,0x30,0x00,0x00,0x09,0xff,0x00,0x00,0x00, 0x00,0x00,EOT}}, {0x9, "GPIO 2, GPIO 3, GPIO 4", {0x30,0x60,0x61,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6, 0xf7,0xf8,EOT}, {0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff, 0x00,0x00,EOT}}, {0xa, "ACPI", {0x30,0x70,0xf0,0xf1,0xf2,0xf3,0xf4,0xf6,0xf7,0xf9, 0xfa,EOT}, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,EOT}}, {0xb, "PWM", {0x30,0x60,0x61,EOT}, {0x00,0x00,0x00,EOT}}, {0xc, "Smart card", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x00,0x00,0x00,0x00,0x00,EOT}}, {0xd, "URC, GPIO 6", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3, 0xf4,EOT}, {0x00,0x03,0xe8,0x00,0x00,0x00,0x00,0xff,0x00,0x00, 0x00,EOT}}, {0xe, "URD, GPIO 7", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3, EOT}, {0x00,0x02,0xe8,0x00,0x00,0x00,0x00,0xff,0x00,0x00, EOT}}, {0xf, "GPIO 8", {0x30,0x60,0x61,0xf0,0xf1,0xf2,EOT}, {0x00,0x00,0x00,0xff,0x00,0x00,EOT}}, {EOT}}}, {0x88, "W83627EHF/EF/EHG/EG", { /* * As per datasheet the ID should be 0x886? here. * Not mentioned in the datasheet, but sensors-detect says * 0x8853 is also possible. Also, the ASUS A8V-E Deluxe * (W83627EHF) has an ID of 0x8854 (verified on hardware). * So we now assume all 0x88?? IDs to mean W83627EHF/EF/EHG/EG. */ {NOLDN, NULL, {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28, 0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT}, {0x88,MISC,0xff,0x00,MISC,0x00,MISC,RSVD,0x50, 0x04,0x00,RSVD,0x00,0x21,0x00,0x00,EOT}}, {0x0, "Floppy", {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4, 0xf5,EOT}, {0x01,0x03,0xf0,0x06,0x02,0x8e,0x00,0xff,0x00, 0x00,EOT}}, {0x1, "Parallel port", {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,EOT}, {0x01,0x03,0xf8,0x04,0x00,EOT}}, {0x3, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x01,0x02,0xf8,0x03,0x00,0x00,EOT}}, {0x5, "Keyboard", {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, {0x01,0x00,0x60,0x00,0x64,0x01,0x0c,0x83,EOT}}, {0x6, "Serial flash interface", {0x30,0x62,0x63,EOT}, {0x00,0x00,0x00,EOT}}, {0x7, "GPIO 1, GPIO 6, game port, MIDI port", {0x30,0x60,0x61,0x62,0x63,0x70,0xf0,0xf1,0xf2,0xf3, 0xf4,0xf5,0xf6,0xf7,EOT}, {0x00,0x02,0x01,0x03,0x30,0x09,0xff,0x00,0x00,0x00, 0xff,0x00,0x00,0x00,EOT}}, {0x8, "WDTO#, PLED", {0x30,0xf5,0xf6,0xf7,EOT}, {0x00,0x00,0x00,0x00,EOT}}, {0x9, "GPIO 2, GPIO 3, GPIO 4, GPIO 5, SUSLED", {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xf0,0xf1,0xf2, 0xf3,0xf4,0xf5,0xf6,0xf7,EOT}, {0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00, 0x00,0xff,0x00,0x00,0x00,EOT}}, {0xa, "ACPI", {0x30,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7, 0xe8,0xf2,0xf3,0xf4,0xf6,0xf7,EOT}, {0x00,0x00,0x01,0x00,0xff,0x08,0x00,RSVD,0x00,0x00, RSVD,0x7c,0x00,0x00,0x00,0x00,EOT}}, {0xb, "Hardware monitor", {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, {0x00,0x00,0x00,0x00,0xc1,0x00,EOT}}, {EOT}}}, /* ID[3..0] */ {0xa, "W83877F", { {EOT}}}, {0xb, "W83877AF", { {NOLDN, NULL, {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13, 0x14,0x15,0x16,0x17,0x1e,0x20,0x21,0x22,0x23,0x24, 0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,EOT}, {0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x0a, 0x1f,0x0c,0x28,0xa3,RSVD,RSVD,0x00,0x00,0x00,0x00, 0x00,0x00,0x0e,0x00,MISC,MISC,MISC,MISC,MISC,MISC, MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,MISC,EOT}}, {EOT}}}, {0xc, "W83877TF", { {EOT}}}, {0xd, "W83877ATF/ATG", { {EOT}}}, {EOT} }; static const struct superio_registers hwm_table[] = { {0x828, "W83627THF/THG", { {NOLDN, NULL, {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d, 0x1e,0x1f, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29, 0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,0x34, 0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e, 0x3f, 0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49, 0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,EOT}, {RSVD,0xff,RSVD,0xff,0x00,0x00,0x00,0x00,0x01,0x01, 0x01,0x01,0x3c,0x3c,0x0a,0x0a,RSVD,0xff,0x00,0x00, 0x00,0x01,0x01,0x3c,0x43,RSVD,0xff,0xff,RSVD,RSVD, NANA,NANA, NANA,NANA,NANA,NANA,NANA,RSVD,RSVD,NANA,NANA,NANA, NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA,NANA, RSVD,RSVD,RSVD,RSVD,NANA,NANA,NANA,NANA,NANA,RSVD, RSVD, 0x03,0x00,0x00,0xfe,0xff,RSVD,RSVD,0x5f,NANA,0x03, RSVD,0x44,0x18,0x15,0x80,0x5c,EOT}}, {0x0, "Bank 0", {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59, 0x5d,0x5e,0x5f,EOT}, {NANA,NANA,NANA,NANA,NANA,NANA,0x00,0x80,0x90,0x70, 0x00,RSVD,RSVD,EOT}}, {0x1, "Bank 1", {0x50,0x51,0x52,0x53,0x54,0x55,0x56,EOT}, {NANA,NANA,0x00,0x4b,0x00,0x50,0x00,EOT}}, {0x2, "Bank 2", {0x50,0x51,0x52,0x53,0x54,0x55,0x56,EOT}, {NANA,NANA,0x00,0x4b,0x00,0x50,0x00,EOT}}, {0x4, "Bank 4", {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x59,0x5a, 0x5b,EOT}, {0x00,0xff,RSVD,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,EOT}}, {0x5, "Bank 5", {0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,EOT}, {NANA,NANA,RSVD,RSVD,NANA,NANA,NANA,NANA,EOT}}, {0x6, "Bank 6", {0x50,EOT}, {RSVD,EOT}}, {EOT}}}, {EOT} }; static void enter_conf_mode_winbond_88(uint16_t port) { OUTB(0x88, port); } static void enter_conf_mode_winbond_89(uint16_t port) { OUTB(0x89, port); } static void enter_conf_mode_winbond_86(uint16_t port) { OUTB(0x86, port); OUTB(0x86, port); } static int chip_found_at_port; static void probe_idregs_winbond_helper(const char *init, uint16_t port) { uint16_t id, hwmport; uint8_t devid, rev, olddevid; probing_for("Winbond", init, port); devid = regval(port, DEVICE_ID_REG); rev = regval(port, DEVICE_REV_REG); olddevid = regval(port, DEVICE_ID_REG_OLD) & 0x0f; if (devid == 0x52 && (rev & 0xf0) != 0xf0) id = devid; /* ID only */ else if (devid == 0x68 || devid == 0x88) id = devid; /* ID only */ else if ((devid == 0x97) && ((rev & 0xf0) == 0x70)) id = (devid << 8) | rev; /* ID and rev */ else id = (devid << 4) | ((rev & 0xf0) >> 4); /* ID and rev[7..4] */ if (olddevid >= 0x0a && olddevid <= 0x0d) id = olddevid & 0x0f; /* ID[3..0] */ if (superio_unknown(reg_table, id)) { if (verbose) printf(NOTFOUND "id/oldid=0x%02x/0x%02x, rev=0x%02x\n", devid, olddevid, rev); return; } if (olddevid >= 0x0a && olddevid <= 0x0d) printf("Found Winbond %s (id=0x%02x) at 0x%x\n", get_superio_name(reg_table, id), olddevid, port); else printf("Found Winbond %s (id=0x%02x, rev=0x%02x) at 0x%x\n", get_superio_name(reg_table, id), devid, rev, port); chip_found = 1; chip_found_at_port = 1; dump_superio("Winbond", reg_table, port, id, LDN_SEL); if (extra_dump) { regwrite(port, LDN_SEL, 0x0b); /* Select LDN 0xb (HWM). */ if ((regval(port, 0x30) & (1 << 0)) != (1 << 0)) { printf("Hardware Monitor disabled or does not exist.\n"); return; } /* Get HWM base address (stored in LDN 0xb, index 0x60/0x61). */ hwmport = regval(port, 0x60) << 8; hwmport |= regval(port, 0x61); /* HWM address register = HWM base address + 5. */ hwmport += 5; printf("Hardware monitor (0x%04x)\n", hwmport); dump_superio("Winbond-HWM", hwm_table, hwmport, id, WINBOND_HWM_SEL); } } void probe_idregs_winbond(uint16_t port) { chip_found_at_port = 0; enter_conf_mode_winbond_88(port); probe_idregs_winbond_helper("(init=0x88) ", port); exit_conf_mode_winbond_fintek_ite_8787(port); if (chip_found_at_port) return; enter_conf_mode_winbond_89(port); probe_idregs_winbond_helper("(init=0x89) ", port); exit_conf_mode_winbond_fintek_ite_8787(port); if (chip_found_at_port) return; enter_conf_mode_winbond_86(port); probe_idregs_winbond_helper("(init=0x86,0x86) ", port); exit_conf_mode_winbond_fintek_ite_8787(port); if (chip_found_at_port) return; enter_conf_mode_winbond_fintek_ite_8787(port); probe_idregs_winbond_helper("(init=0x87,0x87) ", port); exit_conf_mode_winbond_fintek_ite_8787(port); if (chip_found_at_port) return; } void print_winbond_chips(void) { print_vendor_chips("Winbond", reg_table); print_vendor_chips("Winbond-HWM", hwm_table); } ./superiotool.80000600000175000017500000000732711365505257012064 0ustar uweuwe.TH SUPERIOTOOL 8 "January 18, 2008" .SH NAME superiotool \- Super I/O detection tool .SH SYNOPSIS .B superiotool \fR[\fB\-delVvh\fR] .SH DESCRIPTION .B superiotool is a GPL'd user-space utility which can .PP * detect which Super I/O chip is soldered onto your mainboard, .PP * at which configuration port it's located (usually 0x2e or 0x4e), and .PP * dump all register contents of the Super I/O chip, together with the default values as per datasheet (to make comparing the values easy). .PP It is mainly used for coreboot development purposes (see coreboot.org for details on coreboot), but it may also be useful for other things. .PP The list of supported Super I/O chips is available at .BR http://coreboot.org/Superiotool#Supported_devices "," but it can also be viewed by running .BR "superiotool -l" "." .SH OPTIONS If no command line option is specified, .B superiotool merely tries to detect the Super I/O chip. You must use the .B "\-d" option to dump the Super I/O register contents. .TP .B "\-d, \-\-dump" Dump Super I/O registers (if the Super I/O chip is detected and .B superiotool supports the .B "\-\-dump" option for this chip). The output will look something like this: .sp .B "$ superiotool -d" .br Found SMSC FDC37N769 (id=0x28, rev=0x01) at 0x3f0 .br Register dump: .br idx 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11... .br val 20 90 80 f4 00 00 ff 00 00 00 40 00 0e 28 01 00 00 00... .br def 28 9c 88 70 00 00 ff 00 00 00 00 00 02 28 NA 00 00 80... .sp The .B idx fields contain the register numbers/indexes of the Super I/O, the .B val fields contain the contents of the respective register as read from the Super I/O, and the .B def fields contain the default values for the respective register, as specified in the datasheet. .sp The numbers in the output are all in hex format, and some special values may also occur: .BR NA " stands for" .I "not available" (i.e., the datasheet doesn't specify a default value for the respective register), .BR RR " means" .I reserved (the datasheet explicitly marks this register as reserved), and .BR MM " means" .IR misc , which can mean several things. It's recommended to consult the datasheet for detailed information about the .BR MM " fields." .TP .B "\-e, \-\-extra-dump" Dump extra secondary register contents too, if available. Only in combination with the .B --dump option. This option will, for instance, dump the environmental controller (EC) configuration registers for the ITE IT8716F chip. The format is similar to the output of the .B --dump option. .TP .B "\-l, \-\-list-supported" List all Super I/O chips recognized by .BR superiotool ". The phrase" .BR "(dump available)" following a chip name indicates that .B superiotool supports the .B --dump option for this chip. .TP .B "\-V, \-\-verbose" Enable verbose mode. This option can be used together with the .BR "\-d" " option." .sp The verbose output will not only list for which type of Super I/O the tool is scanning, but also at which configuration port it's probing, and which Super I/O initialization sequence is used. If no Super I/O was detected in a probing run, the returned output will be shown, as it may be useful for figuring out which (currently unrecognized) Super I/O chip this may be. .TP .B "\-v, \-\-version" Show version information and exit. .TP .B "\-h, \-\-help" Show a help text and exit. .SH BUGS Please report any bugs at .B http://tracker.coreboot.org/trac/coreboot/newticket or on the coreboot mailing list .RB "(" http://coreboot.org/Mailinglist ")." .SH AUTHORS Please see the individual source code files and/or the README file. .SH LICENCE .B superiotool is covered by the GNU General Public License (GPL), either version 2 of the License, or (at your option) any later version. .SH SEE ALSO .BR sensors-detect (8) ./serverengines.c0000600000175000017500000000642411550530723012417 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2011 Ruud Schramp * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "superiotool.h" #define DEVICE_ID_BYTE1_REG 0x20 #define DEVICE_ID_BYTE2_REG 0x21 #define DEVICE_REV_REG 0x1f static const struct superio_registers reg_table[] = { /* * Note: These register defaults are based on educated guessing, * take them with a grain of salt. * * TODO: Don't know the ID registers yet: 0x21 probably is not an ID * register as it is being set in the BIOS. For now still use as there * is no known alternative. */ {0x02c0, "SE-SM 4210-P01", { {NOLDN, NULL, {0x1f,0x20,0x21,0x22,0x23,0x2c,0x2d,0x2e,EOT}, {NANA,0x02,0xc0,0x00,0x00,RSVD,RSVD,RSVD,EOT}}, {0x0, "UNKNOWN", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}}, {0x1, "COM2", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x02,0xf8,0x03,0x00,0x00,0x0c,EOT}}, {0x2, "COM1", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {0x00,0x03,0xf8,0x04,0x00,0x00,0x0c,EOT}}, {0x3, "UNKNOWN", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}}, {0x4, "UNKNOWN", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}}, {0x5, "UNKNOWN", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}}, {0x6, "UNKNOWN", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}}, {0x7, "UNKNOWN", {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}}, {EOT}}}, {EOT} }; static void enter_conf_mode_serverengines(uint16_t port) { OUTB(0x5a, port); } static void exit_conf_mode_serverengines(uint16_t port) { OUTB(0xa5, port); } void probe_idregs_serverengines(uint16_t port) { uint16_t id; uint8_t rev; probing_for("Server Engines", "", port); enter_conf_mode_serverengines(port); id = regval(port, DEVICE_ID_BYTE1_REG) << 8; id |= regval(port, DEVICE_ID_BYTE2_REG); /* TODO: Not documented/available on ServerEngines. */ rev = regval(port, DEVICE_REV_REG); if (superio_unknown(reg_table, id)) { if (verbose) printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev); exit_conf_mode_serverengines(port); return; } printf("Found Server Engines %s (id=0x%04x, rev=0x%02x) at 0x%x\n", get_superio_name(reg_table, id), id, rev, port); chip_found = 1; dump_superio("Server Engines", reg_table, port, id, LDN_SEL); exit_conf_mode_serverengines(port); } void print_serverengines_chips(void) { print_vendor_chips("Server Engines", reg_table); } ./pci.c0000600000175000017500000000227011326723316010311 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2010 Uwe Hermann * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "superiotool.h" struct pci_access *pacc; struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device) { struct pci_dev *temp; struct pci_filter filter; pci_filter_init(NULL, &filter); filter.vendor = vendor; filter.device = device; for (temp = pacc->devices; temp; temp = temp->next) if (pci_filter_match(&filter, temp)) return temp; return NULL; } ./superiotool.h0000600000175000017500000001731011554405550012130 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2007 Carl-Daniel Hailfinger * Copyright (C) 2007-2010 Uwe Hermann * Copyright (C) 2008 Robinson P. Tryon * Copyright (C) 2008-2009 coresystems GmbH * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef SUPERIOTOOL_H #define SUPERIOTOOL_H #include #include #include #include #include #if defined(__GLIBC__) #include #endif #if (defined(__MACH__) && defined(__APPLE__)) /* DirectHW is available here: http://www.coreboot.org/DirectHW */ #include #endif #ifdef PCI_SUPPORT #include #endif #if defined(__FreeBSD__) #include #include #define OUTB(x, y) do { u_int tmp = (y); outb(tmp, (x)); } while (0) #define OUTW(x, y) do { u_int tmp = (y); outw(tmp, (x)); } while (0) #define OUTL(x, y) do { u_int tmp = (y); outl(tmp, (x)); } while (0) #define INB(x) __extension__ ({ u_int tmp = (x); inb(tmp); }) #define INW(x) __extension__ ({ u_int tmp = (x); inw(tmp); }) #define INL(x) __extension__ ({ u_int tmp = (x); inl(tmp); }) #else #define OUTB outb #define OUTW outw #define OUTL outl #define INB inb #define INW inw #define INL inl #endif #if defined(__NetBSD__) && (defined(__i386__) || defined(__x86_64__)) #include #include #if defined(__i386__) #define iopl i386_iopl #elif defined(__x86_64__) #define iopl x86_64_iopl #endif static __inline__ void outb(uint8_t value, uint16_t port) { __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port)); } static __inline__ void outw(uint16_t value, uint16_t port) { __asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (port)); } static __inline__ void outl(uint32_t value, uint16_t port) { __asm__ __volatile__ ("outl %0,%w1": :"a" (value), "Nd" (port)); } static __inline__ uint8_t inb(uint16_t port) { uint8_t value; __asm__ __volatile__ ("inb %w1,%0":"=a" (value):"Nd" (port)); return value; } static __inline__ uint16_t inw(uint16_t port) { uint16_t value; __asm__ __volatile__ ("inw %w1,%0":"=a" (value):"Nd" (port)); return value; } static __inline__ uint32_t inl(uint16_t port) { uint32_t value; __asm__ __volatile__ ("inl %1,%0":"=a" (value):"Nd" (port)); return value; } #endif #define USAGE "Usage: superiotool [-d] [-e] [-l] [-V] [-v] [-h]\n\n\ -d | --dump Dump Super I/O register contents\n\ -e | --extra-dump Dump secondary registers too (e.g. EC registers)\n\ -l | --list-supported Show the list of supported Super I/O chips\n\ -V | --verbose Verbose mode\n\ -v | --version Show the superiotool version\n\ -h | --help Show a short help text\n\n" #define USAGE_INFO "\ Per default (no options) superiotool will just probe for a Super I/O\n\ and print its vendor, name, ID, revision, and config port.\n" #define NOTFOUND " Failed. Returned data: " #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #define EOT -1 /* End Of Table */ #define NOLDN -2 /* NO LDN needed */ #define NANA -3 /* Not Available */ #define RSVD -4 /* Reserved */ #define MISC -5 /* Needs special comment in output */ #define MAXLDN 0x14 /* Biggest LDN */ #define LDNSIZE (MAXLDN + 3) /* Biggest LDN + 0 + NOLDN + EOT */ #define MAXNUMIDX 170 /* Maximum number of indices */ #define IDXSIZE (MAXNUMIDX + 1) #define MAXNUMPORTS (6 + 1) /* Maximum number of Super I/O ports */ /* Select registers for various components. */ #define LDN_SEL 0x07 /* LDN select register */ #define WINBOND_HWM_SEL 0x4e /* Hardware monitor bank select */ /* Command line parameters. */ extern int dump, verbose, extra_dump; extern int chip_found; struct superio_registers { int32_t superio_id; /* Signed, as we need EOT. */ const char *name; /* Super I/O name */ struct { int8_t ldn; const char *name; /* LDN name */ int16_t idx[IDXSIZE]; int16_t def[IDXSIZE]; } ldn[LDNSIZE]; }; /* pci.c */ #ifdef PCI_SUPPORT extern struct pci_access *pacc; struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device); #endif /* superiotool.c */ uint8_t regval(uint16_t port, uint8_t reg); void regwrite(uint16_t port, uint8_t reg, uint8_t val); void enter_conf_mode_winbond_fintek_ite_8787(uint16_t port); void exit_conf_mode_winbond_fintek_ite_8787(uint16_t port); void enter_conf_mode_fintek_7777(uint16_t port); void exit_conf_mode_fintek_7777(uint16_t port); int superio_unknown(const struct superio_registers reg_table[], uint16_t id); const char *get_superio_name(const struct superio_registers reg_table[], uint16_t id); void dump_superio(const char *name, const struct superio_registers reg_table[], uint16_t port, uint16_t id, uint8_t ldn_sel); void dump_io(uint16_t iobase, uint16_t length); void probing_for(const char *vendor, const char *info, uint16_t port); void print_vendor_chips(const char *vendor, const struct superio_registers reg_table[]); /* ali.c */ void probe_idregs_ali(uint16_t port); void print_ali_chips(void); /* serverengines.c */ void probe_idregs_serverengines(uint16_t port); void print_serverengines_chips(void); /* fintek.c */ void probe_idregs_fintek(uint16_t port); void probe_idregs_fintek_alternative(uint16_t port); void print_fintek_chips(void); /* ite.c */ void probe_idregs_ite(uint16_t port); void print_ite_chips(void); /* nsc.c */ void probe_idregs_nsc(uint16_t port); void print_nsc_chips(void); /* nuvoton.c */ void probe_idregs_nuvoton(uint16_t port); void print_nuvoton_chips(void); /* smsc.c */ void probe_idregs_smsc(uint16_t port); void print_smsc_chips(void); /* winbond.c */ void probe_idregs_winbond(uint16_t port); void print_winbond_chips(void); /* via.c */ #ifdef PCI_SUPPORT void probe_idregs_via(uint16_t port); void print_via_chips(void); #endif /** Table of which config ports to probe for each Super I/O family. */ static const struct { void (*probe_idregs) (uint16_t port); int ports[MAXNUMPORTS]; /* Signed, as we need EOT. */ } superio_ports_table[] = { {probe_idregs_ali, {0x3f0, 0x370, EOT}}, {probe_idregs_fintek, {0x2e, 0x4e, EOT}}, {probe_idregs_fintek_alternative, {0x2e, 0x4e, EOT}}, /* Only use 0x370 for ITE, but 0x3f0 or 0x3bd would also be valid. */ {probe_idregs_ite, {0x25e, 0x2e, 0x4e, 0x370, EOT}}, {probe_idregs_nsc, {0x2e, 0x4e, 0x15c, 0x164e, EOT}}, /* I/O pairs on Nuvoton EC chips can be configured by firmware in * addition to the following hardware strapping options. */ {probe_idregs_nuvoton, {0x164e, 0x2e, 0x4e, EOT}}, {probe_idregs_smsc, {0x2e, 0x4e, 0x162e, 0x164e, 0x3f0, 0x370, EOT}}, {probe_idregs_winbond, {0x2e, 0x4e, 0x3f0, 0x370, 0x250, EOT}}, #ifdef PCI_SUPPORT {probe_idregs_via, {0x3f0, EOT}}, #endif {probe_idregs_serverengines, {0x2e, EOT}}, }; /** Table of functions to print out supported Super I/O chips. */ static const struct { void (*print_list) (void); } vendor_print_functions[] = { {print_ali_chips}, {print_fintek_chips}, {print_ite_chips}, {print_nsc_chips}, {print_nuvoton_chips}, {print_smsc_chips}, {print_winbond_chips}, #ifdef PCI_SUPPORT {print_via_chips}, #endif {print_serverengines_chips}, }; #endif ./superiotool.c0000600000175000017500000001574411434276433012137 0ustar uweuwe/* * This file is part of the superiotool project. * * Copyright (C) 2006 Ronald Minnich * Copyright (C) 2007 Uwe Hermann * Copyright (C) 2007 Carl-Daniel Hailfinger * Copyright (C) 2008 Robinson P. Tryon * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "superiotool.h" #if defined(__FreeBSD__) #include #include #endif /* Command line options. */ int dump = 0, verbose = 0, extra_dump = 0; /* Global flag which indicates whether a chip was detected at all. */ int chip_found = 0; uint8_t regval(uint16_t port, uint8_t reg) { OUTB(reg, port); return INB(port + ((port == 0x3bd) ? 2 : 1)); /* 0x3bd is special. */ } void regwrite(uint16_t port, uint8_t reg, uint8_t val) { OUTB(reg, port); OUTB(val, port + 1); } void enter_conf_mode_winbond_fintek_ite_8787(uint16_t port) { OUTB(0x87, port); OUTB(0x87, port); } void exit_conf_mode_winbond_fintek_ite_8787(uint16_t port) { OUTB(0xaa, port); /* Fintek, Winbond */ regwrite(port, 0x02, 0x02); /* ITE */ } void enter_conf_mode_fintek_7777(uint16_t port) { OUTB(0x77, port); OUTB(0x77, port); } void exit_conf_mode_fintek_7777(uint16_t port) { OUTB(0xaa, port); /* Fintek */ } int superio_unknown(const struct superio_registers reg_table[], uint16_t id) { return !strncmp(get_superio_name(reg_table, id), "", 9); } const char *get_superio_name(const struct superio_registers reg_table[], uint16_t id) { int i; for (i = 0; /* Nothing */; i++) { if (reg_table[i].superio_id == EOT) break; if ((uint16_t)reg_table[i].superio_id != id) continue; return reg_table[i].name; } return ""; } static void dump_regs(const struct superio_registers reg_table[], int i, int j, uint16_t port, uint8_t ldn_sel) { int k; const int16_t *idx; if (reg_table[i].ldn[j].ldn != NOLDN) { printf("LDN 0x%02x", reg_table[i].ldn[j].ldn); if (reg_table[i].ldn[j].name != NULL) printf(" (%s)", reg_table[i].ldn[j].name); regwrite(port, ldn_sel, reg_table[i].ldn[j].ldn); } else { if (reg_table[i].ldn[j].name == NULL) printf("Register dump:"); else printf("(%s)", reg_table[i].ldn[j].name); } idx = reg_table[i].ldn[j].idx; printf("\nidx"); for (k = 0; idx[k] != EOT; k++) { if (k && !(k % 8)) putchar(' '); printf(" %02x", idx[k]); } printf("\nval"); for (k = 0; idx[k] != EOT; k++) { if (k && !(k % 8)) putchar(' '); printf(" %02x", regval(port, idx[k])); } printf("\ndef"); idx = reg_table[i].ldn[j].def; for (k = 0; idx[k] != EOT; k++) { if (k && !(k % 8)) putchar(' '); if (idx[k] == NANA) printf(" NA"); else if (idx[k] == RSVD) printf(" RR"); else if (idx[k] == MISC) printf(" MM"); else printf(" %02x", idx[k]); } printf("\n"); } void dump_superio(const char *vendor, const struct superio_registers reg_table[], uint16_t port, uint16_t id, uint8_t ldn_sel) { int i, j, no_dump_available = 1; if (!dump) return; for (i = 0; /* Nothing */; i++) { if (reg_table[i].superio_id == EOT) break; if ((uint16_t)reg_table[i].superio_id != id) continue; for (j = 0; /* Nothing */; j++) { if (reg_table[i].ldn[j].ldn == EOT) break; no_dump_available = 0; dump_regs(reg_table, i, j, port, ldn_sel); } if (no_dump_available) printf("No dump available for this Super I/O\n"); } } void dump_io(uint16_t iobase, uint16_t length) { uint16_t i; printf("Dumping %d I/O mapped registers at base 0x%04x:\n", length, iobase); for (i = 0; i < length; i++) printf("%02x ", i); printf("\n"); for (i = 0; i < length; i++) printf("%02x ", INB(iobase + i)); printf("\n"); } void probing_for(const char *vendor, const char *info, uint16_t port) { if (!verbose) return; /* Yes, there's no space between '%s' and 'at'! */ printf("Probing for %s Super I/O %sat 0x%x...\n", vendor, info, port); } /** Print a list of all supported chips from the given vendor. */ void print_vendor_chips(const char *vendor, const struct superio_registers reg_table[]) { int i; for (i = 0; reg_table[i].superio_id != EOT; i++) { printf("%s %s", vendor, reg_table[i].name); /* Unless the ldn is empty, assume this chip has a dump. */ if (reg_table[i].ldn[0].ldn != EOT) printf(" (dump available)"); printf("\n"); } /* If we printed any chips for this vendor, put in a blank line. */ if (i != 0) printf("\n"); } /** Print a list of all chips supported by superiotool. */ void print_list_of_supported_chips(void) { int i; printf("Supported Super I/O chips:\n\n"); for (i = 0; i < ARRAY_SIZE(vendor_print_functions); i++) vendor_print_functions[i].print_list(); printf("See " "for more information.\n"); } static void print_version(void) { printf("superiotool r%s\n", SUPERIOTOOL_VERSION); } int main(int argc, char *argv[]) { int i, j, opt, option_index; #if defined(__FreeBSD__) int io_fd; #endif static const struct option long_options[] = { {"dump", no_argument, NULL, 'd'}, {"extra-dump", no_argument, NULL, 'e'}, {"list-supported", no_argument, NULL, 'l'}, {"verbose", no_argument, NULL, 'V'}, {"version", no_argument, NULL, 'v'}, {"help", no_argument, NULL, 'h'}, {0, 0, 0, 0} }; while ((opt = getopt_long(argc, argv, "delVvh", long_options, &option_index)) != EOF) { switch (opt) { case 'd': dump = 1; break; case 'e': extra_dump = 1; break; case 'l': print_list_of_supported_chips(); exit(0); break; case 'V': verbose = 1; break; case 'v': print_version(); exit(0); break; case 'h': printf(USAGE); printf(USAGE_INFO); exit(0); break; default: /* Unknown option. */ exit(1); break; } } #if defined(__FreeBSD__) if ((io_fd = open("/dev/io", O_RDWR)) < 0) { perror("/dev/io"); #else if (iopl(3) < 0) { perror("iopl"); #endif printf("Superiotool must be run as root.\n"); exit(1); } print_version(); #ifdef PCI_SUPPORT /* Do some basic libpci init. */ pacc = pci_alloc(); pci_init(pacc); pci_scan_bus(pacc); #endif for (i = 0; i < ARRAY_SIZE(superio_ports_table); i++) { for (j = 0; superio_ports_table[i].ports[j] != EOT; j++) superio_ports_table[i].probe_idregs( superio_ports_table[i].ports[j]); } if (!chip_found) printf("No Super I/O found\n"); #if defined(__FreeBSD__) close(io_fd); #endif return 0; }