From 03db83368dbc1f49e717be441a313bce2c962c0f Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Tue, 7 Jan 2020 16:40:33 -0600 Subject: Handle automatic interleaving between OMI sub-channels The memory channel is defined as a single MCC, and all of the memory on that channel is part of a single address space. That means that both OCMBs on the same MCC share an address space. While this isn't the same mechanism as true interleaving, it looks the same to the code consuming HDAT, so we need to set the sharing flags appropriately. Change-Id: Ic270582ced92614cf21ff7be0ef6f97c93ab2514 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/89340 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Jayashankar Padath Reviewed-by: Christian R Geddes Reviewed-by: Daniel M Crowell --- src/usr/hdat/hdatmsvpd.C | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/usr/hdat/hdatmsvpd.C b/src/usr/hdat/hdatmsvpd.C index 2a7ba42e1..5b67903f7 100755 --- a/src/usr/hdat/hdatmsvpd.C +++ b/src/usr/hdat/hdatmsvpd.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2019 */ +/* Contributors Listed Below - COPYRIGHT 2016,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -1719,11 +1719,6 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count) TARGETING::ATTR_MSS_MEM_MC_IN_GROUP_type l_mccSharingCount = {0}; - //Group ID for each group, group id will be assigned only - //if the group is shared - TARGETING::ATTR_MSS_MEM_MC_IN_GROUP_type l_mccSharingGrpIds - = {0}; - //Size configured under each group TARGETING::ATTR_PROC_MEM_SIZES_type l_procMemSizesBytes = {0}; @@ -1764,16 +1759,6 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count) if(l_procMemSizesBytes[l_mccInGrp] > 0) { l_mccSharingCount[l_mccInGrp]++; - - //Assign sharing group id only if shared - //And only when first instance of sharing is found - if(l_mccSharingCount[l_mccInGrp] == - HDAT_MIN_NUM_FOR_SHARING) - { - l_mccSharingGrpIds[l_mccInGrp] = - l_nxtSharingGroupId; - l_nxtSharingGroupId++; - } } } @@ -1984,7 +1969,22 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count) { l_memStatus = HDAT_MEM_SHARED; setMsAreaInterleavedId(l_index, - l_mccSharingGrpIds[l_mccInGrp]); + l_mccInGrp); + } + //The memory channel is defined as a single + // MCC, and all of the memory on that + // channel is part of a single address + // space. That means that both OCMBs on + // the same MCC share an address space. + // While this isn't the same mechanism as + // true interleaving, it looks the same to + // the code consuming HDAT, so we need to + // set the sharing flags appropriately. + else if( l_omiList.size() > 1 ) + { + l_memStatus = HDAT_MEM_SHARED; + setMsAreaInterleavedId(l_index, + l_mccInGrp); } setMsAreaType(l_index,l_parentType); -- cgit v1.2.1