[Skiboot] [PATCH] IPMI: Trigger attention in abort path.

Mahesh J Salgaonkar mahesh at linux.vnet.ibm.com
Thu Oct 24 16:23:19 AEDT 2019


On 2019-10-24 15:48:38 Thu, Oliver O'Halloran wrote:
> On Thu, Oct 24, 2019 at 3:21 AM Mahesh Salgaonkar
> <mahesh at linux.vnet.ibm.com> wrote:
> >
> > OpenBMC is capable of catching attn instruction as TI and facilitate in
> > rebooting (IPL-ing) host while keeping a reboot counter. This functionality
> > was not present with other BMCs e.g. SMC and AMI. And hence OPAL never used
> > to trigger an attn during abort/assert path for BMC based system. Instead
> > it always triggered normal reboot during abort. This means that BMC never
> > gets notified about OPAL termination/reboot. This sometimes leads into
> > never ending IPL-ing loop if OPAL keeps aborting very early in boot path.
> > This can be avoided on OpenBMC system that supports handling of TI (attn
> > instruction).
> 
> What versions of openbmc support the feature? I'm going to assume that
> it's not all of them.

I am not sure. Let me check with BMC folks on this.

> > +        * if BMC has attn support then let BMC know that we are terminating by
> > +        * triggering attn so that BMC will decide whether to reboot/IPL or not
> > +        * depending on AutoReboot policy.  This helps in cases where OPAL is
> > +        * crashing/terminating before host reaches to runtime. With BMC
> > +        * AutoReboot policy, in such cases, it will make sure that system is
> > +        * moved to Quiesced state after 3 or so attempts to IPL. Without
> > +        * `attn` call BMC will never know that OPAL is terminating and system
> > +        * would go into never ending IPL'ing loop.
> > +        *
> > +        * When BMC moves the system into Quiesced state, it does not make sure
> > +        * that all CPU threads are also quiesced. Hence, make sure to move all
> > +        * secondaries into quiesced state before calling attn.
> > +        *
> > +        * Once the system reaches to runtime BMC resets the boot counter.
> > +        * Hence next time when BMC receieves the attn it will IPL the system
> > +        * if AutoReboot is enabled. We don't need to worry about self
> > +        * rebooting
> > +        */
> > +
> > +       if (platform.bmc->sw->attn_supported) {
> > +               /* Put everybody in stop/quiesce except myself. */
> > +               sreset_all_prepare();
> > +               trigger_attn();
> > +               for (;;) ;
> 
> Make it an msleep for a second or two and fall back to
> platform.cec_reboot(). We shouldn't be assuming the BMC will handle
> the attn.

As soon as we call attn this thread goes into quiesce mode. OPAL looses
control. We have not other option then relying on BMC after the attn
call. Even if we put msleep + reboot that code isn't going to get executed.

Thanks,
-Mahesh.



More information about the Skiboot mailing list