[Skiboot] [RFC PATCH] opal/xstop: Use nvram param to enable/disable sw checkstop.

ppaidipe ppaidipe at linux.vnet.ibm.com
Fri Dec 15 18:23:47 AEDT 2017


On 2017-12-15 05:08, Oliver wrote:
> On Fri, Dec 15, 2017 at 4:15 AM, ppaidipe <ppaidipe at linux.vnet.ibm.com> 
> wrote:
>> Hi Mahesh
>> 
>> On 2017-12-14 21:06, Mahesh J Salgaonkar wrote:
>>> 
>>> From: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
>>> 
>>> Add a mechanism to enable/disable sw checkstop by looking at nvram 
>>> option
>>> opal-sw-xstop=<enable/disable>.
>>> 
>>> For now this patch disables the sw checkstop trigger unless 
>>> explicitly
>>> enabled through nvram option 'opal-sw-xstop=enable'. This will allow 
>>> an
>>> opportunity to get host kernel in panic path or xmon for 
>>> unrecoverable
>>> HMIs or MCE, to be able to debug the issue effectively.
>> 
>> 
>> It will be good to enable by default, and let's give control to user 
>> to
>> disable
>> the sw-xstop using nvram option. Otherwise all test infrastructures 
>> will
>> break.
> 
> Why does the test infrastructure require SW initiated checkstops?

I mean existing system test/RAS/Other FW FVT teams got issues related to 
SW checkstop
during running of tests. So it will be good, if we enable by default, we 
can at-least
won't miss any issues related SW checkstop until as long as we have 
given a way of
disabling it using nvram option.

> 
> 
>> 
>> Thanks
>> Pridhiviraj
>> 
>> 
>>> 
>>> To enable sw checkstop in opal issue following command:
>>> 
>>> # nvram -p ibm,skiboot --update-config opal-sw-xstop=enable
>>> 
>>> NOTE: This is a workaround patch to disable sw checkstop by default 
>>> to
>>> gain
>>> control in host kernel for better checkstop debugging. Once we have 
>>> most
>>> of
>>> the checkstop issues stabilized/resolved, revisit this patch to 
>>> enable sw
>>> checkstop by default.
>>> 
>>> Signed-off-by: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
>>> ---
>>>  hw/xscom.c |   13 +++++++++++++
>>>  1 file changed, 13 insertions(+)
>>> 
>>> diff --git a/hw/xscom.c b/hw/xscom.c
>>> index de5a27e..4d3d88f 100644
>>> --- a/hw/xscom.c
>>> +++ b/hw/xscom.c
>>> @@ -24,6 +24,7 @@
>>>  #include <errorlog.h>
>>>  #include <opal-api.h>
>>>  #include <timebase.h>
>>> +#include <nvram.h>
>>> 
>>>  /* Mask of bits to clear in HMER before an access */
>>>  #define HMER_CLR_MASK  (~(SPR_HMER_XSCOM_FAIL | \
>>> @@ -827,6 +828,18 @@ int64_t xscom_trigger_xstop(void)
>>>  {
>>>         int rc = OPAL_UNSUPPORTED;
>>> 
>>> +       /*
>>> +        * Workaround until we iron out all checkstop issues at 
>>> present.
>>> +        *
>>> +        * By deafult do not trigger sw checkstop unless explicitly
>>> enabled
>>> +        * through nvram option 'opal-sw-xstop=enable'.
>>> +        *
>>> +        * NOTE: Once all checkstop issues are resolved/stabilized 
>>> reverse
>>> +        * the logic to enable sw checkstop by default.
>>> +        */
>>> +       if (!nvram_query_eq("opal-sw-xstop", "enable"))
>>> +               return rc;
>>> +
>>>         if (xstop_xscom.addr)
>>>                 rc = xscom_writeme(xstop_xscom.addr,
>>>                                 PPC_BIT(xstop_xscom.fir_bit));
>>> 
>>> _______________________________________________
>>> Skiboot mailing list
>>> Skiboot at lists.ozlabs.org
>>> https://lists.ozlabs.org/listinfo/skiboot
>> 
>> 
>> _______________________________________________
>> Skiboot mailing list
>> Skiboot at lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/skiboot



More information about the Skiboot mailing list