]> git.ozlabs.org Git - petitboot/commitdiff
discover: Add ipmi module
authorJeremy Kerr <jk@ozlabs.org>
Mon, 8 Dec 2014 06:39:14 +0000 (14:39 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 15 Dec 2014 02:38:48 +0000 (10:38 +0800)
Move our IPMI-specific definitions to a separate header, and a
mostly-empty ipmi.c file. We'll populate this with IPMI functionality in
later changes.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/Makefile.am
discover/ipmi.c [new file with mode: 0644]
discover/ipmi.h [new file with mode: 0644]
discover/platform-powerpc.c

index 5d0f6e28f97a4ecc0c3f6578cb9482864df82da7..1e4df0b19ca34d286dc6d5302b3f5f69bca261c5 100644 (file)
@@ -69,6 +69,8 @@ discover_pb_discover_CPPFLAGS = \
 discover_platform_ro_SOURCES = \
        discover/platform.c \
        discover/platform.h \
+       discover/ipmi.c \
+       discover/ipmi.h \
        discover/platform-powerpc.c
 
 discover_platform_ro_LINK = \
diff --git a/discover/ipmi.c b/discover/ipmi.c
new file mode 100644 (file)
index 0000000..4bcdf30
--- /dev/null
@@ -0,0 +1,8 @@
+
+#include "ipmi.h"
+
+bool ipmi_present(void)
+{
+       return false;
+}
+
diff --git a/discover/ipmi.h b/discover/ipmi.h
new file mode 100644 (file)
index 0000000..0ed6068
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef _IPMI_H
+#define _IPMI_H
+
+#include <stdbool.h>
+#include <stdint.h>
+
+enum ipmi_bootdev {
+       IPMI_BOOTDEV_NONE = 0x0,
+       IPMI_BOOTDEV_NETWORK = 0x1,
+       IPMI_BOOTDEV_DISK = 0x2,
+       IPMI_BOOTDEV_SAFE = 0x3,
+       IPMI_BOOTDEV_CDROM = 0x5,
+       IPMI_BOOTDEV_SETUP = 0x6,
+};
+
+bool ipmi_present(void);
+
+#endif /* _IPMI_H */
index 7c34939f14197ae4dd84052b8f155f7ecf8829d1..e5dac9efcc8e4b2b8a8f7ef540fe78e5232e8e04 100644 (file)
@@ -16,6 +16,7 @@
 #include <process/process.h>
 
 #include "platform.h"
+#include "ipmi.h"
 
 static const char *partition = "common";
 static const char *sysparams_dir = "/sys/firmware/opal/sysparams/";
@@ -582,16 +583,6 @@ static void set_exclusive_devtype(struct config *config,
        config->boot_priorities[1].priority = -1;
 }
 
-/* bootdev options that we recognise */
-enum ipmi_bootdev {
-       IPMI_BOOTDEV_NONE = 0x00,
-       IPMI_BOOTDEV_NETWORK = 0x01,
-       IPMI_BOOTDEV_DISK = 0x2,
-       IPMI_BOOTDEV_SAFE = 0x3,
-       IPMI_BOOTDEV_CDROM = 0x5,
-       IPMI_BOOTDEV_SETUP = 0x6,
-};
-
 static int read_bootdev_sysparam(const char *name, uint8_t *val)
 {
        uint8_t buf[2];