From dde15c729cb9430325dee7899c73542cba4ca81a Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Mon, 21 Jul 2014 18:30:33 +0800 Subject: [PATCH 1/1] 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 --- discover/platform-powerpc.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } } -- 2.39.2