summaryrefslogtreecommitdiff
path: root/src/drivers/ipmi/ipmi_kcs.h
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2012-07-08 18:32:23 +0200
committerSven Schnelle <svens@stackframe.org>2012-07-09 10:41:05 +0200
commit7435baa5c5cb1511e8a9533965bd07e94a536203 (patch)
treed17faa33bc49bc229066e952d4edb87ffd0295b6 /src/drivers/ipmi/ipmi_kcs.h
parentf5062437dc6fae2932568a3038e6771b0dc8d820 (diff)
Add basic ipmi support
Implements support code for talking to IPMI hardware that uses a KCS style interface. Change-Id: I9895cc1bf29676115b167081b63b8a430e23eee5 Signed-off-by: Sven Schnelle <svens@stackframe.org> Reviewed-on: http://review.coreboot.org/1190 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/drivers/ipmi/ipmi_kcs.h')
-rw-r--r--src/drivers/ipmi/ipmi_kcs.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/drivers/ipmi/ipmi_kcs.h b/src/drivers/ipmi/ipmi_kcs.h
new file mode 100644
index 0000000000..cc4156acf0
--- /dev/null
+++ b/src/drivers/ipmi/ipmi_kcs.h
@@ -0,0 +1,37 @@
+#ifndef __IPMI_KCS_H
+#define __IPMI_KCS_H
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Sven Schnelle <svens@stackframe.org>
+ *
+ * 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; version 2 of
+ * the License.
+ *
+ * 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
+ */
+
+#define IPMI_NETFN_CHASSIS 0x00
+#define IPMI_NETFN_BRIDGE 0x02
+#define IPMI_NETFN_SENSOREVENT 0x04
+#define IPMI_NETFN_APPLICATION 0x06
+#define IPMI_NETFN_FIRMWARE 0x08
+#define IPMI_NETFN_STORAGE 0x0a
+#define IPMI_NETFN_TRANSPORT 0x0c
+
+#define IPMI_CMD_ACPI_POWERON 0x06
+
+extern int ipmi_kcs_message(int port, int netfn, int lun, int cmd,
+ const unsigned char *inmsg, int inlen,
+ unsigned char *outmsg, int outlen);
+#endif