[Skiboot] [PATCH V2 6/6] opal/errorlog : Enables errorlog write to host on BMC systems

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Jun 10 19:05:01 AEST 2016


On 06/09/2016 07:24 PM, Mukesh Ojha wrote:
> Adds the support of errorlog write to host on BMC based system by using the
> generic interface of errorlog read/write framework. OPAL sents the errorlog
> messages to both BMC and host kernel by passing the errorlog buffers.
>
> 'opal_elog_init' initialises the memory and the callbacks require for
> errorlog write to host framework.
>
> Signed-off-by: Mukesh Ojha <mukesh02 at linux.vnet.ibm.com>
>
> ---
> Changes in V2:
>   - Changes description.
>   - get_elog, put_elog routine and ref_count variable implementation move to
>     the separate patch 5/6.
>
>   hw/ipmi/ipmi-sel.c        | 16 ++++++++++++++--
>   platforms/astbmc/common.c |  6 ++++--
>   2 files changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c
> index 6bc386a..3e6091c 100644
> --- a/hw/ipmi/ipmi-sel.c
> +++ b/hw/ipmi/ipmi-sel.c
> @@ -415,24 +415,35 @@ int ipmi_elog_commit(struct errorlog *elog_buf)
>   {
>   	struct ipmi_msg *msg;
>
> +	get_elog(elog_buf);
> +	/* We take get_elog two times to make sure errorlog will be sent to
> +	 * both BMC and the host irrespective of either of them is complete
> +	 * or not, buffer will be return to the pool during the call of
> +	 * opal_elog_complete.
> +	 */
> +	get_elog(elog_buf);
> +
>   	/* Only log events that needs attention */
>   	if (elog_buf->event_severity < OPAL_PREDICTIVE_ERR_FAULT_RECTIFY_REBOOT ||
>   	    elog_buf->elog_origin != ORG_SAPPHIRE) {
>   		prlog(PR_INFO, "dropping non severe PEL event\n");
>   		opal_elog_complete(elog_buf, true);
> +		elog_append_write_to_host(elog_buf);
>   		return 0;
>   	}
>
>   	/* We pass a large request size in to mkmsg so that we have a
>   	 * large enough allocation to reuse the message to pass the
> -	 * PEL data via a series of partial add commands.  */
> +	 * PEL data via a series of partial add commands.
> +	 */

Above change is not related to this patch.

>   	msg = ipmi_sel_alloc_msg(elog_buf);
>   	if (!msg) {
>   		opal_elog_complete(elog_buf, false);
> +		elog_append_write_to_host(elog_buf);
>   		return OPAL_RESOURCE;
>   	}
> -	msg->error = ipmi_elog_error;
>
> +	msg->error = ipmi_elog_error;

Above change is not related to this patch.


-Vasant



More information about the Skiboot mailing list