[Skiboot] [PATCH v2] Add BMC platform to enable correct OEM IPMI commands

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Nov 8 17:14:49 AEDT 2016


On 11/08/2016 10:45 AM, Stewart Smith wrote:
> An out of tree platform (p8dtu) uses a different IPMI OEM command
> for IPMI_PARTIAL_ADD_ESEL. This exposed some assumptions about the BMC
> implementation in our core code.
>
> Now, with platform.bmc, each platform can dictate (or detect) the BMC
> that is present. We allow it to be set at runtime rather than purely
> statically in struct platform as it's possible to have differing BMC
> implementations on the one machine (e.g. AMI BMC or OpenBMC).
>
> Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
> ---
> Changes in V2:
>   - just have the numbers in bmc_platform
>   - have generic BMC platform, so bmc_platform always exists
> ---


> diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c
> index 369cebc..b79959c 100644
> --- a/hw/ipmi/ipmi-sel.c
> +++ b/hw/ipmi/ipmi-sel.c
> @@ -334,6 +334,11 @@ static void ipmi_elog_poll(struct ipmi_msg *msg)
>   	struct errorlog *elog_buf = (struct errorlog *) msg->user_data;
>   	size_t req_size;
>
> +	if (bmc_platform->ipmi_oem_partial_add_esel == 0) {
> +		prlog(PR_WARNING, "BUG: Dropping ESEL on the floor due to buggy/mising code in OPAL for this BMC");

At this stage we haven't touched eSEL logging patch.. So its not buggy yet ;-)

I think in these cases we should just push logs to host. Mukesh's elog patchset 
adds that support anyway.


> @@ -462,8 +468,19 @@ static void sel_pnor(uint8_t access)
>   		if (granted)
>   			occ_pnor_set_owner(PNOR_OWNER_EXTERNAL);
>
> +		if (bmc_platform->ipmi_oem_pnor_access_status == 0) {

Here we endup setting flag and then erroring out. Better to add this check 
before entering switch case itself. That way host can continue to access PNOR?

-Vasant



More information about the Skiboot mailing list