Skip to content

Commit

Permalink
STOP: Move Stop 8 code from CME to SGPE for CME space savings
Browse files Browse the repository at this point in the history
Change-Id: I98d46b4bd4e5271da867e511f91de9accc908929
Original-Change-Id: I8ef3a2bb61d562462a7594275ea219597d7e519c
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40667
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Juan R. Medina <jrmedina@us.ibm.com>
Reviewed-by: Brian T. Vanderpool <vanderp@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
  • Loading branch information
davidduyue authored and op-jenkins committed Aug 22, 2018
1 parent a7817cd commit e1b9fa3
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,9 @@ p9_cme_stop_entry()
PK_TRACE("+++++ +++++ STOP LEVEL 5-7 ENTRY +++++ +++++");
//----------------------------------------------------------------------

// NDD1 workaround to save cme image size
#if NIMBUS_DD_LEVEL != 1

if ((G_cme_stop_record.req_level[0] >= STOP_LEVEL_8) &&
(G_cme_stop_record.req_level[1] >= STOP_LEVEL_8))
{
Expand Down Expand Up @@ -1229,6 +1232,8 @@ p9_cme_stop_entry()
}
}

#endif

//=============================
MARK_TAG(SE_SGPE_HANDOFF, core)
//=============================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,54 @@ p9_sgpe_stop_entry()
scom_data.value);
}

// NDD1 workaround to save cme image size
#if NIMBUS_DD_LEVEL == 1

PK_TRACE("Assert L2+NCU purge and NCU tlbie quiesce via SICR[18,21,22]");
// insert tlbie quiesce before ncu purge to avoid window condition
// of ncu traffic still happening when purging starts
// Note: chtm purge and drop tlbie quiesce will be done in SGPE

if (ex & FST_EX_IN_QUAD)
{
GPE_PUTSCOM(GPE_SCOM_ADDR_CME(CME_SCOM_SICR_OR, qloop, 0), (BIT64(18) | BIT64(21)));
GPE_PUTSCOM(GPE_SCOM_ADDR_CME(CME_SCOM_SICR_OR, qloop, 0), BIT64(22));
}

if (ex & SND_EX_IN_QUAD)
{
GPE_PUTSCOM(GPE_SCOM_ADDR_CME(CME_SCOM_SICR_OR, qloop, 1), (BIT64(18) | BIT64(21)));
GPE_PUTSCOM(GPE_SCOM_ADDR_CME(CME_SCOM_SICR_OR, qloop, 1), BIT64(22));
}

PK_TRACE("Poll for purged done via EISR[22,23] then Drop L2+NCU purges via SICR[18,22]");

if (ex & FST_EX_IN_QUAD)
{
do
{
GPE_GETSCOM(GPE_SCOM_ADDR_CME(CME_SCOM_EISR, qloop, 0), scom_data.value);
}
while((scom_data.words.upper & BITS32(22, 2)) != BITS32(22, 2));

GPE_PUTSCOM(GPE_SCOM_ADDR_CME(CME_SCOM_SICR_CLR, qloop, 0), (BIT64(18) | BIT64(22)));
}

if (ex & SND_EX_IN_QUAD)
{
do
{
GPE_GETSCOM(GPE_SCOM_ADDR_CME(CME_SCOM_EISR, qloop, 1), scom_data.value);
}
while((scom_data.words.upper & BITS32(22, 2)) != BITS32(22, 2));

GPE_PUTSCOM(GPE_SCOM_ADDR_CME(CME_SCOM_SICR_CLR, qloop, 1), (BIT64(18) | BIT64(22)));
}

PK_TRACE_INF("NDD1: L2 and NCU Purged by SGPE");

#endif

//====================================================
MARK_TAG(SE_STOP_L2_CLKS, ((ex << 6) | (32 >> qloop)))
//====================================================
Expand All @@ -359,7 +407,7 @@ p9_sgpe_stop_entry()
PPE_WAIT_CORE_CYCLES(256)

PK_TRACE("Assert partial bad L2/L3 and stopping/stoped l2 pscom masks via RING_FENCE_MASK_LATCH");
scom_data.words.lower = 0;
scom_data.value = 0;

if (!(G_sgpe_stop_record.group.ex_l[VECTOR_CONFIG] & BIT32(qloop)))
{
Expand Down

0 comments on commit e1b9fa3

Please sign in to comment.