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 #69

Closed Swarnendu-R-C closed 1 year ago

Swarnendu-R-C commented 1 year ago

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

Context: It is now required that the 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 two (internal only) 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: The switching of the backend in the same process was tested
through a standalone application which runs in a loop for 2 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

TraceLog.txt

Swarnendu-R-C commented 1 year ago

Comments about the commit message: Replace "backend of BMC system" with "devtree backend in BMC systems" typo - replace KARNEL with KERNEL Replace "get SBESRC extract" with "support running extract SBE RC hardware procedure"

Updated

dhruvibm commented 1 year ago

Looks good

aravynd commented 1 year ago

jenkins run tests please

jinuthomas commented 1 year ago

jenkins run tests please