diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-12-08 14:39:14 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-12-15 10:38:48 +0800 |
commit | 9dec4ac0431895f027cfa72e8e0656d3d69e3e63 (patch) | |
tree | 608b572b1c40d797e0d1e4e6b4d73e17fe12d994 | |
parent | e330e3f5adf78d3ba77217995a4bc3cd1fd16f4c (diff) | |
download | petitboot-9dec4ac0431895f027cfa72e8e0656d3d69e3e63.zip petitboot-9dec4ac0431895f027cfa72e8e0656d3d69e3e63.tar.gz |
discover: Add ipmi module
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>
-rw-r--r-- | discover/Makefile.am | 2 | ||||
-rw-r--r-- | discover/ipmi.c | 8 | ||||
-rw-r--r-- | discover/ipmi.h | 18 | ||||
-rw-r--r-- | discover/platform-powerpc.c | 11 |
4 files changed, 29 insertions, 10 deletions
diff --git a/discover/Makefile.am b/discover/Makefile.am index 5d0f6e2..1e4df0b 100644 --- a/discover/Makefile.am +++ b/discover/Makefile.am @@ -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 index 0000000..4bcdf30 --- /dev/null +++ b/discover/ipmi.c @@ -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 index 0000000..0ed6068 --- /dev/null +++ b/discover/ipmi.h @@ -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 */ diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c index 7c34939..e5dac9e 100644 --- a/discover/platform-powerpc.c +++ b/discover/platform-powerpc.c @@ -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]; |