aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-04-29 20:13:20 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-04-30 11:57:24 +1000
commita1cfaaccecf0643375a30954629166e428c05f2f (patch)
tree164217359513c91c0f7d18ad9c419c3eb8a1e038 /hw
parentd784330d9a1e0089eb8764c13f38b6174401c89f (diff)
downloadskiboot-a1cfaaccecf0643375a30954629166e428c05f2f.zip
skiboot-a1cfaaccecf0643375a30954629166e428c05f2f.tar.gz
skiboot-a1cfaaccecf0643375a30954629166e428c05f2f.tar.bz2
chip: Fix chip name display for Naples
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/xscom.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/xscom.c b/hw/xscom.c
index 6bd71a3..4815ce1 100644
--- a/hw/xscom.c
+++ b/hw/xscom.c
@@ -504,7 +504,7 @@ void xscom_init(void)
struct proc_chip *chip;
const char *chip_name;
static const char *chip_names[] = {
- "UNKNOWN", "P7", "P7+", "P8E", "P8",
+ "UNKNOWN", "P7", "P7+", "P8E", "P8", "P8NVL",
};
chip = get_chip(gcid);
@@ -521,8 +521,11 @@ void xscom_init(void)
/* Grab processor type and EC level */
xscom_init_chip_info(chip);
- chip_name = chip->type > PROC_CHIP_P8_VENICE ? "INVALID" :
- chip_names[chip->type];
+ if (chip->type >= ARRAY_SIZE(chip_names))
+ chip_name = "INVALID";
+ else
+ chip_name = chip_names[chip->type];
+
printf("XSCOM: chip 0x%x at 0x%llx [%s DD%x.%x]\n",
gcid, chip->xscom_base,
chip_name,