[Skiboot] [PATCH v3 1/2] opal-api: Add OPAL call to handle abnormal reboots.
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Jul 29 16:00:46 AEST 2015
On Tue, 2015-07-28 at 23:35 +0530, Mahesh J Salgaonkar wrote:
> +static int64_t opal_cec_reboot2(uint32_t reboot_type, uint64_t diag,
> + uint64_t size)
> +{
> + switch (reboot_type) {
> + case OPAL_REBOOT_NORMAL:
> + return opal_cec_reboot();
> + case OPAL_REBOOT_PLATFORM_ERROR:
> + log_error(&e_info(OPAL_RC_ABNORMAL_REBOOT),
> + (void *)diag, size,
> + "OPAL: Reboot requested due to Platform
> error.");
Make this a char*, no need for size, it will be a 0 terminated string.
> + return xscom_trigger_xstop();
> + default:
> + printf("OPAL: Unsupported reboot request %d\n",
> reboot_type);
> + /* Should we call normal reboot for default case ? */
> + return OPAL_UNSUPPORTED;
> + break;
> + }
> + return OPAL_SUCCESS;
> +}
> +opal_call(OPAL_CEC_REBOOT2, opal_cec_reboot2, 3);
> +
More information about the Skiboot
mailing list