[Skiboot] [RFC 1/2] hw/phb3: add OPAL call to get current PHB CAPI state

Stewart Smith stewart at linux.vnet.ibm.com
Tue Sep 27 17:44:28 AEST 2016


Andrew Donnellan <andrew.donnellan at au1.ibm.com> writes:

> Add an OPAL call, OPAL_PCI_GET_PHB_CAPI_MODE, to find out whether a PHB is
> currently in CAPI mode or not.
>
> This will be used by Linux to determine whether a PHB needs a complete
> reset to disable CAPI mode post-kexec.

pre-kexec would be better, right? That way it's the BOOTKERNEL that is
responsible for fixing up the world to the expected state.

Seeing as in the kernel we do:

static void pnv_shutdown(void)
{
        /* Let the PCI code clear up IODA tables */
        pnv_pci_shutdown();

        /*
         * Stop OPAL activity: Unregister all OPAL interrupts so they
         * don't fire up while we kexec and make sure all potentially
         * DMA'ing ops are complete (such as dump retrieval).
         */
        opal_shutdown();
}

where opal_shutdown() is calling OPAL_SYNC_HOST_REBOOT, is doing the
reset in there feasible? That way it could "just work" with existing
kernels. I haven't looked too closely at the kernel code though... but
it *looks* like it might not checkstop :)

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list