1 /* ----------------------------------------------------------------------- *
3 * Portions of this file taken from the dmidecode project
5 * Copyright (C) 2000-2002 Alan Cox <alan@redhat.com>
6 * Copyright (C) 2002-2008 Jean Delvare <khali@linux-fr.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * For the avoidance of doubt the "preferred form" of this code is one which
23 * is in an open unpatent encumbered format. Where cryptographic key signing
24 * forms part of the process of creating an executable the information
25 * including keys needed to generate an equivalently functional executable
26 * are deemed to be part of the source code.
32 const char *dmi_ipmi_interface_type(uint8_t code
)
34 /* 3.3.39.1 and IPMI 2.0, appendix C1, table C1-2 */
35 static const char *type
[] = {
37 "KCS (Keyboard Control Style)",
38 "SMIC (Server Management Interface Chip)",
39 "BT (Block Transfer)",
40 "SSIF (SMBus System Interface)" /* 0x04 */
48 void dmi_ipmi_base_address(uint8_t type
, const uint8_t * p
, s_ipmi
* ipmi
)
50 if (type
== 0x04) { /* SSIF */
51 ipmi
->base_address
= (*p
) >> 1;
53 ipmi
->base_address
= QWORD(p
);