Skip to content

Commit bd92fe0

Browse files
davidduyueop-jenkins
authored andcommitted
CME: Perform SMF Self Save After RAM Psscr.PLS in STOP Entry
Change-Id: I38d6b03c2a44def6aed080722a77e08892d35efb CQ:SW474026 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/85053 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Gregory S Still <stillgs@us.ibm.com> Reviewed-by: Christopher R Jones <crjones@us.ibm.com> Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
1 parent cf7d20a commit bd92fe0

File tree

1 file changed

+61
-61
lines changed

1 file changed

+61
-61
lines changed

import/chips/p9/procedures/ppe_closed/cme/stop_cme/p9_cme_stop_entry.c

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -585,67 +585,6 @@ p9_cme_stop_entry()
585585

586586
#endif
587587

588-
#if SMF_SUPPORT_ENABLE
589-
590-
if (G_cme_stop_record.req_level[0] >= STOP_LEVEL_4)
591-
{
592-
self_save_core |= CME_MASK_C0;
593-
}
594-
595-
if (G_cme_stop_record.req_level[1] >= STOP_LEVEL_4)
596-
{
597-
self_save_core |= CME_MASK_C1;
598-
}
599-
600-
self_save_core = self_save_core & core;
601-
602-
if ( self_save_core )
603-
{
604-
605-
p9_cme_stop_self_execute(self_save_core, SPR_SELF_SAVE);
606-
607-
PK_TRACE("Poll for core stop again(pm_active=1)");
608-
609-
while((~(in32(G_CME_LCL_EINR))) & (self_save_core << SHIFT32(21)))
610-
{
611-
core_spattn = (in32_sh(CME_LCL_SISR) >> SHIFT64SH(33)) & self_save_core;
612-
613-
if (core_spattn)
614-
{
615-
PK_TRACE_ERR("ERROR: Core[%d] Special Attention Detected. Gard Core!", core_spattn);
616-
CME_STOP_CORE_ERROR_HANDLER(self_save_core, core_spattn, CME_STOP_EXIT_SELF_RES_SPATTN);
617-
618-
PK_TRACE("Release PCB Mux back on Core via SICR[10/11]");
619-
out32(G_CME_LCL_SICR_CLR, core_spattn << SHIFT32(11));
620-
621-
while((core_spattn & ~(in32(G_CME_LCL_SISR) >> SHIFT32(11))) != core_spattn);
622-
623-
PK_TRACE("PCB Mux Released on Core[%d]", core_spattn);
624-
}
625-
626-
if (!self_save_core)
627-
{
628-
629-
#if NIMBUS_DD_LEVEL == 20 || DISABLE_CME_DUAL_CAST == 1
630-
631-
continue;
632-
633-
#else
634-
635-
return;
636-
637-
#endif
638-
639-
}
640-
}
641-
642-
PK_TRACE("SF.RS: Self Save Completed, Core Stopped Again(pm_exit=0/pm_active=1)");
643-
644-
p9_cme_stop_self_cleanup(self_save_core);
645-
646-
}// if self_save_core
647-
648-
#endif
649588
// ---------------------------------
650589
// Permanent workaround for HW407385
651590

@@ -883,6 +822,67 @@ p9_cme_stop_entry()
883822

884823
#endif
885824

825+
#if SMF_SUPPORT_ENABLE
826+
827+
if (G_cme_stop_record.req_level[0] >= STOP_LEVEL_4)
828+
{
829+
self_save_core |= CME_MASK_C0;
830+
}
831+
832+
if (G_cme_stop_record.req_level[1] >= STOP_LEVEL_4)
833+
{
834+
self_save_core |= CME_MASK_C1;
835+
}
836+
837+
self_save_core = self_save_core & core;
838+
839+
if ( self_save_core )
840+
{
841+
842+
p9_cme_stop_self_execute(self_save_core, SPR_SELF_SAVE);
843+
844+
PK_TRACE("Poll for core stop again(pm_active=1)");
845+
846+
while((~(in32(G_CME_LCL_EINR))) & (self_save_core << SHIFT32(21)))
847+
{
848+
core_spattn = (in32_sh(CME_LCL_SISR) >> SHIFT64SH(33)) & self_save_core;
849+
850+
if (core_spattn)
851+
{
852+
PK_TRACE_ERR("ERROR: Core[%d] Special Attention Detected. Gard Core!", core_spattn);
853+
CME_STOP_CORE_ERROR_HANDLER(self_save_core, core_spattn, CME_STOP_EXIT_SELF_RES_SPATTN);
854+
855+
PK_TRACE("Release PCB Mux back on Core via SICR[10/11]");
856+
out32(G_CME_LCL_SICR_CLR, core_spattn << SHIFT32(11));
857+
858+
while((core_spattn & ~(in32(G_CME_LCL_SISR) >> SHIFT32(11))) != core_spattn);
859+
860+
PK_TRACE("PCB Mux Released on Core[%d]", core_spattn);
861+
}
862+
863+
if (!self_save_core)
864+
{
865+
866+
#if NIMBUS_DD_LEVEL == 20 || DISABLE_CME_DUAL_CAST == 1
867+
868+
continue;
869+
870+
#else
871+
872+
return;
873+
874+
#endif
875+
876+
}
877+
}
878+
879+
PK_TRACE("SF.RS: Self Save Completed, Core Stopped Again(pm_exit=0/pm_active=1)");
880+
881+
p9_cme_stop_self_cleanup(self_save_core);
882+
883+
}// if self_save_core
884+
885+
#endif
886886

887887

888888
// ====================================

0 commit comments

Comments
 (0)