From f79d885bb0fa77d868ded402e2011bd24b1987d3 Mon Sep 17 00:00:00 2001 From: Prasad Bg Ranganath Date: Thu, 14 Nov 2019 01:34:23 -0600 Subject: [PATCH] OCC firinit: Bug fix in reset path - In reset path.. we enable OCC HB notify because when occ halts. the interrupt should be send to PGPE. But in this path we are overwriting the existing action register values. Change-Id: I8825d0b237be99147afa2d477e4ac342571e9a4f CQ:SW476322 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/86994 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Gregory S Still Reviewed-by: Daniel M Crowell Reviewed-by: Jennifer A Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/86996 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW --- .../chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C index 53eaf1b8586..4dacd5a7328 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* Contributors Listed Below - COPYRIGHT 2015,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -202,11 +202,15 @@ fapi2::ReturnCode pm_occ_fir_reset( i_target, firinit_done_flag), "ERROR: Failed to fetch the entry status of FIRINIT"); + // Here we need to read all the OCC fir registers (action0/1,mask,fir) + // and will be stored in the respective class variable. So that below when + // we call put function it will be read modify write. + FAPI_TRY(l_occFir.get(p9pmFIR::REG_ALL), + "ERROR: Failed to get the OCC FIR/MASK/ACTION0/ACTION1 value"); + if (firinit_done_flag == fapi2::ENUM_ATTR_PM_FIRINIT_DONE_ONCE_FLAG_FIRS_INITED) { - FAPI_TRY(l_occFir.get(p9pmFIR::REG_FIRMASK), - "ERROR: Failed to get the OCC FIR MASK value"); /* Fetch the OCC FIR MASK; Save it to HWP attribute; clear its contents */ FAPI_TRY(l_occFir.saveMask(),