Skip to content

Commit

Permalink
chip: Add support for discovering chips on mambo
Browse files Browse the repository at this point in the history
Currently the only way for skiboot to discover chips is by looking for xscom
nodes. But on mambo it's currently not possible to create multiple xscom nodes,
which means we can only simulate a single chip system.

However it seems we can fairly cleanly add support for a special mambo chip
node, and use that to instantiate multiple chips.

Add a check in init_chip() that we're not clobbering an already initialised
chip, now that we have two places that initialise chips.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
mpe authored and stewartsmith committed Jun 14, 2017
1 parent cbccfaf commit 8f997dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/chip.c
Expand Up @@ -78,6 +78,7 @@ static void init_chip(struct dt_node *dn)

id = dt_get_chip_id(dn);
assert(id < MAX_CHIPS);
assert(chips[id] == NULL);

chip = zalloc(sizeof(struct proc_chip));
assert(chip);
Expand Down Expand Up @@ -108,7 +109,11 @@ void init_chips(void)
| QUIRK_NO_F000F | QUIRK_NO_PBA | QUIRK_NO_OCC_IRQ
| QUIRK_NO_DIRECT_CTL | QUIRK_NO_RNG;
prlog(PR_NOTICE, "CHIP: Detected Mambo simulator\n");

dt_for_each_compatible(dt_root, xn, "ibm,mambo-chip")
init_chip(xn);
}

/* Detect simics */
if (dt_find_by_path(dt_root, "/simics")) {
proc_chip_quirks |= QUIRK_SIMICS
Expand Down

0 comments on commit 8f997dc

Please sign in to comment.