open-power / pdbg

PowerPC FSI Debugger
Apache License 2.0
17 stars 39 forks source link

Adding helper functions for switching of devtree backend in the same process #76

Closed Swarnendu-R-C closed 11 months ago

Swarnendu-R-C commented 11 months ago

Context: It is now required that the devtree backend in BMC systems should be able to switch in the same process on runtime e.g.; from KERNEL to SBEFIFO or vice-versa. This is to support running extract SBE RC hardware procedure. This commit introduces the necessary changes in order to achieve that.

Solution: It basically introduces few functions which will clear the pdbg_dt_root and its associated children subsequently if the pdbg_targets_init function is called more than once now (earlier it was not allowed to call pdbg_targets_init function twice in the same process)

Test-1: The switching of the backend in the same process was tested through a standalone application which runs in a loop for multiple times and each time it sets the intial backend to SBEFIFO first and then switched it to KERNEL. Trace log is attached along with the PR

Test-2: While booting BMC up injected a clock error during IPL in between istep0 to istep2 and call the SBR RC extract procedure to get the error code after switching the backend from SBEFIFO to KERNEL. Once the extraction is done switched back to SBEFIFO for further processing. Journal log is attached with the PR.

Signed-off-by: swarnendu.roy.chowdhury@ibm.com

TraceLog_KARNEL_First.txt TraceLog_SBEFIFO_First.txt

Test_run_screenshot_1 Test_run_screenshot_2