[Skiboot] [PATCH] hw/imc: Fix the pvr (sub_id) for IMC Catalog load

Madhavan Srinivasan maddy at linux.vnet.ibm.com
Mon Oct 16 19:27:58 AEDT 2017


Currently IMC catalog carry multiple dtbs in the pnor
partition, one for each power9 major versions. And system
pvr value (pvr_type and pvr_major version) is used as
sub-id to load the right dtb from the partition. Since
minor version of pvr is not used, mask it out.

Reported-by: Shriya <shriyak at linux.vnet.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
---
 hw/imc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/imc.c b/hw/imc.c
index 10505f69d4bd..187fb9beb711 100644
--- a/hw/imc.c
+++ b/hw/imc.c
@@ -369,7 +369,7 @@ static void disable_unavailable_units(struct dt_node *dev)
  */
 void imc_catalog_preload(void)
 {
-	uint32_t pvr = (mfspr(SPR_PVR) & ~(0xf000));
+	uint32_t pvr = (mfspr(SPR_PVR) & ~(0xf0ff));
 	int ret = OPAL_SUCCESS;
 	compress_buf_size = MAX_COMPRESSED_IMC_DTB_SIZE;
 
@@ -455,7 +455,7 @@ static void imc_dt_update_nest_node(struct dt_node *dev)
 void imc_init(void)
 {
 	void *decompress_buf = NULL;
-	uint32_t pvr = (mfspr(SPR_PVR) & ~(0xf000));
+	uint32_t pvr = (mfspr(SPR_PVR) & ~(0xf0ff));
 	struct dt_node *dev;
 	int ret;
 
-- 
2.7.4



More information about the Skiboot mailing list