Patrick Georgi | 7333a11 | 2020-05-08 20:48:04 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Uwe Hermann | 0120e1a | 2007-09-16 18:11:03 +0000 | [diff] [blame] | 2 | |
| 3 | #ifndef SUPERIOTOOL_H |
| 4 | #define SUPERIOTOOL_H |
| 5 | |
| 6 | #include <stdio.h> |
| 7 | #include <stdlib.h> |
Uwe Hermann | 6ff6af7 | 2007-09-18 22:24:34 +0000 | [diff] [blame] | 8 | #include <stdint.h> |
Uwe Hermann | 7e7e9ac | 2007-09-19 15:52:23 +0000 | [diff] [blame] | 9 | #include <string.h> |
Uwe Hermann | 3acf31e | 2007-09-19 01:55:35 +0000 | [diff] [blame] | 10 | #include <getopt.h> |
Fabian Groffen | 318ddb8 | 2023-03-10 18:12:25 +0100 | [diff] [blame] | 11 | #if defined(__linux__) |
Uwe Hermann | 0120e1a | 2007-09-16 18:11:03 +0000 | [diff] [blame] | 12 | #include <sys/io.h> |
Andriy Gapon | b64aa60 | 2008-10-28 22:13:38 +0000 | [diff] [blame] | 13 | #endif |
Stefan Reinauer | e95eb61 | 2009-09-01 09:57:55 +0000 | [diff] [blame] | 14 | #if (defined(__MACH__) && defined(__APPLE__)) |
Paul Menzel | a8843de | 2017-06-05 12:33:23 +0200 | [diff] [blame] | 15 | /* DirectHW is available here: https://www.coreboot.org/DirectHW */ |
Stefan Reinauer | cff573d | 2011-03-18 22:08:39 +0000 | [diff] [blame] | 16 | #include <DirectHW/DirectHW.h> |
Stefan Reinauer | e95eb61 | 2009-09-01 09:57:55 +0000 | [diff] [blame] | 17 | #endif |
Andriy Gapon | b64aa60 | 2008-10-28 22:13:38 +0000 | [diff] [blame] | 18 | |
Carl-Daniel Hailfinger | bb38f32 | 2010-01-24 01:40:46 +0000 | [diff] [blame] | 19 | #ifdef PCI_SUPPORT |
Andrey Korolyov | decefea | 2016-01-04 02:20:04 +0300 | [diff] [blame] | 20 | # ifdef __NetBSD__ |
| 21 | #include <pciutils/pci.h> |
| 22 | # else |
Carl-Daniel Hailfinger | bb38f32 | 2010-01-24 01:40:46 +0000 | [diff] [blame] | 23 | #include <pci/pci.h> |
Andrey Korolyov | decefea | 2016-01-04 02:20:04 +0300 | [diff] [blame] | 24 | # endif |
Carl-Daniel Hailfinger | bb38f32 | 2010-01-24 01:40:46 +0000 | [diff] [blame] | 25 | #endif |
| 26 | |
Fabian Groffen | 318ddb8 | 2023-03-10 18:12:25 +0100 | [diff] [blame] | 27 | #include <sys/types.h> |
| 28 | #include <stdint.h> |
| 29 | |
Andriy Gapon | b64aa60 | 2008-10-28 22:13:38 +0000 | [diff] [blame] | 30 | #if defined(__FreeBSD__) |
| 31 | #include <sys/types.h> |
| 32 | #include <machine/cpufunc.h> |
| 33 | #define OUTB(x, y) do { u_int tmp = (y); outb(tmp, (x)); } while (0) |
| 34 | #define OUTW(x, y) do { u_int tmp = (y); outw(tmp, (x)); } while (0) |
| 35 | #define OUTL(x, y) do { u_int tmp = (y); outl(tmp, (x)); } while (0) |
| 36 | #define INB(x) __extension__ ({ u_int tmp = (x); inb(tmp); }) |
| 37 | #define INW(x) __extension__ ({ u_int tmp = (x); inw(tmp); }) |
| 38 | #define INL(x) __extension__ ({ u_int tmp = (x); inl(tmp); }) |
| 39 | #else |
| 40 | #define OUTB outb |
| 41 | #define OUTW outw |
| 42 | #define OUTL outl |
| 43 | #define INB inb |
| 44 | #define INW inw |
| 45 | #define INL inl |
| 46 | #endif |
Uwe Hermann | 0120e1a | 2007-09-16 18:11:03 +0000 | [diff] [blame] | 47 | |
Jonathan Kollasch | 760498f | 2010-10-24 14:18:55 +0000 | [diff] [blame] | 48 | #if defined(__NetBSD__) && (defined(__i386__) || defined(__x86_64__)) |
Jonathan Kollasch | 51ac838 | 2010-10-24 14:10:35 +0000 | [diff] [blame] | 49 | #include <sys/types.h> |
| 50 | #include <machine/sysarch.h> |
| 51 | #if defined(__i386__) |
| 52 | #define iopl i386_iopl |
| 53 | #elif defined(__x86_64__) |
| 54 | #define iopl x86_64_iopl |
| 55 | #endif |
| 56 | |
| 57 | static __inline__ void |
| 58 | outb(uint8_t value, uint16_t port) |
| 59 | { |
| 60 | __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port)); |
| 61 | } |
| 62 | |
| 63 | static __inline__ void |
| 64 | outw(uint16_t value, uint16_t port) |
| 65 | { |
| 66 | __asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (port)); |
| 67 | } |
| 68 | |
| 69 | static __inline__ void |
| 70 | outl(uint32_t value, uint16_t port) |
| 71 | { |
| 72 | __asm__ __volatile__ ("outl %0,%w1": :"a" (value), "Nd" (port)); |
| 73 | } |
| 74 | |
| 75 | static __inline__ uint8_t inb(uint16_t port) |
| 76 | { |
| 77 | uint8_t value; |
| 78 | __asm__ __volatile__ ("inb %w1,%0":"=a" (value):"Nd" (port)); |
| 79 | return value; |
| 80 | } |
| 81 | |
| 82 | static __inline__ uint16_t inw(uint16_t port) |
| 83 | { |
| 84 | uint16_t value; |
| 85 | __asm__ __volatile__ ("inw %w1,%0":"=a" (value):"Nd" (port)); |
| 86 | return value; |
| 87 | } |
| 88 | |
| 89 | static __inline__ uint32_t inl(uint16_t port) |
| 90 | { |
| 91 | uint32_t value; |
| 92 | __asm__ __volatile__ ("inl %1,%0":"=a" (value):"Nd" (port)); |
| 93 | return value; |
| 94 | } |
| 95 | #endif |
| 96 | |
Nico Huber | 3812a72 | 2016-10-12 12:12:51 +0200 | [diff] [blame] | 97 | #define USAGE "Usage: superiotool [-d] [-e] [-a] [-l] [-V] [-v] [-h]\n\n\ |
Uwe Hermann | 74b29b9 | 2007-11-17 17:13:52 +0000 | [diff] [blame] | 98 | -d | --dump Dump Super I/O register contents\n\ |
Uwe Hermann | eec5ff4 | 2008-03-01 18:49:39 +0000 | [diff] [blame] | 99 | -e | --extra-dump Dump secondary registers too (e.g. EC registers)\n\ |
Nico Huber | 3812a72 | 2016-10-12 12:12:51 +0200 | [diff] [blame] | 100 | -a | --alternate-dump Use alternative dump format, more suitable for diff\n\ |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 101 | -l | --list-supported Show the list of supported Super I/O chips\n\ |
Uwe Hermann | eddc473 | 2007-09-20 23:57:44 +0000 | [diff] [blame] | 102 | -V | --verbose Verbose mode\n\ |
| 103 | -v | --version Show the superiotool version\n\ |
Uwe Hermann | 969a9f6 | 2008-03-17 13:43:48 +0000 | [diff] [blame] | 104 | -h | --help Show a short help text\n\n" |
| 105 | |
| 106 | #define USAGE_INFO "\ |
Uwe Hermann | e474956 | 2007-09-19 16:26:18 +0000 | [diff] [blame] | 107 | Per default (no options) superiotool will just probe for a Super I/O\n\ |
Uwe Hermann | afe8309 | 2007-09-28 15:45:43 +0000 | [diff] [blame] | 108 | and print its vendor, name, ID, revision, and config port.\n" |
Uwe Hermann | e474956 | 2007-09-19 16:26:18 +0000 | [diff] [blame] | 109 | |
Uwe Hermann | 8b8d039 | 2007-10-04 15:23:38 +0000 | [diff] [blame] | 110 | #define NOTFOUND " Failed. Returned data: " |
| 111 | |
Uwe Hermann | d754d2c | 2007-09-18 23:30:24 +0000 | [diff] [blame] | 112 | #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) |
| 113 | |
Uwe Hermann | 4cb7e71 | 2007-09-16 18:17:44 +0000 | [diff] [blame] | 114 | #define EOT -1 /* End Of Table */ |
| 115 | #define NOLDN -2 /* NO LDN needed */ |
Felix Held | e5b05d6 | 2019-06-11 19:23:55 +0200 | [diff] [blame] | 116 | #define NANA -3 /* Not Available: |
| 117 | Used for registers having externally controlled |
| 118 | values that can change during runtime like |
| 119 | GPIO input value registers. */ |
Uwe Hermann | 6ff6af7 | 2007-09-18 22:24:34 +0000 | [diff] [blame] | 120 | #define RSVD -4 /* Reserved */ |
Felix Held | e5b05d6 | 2019-06-11 19:23:55 +0200 | [diff] [blame] | 121 | #define MISC -5 /* Needs special comment in output: |
| 122 | Used for registers depending on external pin straps |
| 123 | configuring static, but board-specific settings like |
| 124 | SIO base address or AMD/Intel power seqencing type. */ |
Tom Sylla | 92af509 | 2008-06-07 11:36:30 +0000 | [diff] [blame] | 125 | #define MAXLDN 0x14 /* Biggest LDN */ |
Uwe Hermann | 4cb7e71 | 2007-09-16 18:17:44 +0000 | [diff] [blame] | 126 | #define LDNSIZE (MAXLDN + 3) /* Biggest LDN + 0 + NOLDN + EOT */ |
Stefan Reinauer | 7a51e50 | 2008-12-01 14:18:57 +0000 | [diff] [blame] | 127 | #define MAXNUMIDX 170 /* Maximum number of indices */ |
Elyes HAOUAS | b9585c5 | 2018-05-29 22:23:48 +0200 | [diff] [blame] | 128 | #define IDXSIZE (MAXNUMIDX + 1) |
Uwe Hermann | 14f304a | 2007-10-08 01:11:11 +0000 | [diff] [blame] | 129 | #define MAXNUMPORTS (6 + 1) /* Maximum number of Super I/O ports */ |
Uwe Hermann | 4cb7e71 | 2007-09-16 18:17:44 +0000 | [diff] [blame] | 130 | |
Stefan Reinauer | 7a51e50 | 2008-12-01 14:18:57 +0000 | [diff] [blame] | 131 | /* Select registers for various components. */ |
| 132 | #define LDN_SEL 0x07 /* LDN select register */ |
| 133 | #define WINBOND_HWM_SEL 0x4e /* Hardware monitor bank select */ |
| 134 | |
Uwe Hermann | 3acf31e | 2007-09-19 01:55:35 +0000 | [diff] [blame] | 135 | /* Command line parameters. */ |
Ronald Hoogenboom | 0be73bb | 2008-02-25 22:32:41 +0000 | [diff] [blame] | 136 | extern int dump, verbose, extra_dump; |
Uwe Hermann | 3acf31e | 2007-09-19 01:55:35 +0000 | [diff] [blame] | 137 | |
Uwe Hermann | e9d4616 | 2007-10-07 20:01:23 +0000 | [diff] [blame] | 138 | extern int chip_found; |
| 139 | |
Uwe Hermann | 4cb7e71 | 2007-09-16 18:17:44 +0000 | [diff] [blame] | 140 | struct superio_registers { |
Uwe Hermann | eddc473 | 2007-09-20 23:57:44 +0000 | [diff] [blame] | 141 | int32_t superio_id; /* Signed, as we need EOT. */ |
Uwe Hermann | 42cccdf | 2008-03-29 01:35:21 +0000 | [diff] [blame] | 142 | const char *name; /* Super I/O name */ |
Uwe Hermann | 6ff6af7 | 2007-09-18 22:24:34 +0000 | [diff] [blame] | 143 | struct { |
Uwe Hermann | 42cccdf | 2008-03-29 01:35:21 +0000 | [diff] [blame] | 144 | int8_t ldn; |
Uwe Hermann | eddc473 | 2007-09-20 23:57:44 +0000 | [diff] [blame] | 145 | const char *name; /* LDN name */ |
Uwe Hermann | 42cccdf | 2008-03-29 01:35:21 +0000 | [diff] [blame] | 146 | int16_t idx[IDXSIZE]; |
| 147 | int16_t def[IDXSIZE]; |
Uwe Hermann | 4cb7e71 | 2007-09-16 18:17:44 +0000 | [diff] [blame] | 148 | } ldn[LDNSIZE]; |
| 149 | }; |
| 150 | |
Carl-Daniel Hailfinger | bb38f32 | 2010-01-24 01:40:46 +0000 | [diff] [blame] | 151 | /* pci.c */ |
| 152 | #ifdef PCI_SUPPORT |
| 153 | extern struct pci_access *pacc; |
| 154 | struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device); |
| 155 | #endif |
| 156 | |
Uwe Hermann | 4cb7e71 | 2007-09-16 18:17:44 +0000 | [diff] [blame] | 157 | /* superiotool.c */ |
Uwe Hermann | de24a0e | 2007-09-19 00:03:14 +0000 | [diff] [blame] | 158 | uint8_t regval(uint16_t port, uint8_t reg); |
| 159 | void regwrite(uint16_t port, uint8_t reg, uint8_t val); |
Uwe Hermann | b4db220 | 2007-09-20 23:37:56 +0000 | [diff] [blame] | 160 | void enter_conf_mode_winbond_fintek_ite_8787(uint16_t port); |
| 161 | void exit_conf_mode_winbond_fintek_ite_8787(uint16_t port); |
Stefan Reinauer | e7b7ae2 | 2010-08-17 08:24:01 +0000 | [diff] [blame] | 162 | void enter_conf_mode_fintek_7777(uint16_t port); |
| 163 | void exit_conf_mode_fintek_7777(uint16_t port); |
Uwe Hermann | 7e7e9ac | 2007-09-19 15:52:23 +0000 | [diff] [blame] | 164 | int superio_unknown(const struct superio_registers reg_table[], uint16_t id); |
Uwe Hermann | 3acf31e | 2007-09-19 01:55:35 +0000 | [diff] [blame] | 165 | const char *get_superio_name(const struct superio_registers reg_table[], |
| 166 | uint16_t id); |
Uwe Hermann | 519419b | 2007-09-16 20:59:01 +0000 | [diff] [blame] | 167 | void dump_superio(const char *name, const struct superio_registers reg_table[], |
Stefan Reinauer | 7a51e50 | 2008-12-01 14:18:57 +0000 | [diff] [blame] | 168 | uint16_t port, uint16_t id, uint8_t ldn_sel); |
Stefan Reinauer | 6df0c62 | 2009-03-11 14:48:20 +0000 | [diff] [blame] | 169 | void dump_io(uint16_t iobase, uint16_t length); |
Guenter Roeck | a89da09 | 2012-06-29 12:23:50 -0700 | [diff] [blame] | 170 | void dump_data(uint16_t iobase, int bank); |
Uwe Hermann | 8b8d039 | 2007-10-04 15:23:38 +0000 | [diff] [blame] | 171 | void probing_for(const char *vendor, const char *info, uint16_t port); |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 172 | void print_vendor_chips(const char *vendor, |
| 173 | const struct superio_registers reg_table[]); |
Uwe Hermann | 0120e1a | 2007-09-16 18:11:03 +0000 | [diff] [blame] | 174 | |
Uwe Hermann | 945045b | 2007-09-28 15:39:10 +0000 | [diff] [blame] | 175 | /* ali.c */ |
| 176 | void probe_idregs_ali(uint16_t port); |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 177 | void print_ali_chips(void); |
Uwe Hermann | 945045b | 2007-09-28 15:39:10 +0000 | [diff] [blame] | 178 | |
Patrick Rudolph | 674bb3b | 2019-05-24 09:07:04 +0200 | [diff] [blame] | 179 | /* aspeed.c */ |
| 180 | void probe_idregs_aspeed(uint16_t port); |
| 181 | void print_aspeed_chips(void); |
| 182 | |
Rudolf Marek | 113c349 | 2011-10-27 20:42:11 +0200 | [diff] [blame] | 183 | /* amd.c */ |
| 184 | void probe_idregs_amd(uint16_t port); |
| 185 | void print_amd_chips(void); |
| 186 | |
Ruud Schramp | 18b0236 | 2011-04-11 07:46:27 +0000 | [diff] [blame] | 187 | /* serverengines.c */ |
| 188 | void probe_idregs_serverengines(uint16_t port); |
| 189 | void print_serverengines_chips(void); |
| 190 | |
Derek Waldner | 3b42119 | 2016-04-14 12:13:48 -0500 | [diff] [blame] | 191 | /* exar.c */ |
| 192 | void probe_idregs_exar(uint16_t port); |
| 193 | void print_exar_chips(void); |
| 194 | |
Uwe Hermann | 0120e1a | 2007-09-16 18:11:03 +0000 | [diff] [blame] | 195 | /* fintek.c */ |
Uwe Hermann | de24a0e | 2007-09-19 00:03:14 +0000 | [diff] [blame] | 196 | void probe_idregs_fintek(uint16_t port); |
Stefan Reinauer | e7b7ae2 | 2010-08-17 08:24:01 +0000 | [diff] [blame] | 197 | void probe_idregs_fintek_alternative(uint16_t port); |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 198 | void print_fintek_chips(void); |
Uwe Hermann | 0120e1a | 2007-09-16 18:11:03 +0000 | [diff] [blame] | 199 | |
Jonathan A. Kollasch | 3d1d6bb | 2011-11-07 10:56:42 -0600 | [diff] [blame] | 200 | /* infineon.c */ |
| 201 | void probe_idregs_infineon(uint16_t port); |
| 202 | void print_infineon_chips(void); |
| 203 | |
Uwe Hermann | 0120e1a | 2007-09-16 18:11:03 +0000 | [diff] [blame] | 204 | /* ite.c */ |
Uwe Hermann | de24a0e | 2007-09-19 00:03:14 +0000 | [diff] [blame] | 205 | void probe_idregs_ite(uint16_t port); |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 206 | void print_ite_chips(void); |
Uwe Hermann | 0120e1a | 2007-09-16 18:11:03 +0000 | [diff] [blame] | 207 | |
| 208 | /* nsc.c */ |
Uwe Hermann | 8b8d039 | 2007-10-04 15:23:38 +0000 | [diff] [blame] | 209 | void probe_idregs_nsc(uint16_t port); |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 210 | void print_nsc_chips(void); |
Uwe Hermann | 0120e1a | 2007-09-16 18:11:03 +0000 | [diff] [blame] | 211 | |
David Hendricks | e1822d9 | 2010-07-22 22:56:44 +0000 | [diff] [blame] | 212 | /* nuvoton.c */ |
| 213 | void probe_idregs_nuvoton(uint16_t port); |
| 214 | void print_nuvoton_chips(void); |
| 215 | |
Uwe Hermann | 6ff6af7 | 2007-09-18 22:24:34 +0000 | [diff] [blame] | 216 | /* smsc.c */ |
Uwe Hermann | de24a0e | 2007-09-19 00:03:14 +0000 | [diff] [blame] | 217 | void probe_idregs_smsc(uint16_t port); |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 218 | void print_smsc_chips(void); |
Uwe Hermann | d754d2c | 2007-09-18 23:30:24 +0000 | [diff] [blame] | 219 | |
Uwe Hermann | 7e7e9ac | 2007-09-19 15:52:23 +0000 | [diff] [blame] | 220 | /* winbond.c */ |
| 221 | void probe_idregs_winbond(uint16_t port); |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 222 | void print_winbond_chips(void); |
Uwe Hermann | 7e7e9ac | 2007-09-19 15:52:23 +0000 | [diff] [blame] | 223 | |
Carl-Daniel Hailfinger | bb38f32 | 2010-01-24 01:40:46 +0000 | [diff] [blame] | 224 | /* via.c */ |
| 225 | #ifdef PCI_SUPPORT |
| 226 | void probe_idregs_via(uint16_t port); |
| 227 | void print_via_chips(void); |
| 228 | #endif |
| 229 | |
Uwe Hermann | c3da366 | 2007-09-26 16:14:16 +0000 | [diff] [blame] | 230 | /** Table of which config ports to probe for each Super I/O family. */ |
Uwe Hermann | 246be7d | 2007-10-31 22:22:11 +0000 | [diff] [blame] | 231 | static const struct { |
Uwe Hermann | de24a0e | 2007-09-19 00:03:14 +0000 | [diff] [blame] | 232 | void (*probe_idregs) (uint16_t port); |
| 233 | int ports[MAXNUMPORTS]; /* Signed, as we need EOT. */ |
Uwe Hermann | d754d2c | 2007-09-18 23:30:24 +0000 | [diff] [blame] | 234 | } superio_ports_table[] = { |
Uwe Hermann | 945045b | 2007-09-28 15:39:10 +0000 | [diff] [blame] | 235 | {probe_idregs_ali, {0x3f0, 0x370, EOT}}, |
Patrick Rudolph | 674bb3b | 2019-05-24 09:07:04 +0200 | [diff] [blame] | 236 | {probe_idregs_aspeed, {0x2e, 0x4e, EOT}}, |
Derek Waldner | 3b42119 | 2016-04-14 12:13:48 -0500 | [diff] [blame] | 237 | {probe_idregs_exar, {0x2e, 0x4e, EOT}}, |
Uwe Hermann | 0f86732 | 2007-09-24 01:40:09 +0000 | [diff] [blame] | 238 | {probe_idregs_fintek, {0x2e, 0x4e, EOT}}, |
Stefan Reinauer | e7b7ae2 | 2010-08-17 08:24:01 +0000 | [diff] [blame] | 239 | {probe_idregs_fintek_alternative, {0x2e, 0x4e, EOT}}, |
Urja Rannikko | 38204a2 | 2008-10-23 23:33:18 +0000 | [diff] [blame] | 240 | /* Only use 0x370 for ITE, but 0x3f0 or 0x3bd would also be valid. */ |
Patrick Rudolph | 6085d39 | 2019-01-09 16:42:07 +0100 | [diff] [blame] | 241 | {probe_idregs_ite, {0x20e, 0x25e, 0x2e, 0x4e, 0x370, 0x6e, EOT}}, |
Sven Schnelle | ed61c4a | 2011-02-02 23:49:41 +0000 | [diff] [blame] | 242 | {probe_idregs_nsc, {0x2e, 0x4e, 0x15c, 0x164e, EOT}}, |
David Hendricks | e1822d9 | 2010-07-22 22:56:44 +0000 | [diff] [blame] | 243 | /* I/O pairs on Nuvoton EC chips can be configured by firmware in |
| 244 | * addition to the following hardware strapping options. */ |
Stefan Reinauer | 3187d02 | 2011-04-22 23:12:40 +0000 | [diff] [blame] | 245 | {probe_idregs_nuvoton, {0x164e, 0x2e, 0x4e, EOT}}, |
Uwe Hermann | 14f304a | 2007-10-08 01:11:11 +0000 | [diff] [blame] | 246 | {probe_idregs_smsc, {0x2e, 0x4e, 0x162e, 0x164e, 0x3f0, 0x370, EOT}}, |
Uwe Hermann | c3da366 | 2007-09-26 16:14:16 +0000 | [diff] [blame] | 247 | {probe_idregs_winbond, {0x2e, 0x4e, 0x3f0, 0x370, 0x250, EOT}}, |
Carl-Daniel Hailfinger | bb38f32 | 2010-01-24 01:40:46 +0000 | [diff] [blame] | 248 | #ifdef PCI_SUPPORT |
Lubomir Rintel | 2f6a29e | 2017-10-31 09:25:05 +0100 | [diff] [blame] | 249 | {probe_idregs_via, {0x2e, 0x4e, 0x3f0, EOT}}, |
Rudolf Marek | 113c349 | 2011-10-27 20:42:11 +0200 | [diff] [blame] | 250 | /* in fact read the BASE from HW */ |
| 251 | {probe_idregs_amd, {0xaa, EOT}}, |
Carl-Daniel Hailfinger | bb38f32 | 2010-01-24 01:40:46 +0000 | [diff] [blame] | 252 | #endif |
Ruud Schramp | 18b0236 | 2011-04-11 07:46:27 +0000 | [diff] [blame] | 253 | {probe_idregs_serverengines, {0x2e, EOT}}, |
Jonathan A. Kollasch | cb34bba | 2012-01-02 19:11:49 -0600 | [diff] [blame] | 254 | {probe_idregs_infineon, {0x2e, 0x4e, EOT}}, |
Uwe Hermann | d754d2c | 2007-09-18 23:30:24 +0000 | [diff] [blame] | 255 | }; |
Uwe Hermann | 6ff6af7 | 2007-09-18 22:24:34 +0000 | [diff] [blame] | 256 | |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 257 | /** Table of functions to print out supported Super I/O chips. */ |
| 258 | static const struct { |
| 259 | void (*print_list) (void); |
| 260 | } vendor_print_functions[] = { |
| 261 | {print_ali_chips}, |
Derek Waldner | 3b42119 | 2016-04-14 12:13:48 -0500 | [diff] [blame] | 262 | {print_exar_chips}, |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 263 | {print_fintek_chips}, |
| 264 | {print_ite_chips}, |
| 265 | {print_nsc_chips}, |
David Hendricks | e1822d9 | 2010-07-22 22:56:44 +0000 | [diff] [blame] | 266 | {print_nuvoton_chips}, |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 267 | {print_smsc_chips}, |
| 268 | {print_winbond_chips}, |
Carl-Daniel Hailfinger | bb38f32 | 2010-01-24 01:40:46 +0000 | [diff] [blame] | 269 | #ifdef PCI_SUPPORT |
| 270 | {print_via_chips}, |
Rudolf Marek | 113c349 | 2011-10-27 20:42:11 +0200 | [diff] [blame] | 271 | {print_amd_chips}, |
Patrick Rudolph | 674bb3b | 2019-05-24 09:07:04 +0200 | [diff] [blame] | 272 | {print_aspeed_chips}, |
Carl-Daniel Hailfinger | bb38f32 | 2010-01-24 01:40:46 +0000 | [diff] [blame] | 273 | #endif |
Ruud Schramp | 18b0236 | 2011-04-11 07:46:27 +0000 | [diff] [blame] | 274 | {print_serverengines_chips}, |
Jonathan A. Kollasch | 3d1d6bb | 2011-11-07 10:56:42 -0600 | [diff] [blame] | 275 | {print_infineon_chips}, |
Robinson P. Tryon | 552cfb7 | 2008-01-15 22:30:55 +0000 | [diff] [blame] | 276 | }; |
| 277 | |
Uwe Hermann | 0120e1a | 2007-09-16 18:11:03 +0000 | [diff] [blame] | 278 | #endif |