summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2017-02-22 07:53:45 +1100
committerAlistair Popple <alistair@popple.id.au>2017-02-22 07:53:45 +1100
commitbcdad17c283f2242700a01625e20bfe98bca2c2e (patch)
tree4c4b2d5f38207cc306e34201b1e0c9e723d31f06 /src
parent7a2bc0adbf0f618cded2324b0d737bc562067ba5 (diff)
downloadpdbg-bcdad17c283f2242700a01625e20bfe98bca2c2e.tar.gz
pdbg-bcdad17c283f2242700a01625e20bfe98bca2c2e.zip
src/main.c: Fix kernel cfam processor selection
The openfsi backend was adding cfams regardless of the selected processor (-p0, -p1, etc.). This resulted in reading/writing all the cfam registers when doing a get/putcfam. Signed-off-by: Alistair Popple <alistair@popple.id.au>
Diffstat (limited to 'src')
-rw-r--r--src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 2ed4536..9fcd6bc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -386,13 +386,15 @@ static int kernel_backend_targets_init(void)
exit(1);
/* The backend is directly connected to a processor CFAM */
- target_class_add(&cfams, &targets[0], 0);
+ if (processor[0])
+ target_class_add(&cfams, &targets[0], 0);
cfam_count = 1;
/* Probe cascaded CFAMs on hMFSI ports */
cfam_count += hmfsi_target_probe(&targets[0], &targets[1], MAX_TARGETS);
for (i = 1; i < cfam_count; i++)
- target_class_add(&cfams, &targets[i], i);
+ if (processor[i])
+ target_class_add(&cfams, &targets[i], i);
/* Add a FSI2PIB bridges for each CFAM */
i = 0;
OpenPOWER on IntegriCloud