summaryrefslogtreecommitdiffstats
path: root/discover
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-07-21 18:30:33 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-07-22 09:04:59 +0800
commitdde15c729cb9430325dee7899c73542cba4ca81a (patch)
tree4606b064abe9e353ea97779e79eb0ef2098cbaae /discover
parentd2b12ddb905a74fa6b2e454142b0b9f71fd99398 (diff)
downloadpetitboot-dde15c729cb9430325dee7899c73542cba4ca81a.zip
petitboot-dde15c729cb9430325dee7899c73542cba4ca81a.tar.gz
discover/platform-powerpc: Configure safe mode from IPMI bootdev setting
An IPMI bootflags of 0x3 indicates a safe-mode boot. Use this to trigger petitboot's safe mode. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover')
-rw-r--r--discover/platform-powerpc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c
index 6ed6522..24cc521 100644
--- a/discover/platform-powerpc.c
+++ b/discover/platform-powerpc.c
@@ -572,6 +572,7 @@ 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,
};
@@ -612,6 +613,7 @@ static int read_bootdev_sysparam(const char *name, uint8_t *val)
case IPMI_BOOTDEV_NONE:
case IPMI_BOOTDEV_NETWORK:
case IPMI_BOOTDEV_DISK:
+ case IPMI_BOOTDEV_SAFE:
case IPMI_BOOTDEV_CDROM:
case IPMI_BOOTDEV_SETUP:
*val = buf[0];
@@ -698,6 +700,10 @@ static void parse_opal_sysparams(struct config *config)
case IPMI_BOOTDEV_SETUP:
config->autoboot_enabled = false;
break;
+ case IPMI_BOOTDEV_SAFE:
+ config->autoboot_enabled = false;
+ config->safe_mode = true;
+ break;
}
}
OpenPOWER on IntegriCloud