summaryrefslogtreecommitdiffstats
path: root/discover/platform-powerpc.c
Commit message (Collapse)AuthorAgeFilesLines
* discover/platform-powerpc: Configure safe mode from IPMI bootdev settingJeremy Kerr2014-07-221-0/+6
| | | | | | | 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>
* discover/powerpc: Parse & save default boot device parameterJeremy Kerr2014-07-211-0/+46
| | | | | | | This change implement load & save support for the default boot device configuration parameter. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/platform-powerpc: Don't rely on NVRAM workingJeremy Kerr2014-06-301-5/+1
| | | | | | | | | Although we need nvram to save settings, we may be running on a nvram-less machine, but still need to detect as powerpc. This change removes the nvram check. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Fix uninitialised var warningsJeremy Kerr2014-04-161-2/+2
| | | | | | | | | | | | | | We get a couple of uninitialised var warning when compiling with certain CFLAGS (-fprofile-arcs -ftest-coverage at this stage). In statement_if_execute: We'll never actually use this uninitialised (as there must be at least one conditional in the parsed statement), but we should address the warning nonetheless. As passed to strtok_r: strtok will initialise this, but it isn't obvious to the compiler. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/powerpc: Invalidate next bootdev after readingJeremy Kerr2014-03-141-3/+46
| | | | | | | The next-bootdev sysparam should only apply for the next boot, so invalidate it after reading. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/powerpc: Fix sysparams base pathJeremy Kerr2014-03-141-1/+1
| | | | | | | We are appending the sysparam filename onto sysparams_dir, so we need a trailing slash. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Add debug output to sysparams parsingJeremy Kerr2014-03-141-2/+10
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* platforms/powerpc: Add support for OPAL sysparamsJeremy Kerr2014-01-301-0/+102
| | | | | | | | | PowerPC OPAL firmware's sysparam interface allows us to read the boot device set over IPMI. This change implements support for IPMI bootdev selection over the sysparams interface, using the new boot_priority infrastructure. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover/network: Use platform definition for DHCP architecture IDJeremy Kerr2014-01-301-0/+1
| | | | | | | Allow a platform to specify a DHCP architecture ID, as this is platform-specific. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* platforms/powerpc: Check for a powerpc platform in the probe functionJeremy Kerr2014-01-301-0/+15
| | | | | | | | | | Currently, we're always assuming a powerpc platform, as the powerpc probe() function always returns true. This change adds a check for some bits we need to work on a powerpc platform. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pb-config: Move config storage modules to "platform" modules in discover codeJeremy Kerr2014-01-301-0/+553
There's no need to include the config storage code in lib/ as only the discover server should be using it. This change moves the config-storage code to discover/, with the platform-specific parts moved to a 'struct platform'. Each platform has a probe function, which is called during init. The first probe function to return a platform is used. At present we only have the one platform, but it's now non-intrusive to add others. We keep an array of platform pointers in a separate ("platforms") section, to allow the test module to drop-in its own test "platform". Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
OpenPOWER on IntegriCloud