2 * This file is part of the superiotool project.
4 * Copyright (C) 2011 Ruud Schramp <schramp@holmes.nl>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #include "superiotool.h"
23 #define DEVICE_ID_BYTE1_REG 0x20
24 #define DEVICE_ID_BYTE2_REG 0x21
26 #define DEVICE_REV_REG 0x1f
28 static const struct superio_registers reg_table[] = {
30 * Note: These register defaults are based on educated guessing,
31 * take them with a grain of salt.
33 * TODO: Don't know the ID registers yet: 0x21 probably is not an ID
34 * register as it is being set in the BIOS. For now still use as there
35 * is no known alternative.
37 {0x02c0, "SE-SM 4210-P01", {
39 {0x1f,0x20,0x21,0x22,0x23,0x2c,0x2d,0x2e,EOT},
40 {NANA,0x02,0xc0,0x00,0x00,RSVD,RSVD,RSVD,EOT}},
42 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
43 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
45 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
46 {0x00,0x02,0xf8,0x03,0x00,0x00,0x0c,EOT}},
48 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
49 {0x00,0x03,0xf8,0x04,0x00,0x00,0x0c,EOT}},
51 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
52 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
54 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
55 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
57 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
58 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
60 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
61 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
63 {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
64 {NANA,NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
69 static void enter_conf_mode_serverengines(uint16_t port)
74 static void exit_conf_mode_serverengines(uint16_t port)
79 void probe_idregs_serverengines(uint16_t port)
84 probing_for("Server Engines", "", port);
86 enter_conf_mode_serverengines(port);
88 id = regval(port, DEVICE_ID_BYTE1_REG) << 8;
89 id |= regval(port, DEVICE_ID_BYTE2_REG);
91 /* TODO: Not documented/available on ServerEngines. */
92 rev = regval(port, DEVICE_REV_REG);
94 if (superio_unknown(reg_table, id)) {
96 printf(NOTFOUND "id=0x%04x, rev=0x%02x\n", id, rev);
97 exit_conf_mode_serverengines(port);
101 printf("Found Server Engines %s (id=0x%04x, rev=0x%02x) at 0x%x\n",
102 get_superio_name(reg_table, id), id, rev, port);
105 dump_superio("Server Engines", reg_table, port, id, LDN_SEL);
107 exit_conf_mode_serverengines(port);
110 void print_serverengines_chips(void)
112 print_vendor_chips("Server Engines", reg_table);