Skip to content

Commit

Permalink
Update SYS's ATTR_XSCOM_BASE_ADDRESS in SMF Paths
Browse files Browse the repository at this point in the history
The correct value of ATTR_XSCOM_BASE_ADDRESS was not being propagated
to HDAT when SMF is enabled. The problem is that the system target has
a copy of said attribute that needs to be updated with the SMF bit
(bit 15) to reflect the fact that XSCOM BAR is in SMF memory. The
attribute under the system target was not being updated accordingly
(only those attributes under proc targets were). This commit adds a
fix to update ATTR_XSCOM_BASE_ADDRESS under the system target in SMF
mode.

Change-Id: Icac5bb7023ac0ecc521a961681420bfc21a46eac
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/83057
Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Christian R Geddes <crgeddes@us.ibm.com>
  • Loading branch information
Ilya Smirnov authored and crgeddes committed Sep 3, 2019
1 parent c3d8cfd commit b9cb9f7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/usr/hdat/hdatmsvpd.C
Expand Up @@ -926,6 +926,8 @@ void HdatMsVpd::prt()
iv_mover.hdatMoverAddr.lo);
HDAT_INF(" hdatBSRAddr = 0X %08X %08X ", iv_mover.hdatBSRAddr.hi,
iv_mover.hdatBSRAddr.lo);
HDAT_INF(" hdatXSCOMAddr = 0X %08X %08X", iv_mover.hdatXSCOMAddr.hi,
iv_mover.hdatXSCOMAddr.lo);

HDAT_INF(" **hdatMsVpdImtAddrRange_t**");
hdatPrintHdrs(NULL, NULL, &iv_IMTaddrRngArrayHdr, NULL);
Expand Down
14 changes: 14 additions & 0 deletions src/usr/targeting/targetservicestart.C
Expand Up @@ -847,6 +847,10 @@ static void adjustMemoryMap( TargetService& i_targetService )
ATTR_LPC_BUS_ADDR_type l_lpcBase =
l_pTopLevel->getAttr<ATTR_LPC_BUS_ADDR>();

// Whether to update the SYS's ATTR_XSCOM_BASE_ADDRESS with a new
// BAR before returning from this function
bool l_updateSysXscomBar = false;

// Loop through all the procs to recompute all the BARs
// also find the victim to swap with
Target* l_swapVictim = nullptr;
Expand Down Expand Up @@ -874,11 +878,13 @@ static void adjustMemoryMap( TargetService& i_targetService )
if(l_curXscomBAR & IS_SMF_ADDR_BIT)
{
l_xscomBAR |= IS_SMF_ADDR_BIT;
l_updateSysXscomBar = true;
}

TARG_INF( " XSCOM=%.16llX", l_xscomBAR );
l_procChip->setAttr<ATTR_XSCOM_BASE_ADDRESS>(l_xscomBAR);


// See if this chip's space now belongs to the master
if( l_xscomBAR == l_curXscomBAR )
{
Expand Down Expand Up @@ -1073,6 +1079,14 @@ static void adjustMemoryMap( TargetService& i_targetService )
XSCOM::get_master_bar() );
TARG_ASSERT( false, "XSCOM BARs are inconsistent" );
}

if(l_updateSysXscomBar)
{
l_pTopLevel->setAttr<ATTR_XSCOM_BASE_ADDRESS>(
l_xscomBase |= IS_SMF_ADDR_BIT);
TARG_INF("Updating the SYS XSCOM BAR to 0x%.16llX",
l_xscomBase |= IS_SMF_ADDR_BIT);
}
}


Expand Down

0 comments on commit b9cb9f7

Please sign in to comment.