open-power / hostboot

System initialization firmware for Power systems
Apache License 2.0
75 stars 97 forks source link

Where is the variable "iv_occsStarted" set to true during the runtime for P10 opal? #243

Closed Theo0208 closed 5 months ago

Theo0208 commented 6 months ago

The “processOccError” function in Hostboot for P10 needs to ensure that "iv_occsStarted" is true before continuing to handle OCC errors, but the iv_occsStarted is false during runtime. It seems that only phyp can set iv_occsStarted to true during runtime, so I want to konw where the variable iv_occsStarted is set to true during runtime for P10 opal.Thanks a lot.

cjcain commented 6 months ago

There were cases where the external HBRT interfaces were called when the OCCs were not started or were reset, so this variable was added to not attempt talking to the OCCs prior to them being loaded/started. This prevents errors from being logged (missing OCC master, errors trying to collect data, etc)

The key would be to call the following function with the completion status (true == started, false == failed), similar to what the PHYP path does in RTPM::load_and_start_pm_complex()

            HTMGT::processOccStartStatus(true, // i_startCompleted
                                         nullptr); // failed proc
Theo0208 commented 6 months ago

Excuse me, could I understand it this way: Because PHYP system will not load and start PMC in the "call_host_runtime_setup" function during IPL, PMC can only be loaded and started by calling "load_start_pm_complex" through "callSetupPMCLoadStartCallback" in the "rt_start" function during runtime. But OPAL system will call "loadAndStartPMAll" and "processOccStartStatus" in the "call_host_runtime_setup" function during IPL, so for OPAL, it is unnecessary and will not to call "load_and_start_pm_complex" and "processOccStartStatus" function again during runtime, and this is the reason why the variable iv_occsStarted is false for P10 OPAL.

cjcain commented 6 months ago

I am not sure if that last comment had a question or was just a statement. As I said, that HTMGT::processOccStartStatus() function is what sets the iv_occsStarted flag.

You do not need to call the load_and_start_pm_complex() function. You can add a direct call to HTMGT::processOccStartStatus() (similar to what was done in load_and_start_pm_complex)

Theo0208 commented 5 months ago

Okay,thanks.