summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2005-10-04 22:04:24 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2005-10-04 22:04:24 +0000
commit5bc42de69a760cbd9582bfa3f95d48d2d9d969f1 (patch)
treeb4c02e0afa0b66f0e0859696e0dc7cb4edf391e4 /sys/arch
parentfa642eccec1a7bdb98134256c5837e4a41f1efdc (diff)
Add initial IPMI implementation. Currently only KCS retrieval method is
supported. SMIC and BMC will follow shortly. Code written by Jordan Hargrave <jordan underscore hargrave at hotmail dot com> help grange@ and deraadt@ ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/conf/GENERIC4
-rw-r--r--sys/arch/i386/conf/files.i38610
-rw-r--r--sys/arch/i386/i386/mainbus.c19
3 files changed, 30 insertions, 3 deletions
diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC
index 09fa9fc43e9..0fb06847a5b 100644
--- a/sys/arch/i386/conf/GENERIC
+++ b/sys/arch/i386/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.432 2005/10/04 06:15:40 grange Exp $
+# $OpenBSD: GENERIC,v 1.433 2005/10/04 22:04:23 marco Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -60,6 +60,8 @@ pci* at mainbus0
#acpitimer* at acpi?
#hpet* at acpi?
+#ipmi0 at mainbus? # IPMI
+
option ACPIVERBOSE
#option ACPI_ENABLE
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index 6882ae53c56..b05a2937e34 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: files.i386,v 1.137 2005/09/26 22:32:03 miod Exp $
+# $OpenBSD: files.i386,v 1.138 2005/10/04 22:04:23 marco Exp $
#
# new style config file for i386 architecture
#
@@ -398,3 +398,11 @@ include "dev/gpio/files.gpio"
include "../../../dev/acpi/files.acpi"
file arch/i386/i386/acpi_machdep.c acpi
+
+#
+# IPMI
+#
+device ipmi
+attach ipmi at mainbus
+file dev/ipmi.c ipmi needs-flag
+
diff --git a/sys/arch/i386/i386/mainbus.c b/sys/arch/i386/i386/mainbus.c
index 053a78ee8d5..4f506e23f8a 100644
--- a/sys/arch/i386/i386/mainbus.c
+++ b/sys/arch/i386/i386/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.17 2005/06/02 20:09:39 tholo Exp $ */
+/* $OpenBSD: mainbus.c,v 1.18 2005/10/04 22:04:23 marco Exp $ */
/* $NetBSD: mainbus.c,v 1.21 1997/06/06 23:14:20 thorpej Exp $ */
/*
@@ -51,6 +51,7 @@
#include "bios.h"
#include "mpbios.h"
#include "acpi.h"
+#include "ipmi.h"
#include <machine/cpuvar.h>
#include <machine/i82093var.h>
@@ -65,6 +66,10 @@
#include <dev/acpi/acpivar.h>
#endif
+#if NIPMI > 0
+#include <dev/ipmivar.h>
+#endif
+
#if 0
#ifdef SMP /* XXX MULTIPROCESSOR */
#include <machine/mp.h>
@@ -97,6 +102,9 @@ union mainbus_attach_args {
#if NACPI > 0
struct acpi_attach_args mba_aaa;
#endif
+#if NIPMI > 0
+ struct ipmi_attach_args mba_iaa;
+#endif
};
/*
@@ -148,6 +156,15 @@ mainbus_attach(parent, self, aux)
config_found(self, &mba.mba_bios, mainbus_print);
}
#endif
+#if NIPMI > 0
+ {
+ memset(&mba.mba_iaa, 0, sizeof(mba.mba_iaa));
+ mba.mba_iaa.iaa_name = "ipmi";
+ mba.mba_iaa.iaa_iot = I386_BUS_SPACE_IO;
+ mba.mba_iaa.iaa_memt = I386_BUS_SPACE_MEM;
+ config_found(self, &mba.mba_iaa, mainbus_print);
+ }
+#endif
#if NMPBIOS > 0
if (mpbios_probe(self))