Skip to content

Commit

Permalink
Enable SMF tests for Axone
Browse files Browse the repository at this point in the history
Need to take multiple chips into account when computing
the values to compare with.

Change-Id: Ie423b2afec126f6e69590584631da9b6d6657a84
RTC: 206800
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/83560
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Ilya Smirnov <ismirno@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: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com>
  • Loading branch information
dcrowell77 authored and Nicholas E Bofferding committed Sep 19, 2019
1 parent b0cd81c commit 5f27f36
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/makefile
Expand Up @@ -262,8 +262,7 @@ TESTCASE_MODULES += $(if $(CONFIG_VPO_COMPILE),,testruntime)
TESTCASE_MODULES += testintr
TESTCASE_MODULES += testfapi2
TESTCASE_MODULES += $(if $(CONFIG_EARLY_TESTCASES) && $(FSP_BUILD) ,,testnvram)
#TODO RTC: 206800 Investigate why SMF tests fail in Axone
TESTCASE_MODULES += $(if $(CONFIG_AXONE_BRING_UP),,testsmf)
TESTCASE_MODULES += testsmf
TESTCASE_MODULES += testexpaccess
TESTCASE_MODULES += testexpupd
TESTCASE_MODULES += testmmio
Expand Down
21 changes: 16 additions & 5 deletions src/usr/secureboot/smf/test/testsmf.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2018 */
/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -29,6 +29,7 @@
#include <errl/errlmanager.H>
#include <targeting/common/target.H>
#include <targeting/common/targetservice.H>
#include <targeting/common/utilFilter.H>
#include <hbotcompid.H>
#include <secureboot/smf.H>
#include <secureboot/secure_reasoncodes.H>
Expand Down Expand Up @@ -346,9 +347,14 @@ public:
break;
}

if(l_smfBarSize != DISTRIBUTE_EXACT_SMF_AMT)
// Memory is distributed across processors so need to divide the
// expected results by the number of processors
TARGETING::TargetHandleList l_procList;
TARGETING::getAllChips(l_procList, TARGETING::TYPE_PROC, true);

if(l_smfBarSize != (DISTRIBUTE_EXACT_SMF_AMT/l_procList.size()))
{
TS_FAIL("testDistributeExactAmt: Unexpected amount of memory allocated. Expected: 0x%x, actual 0x%x", DISTRIBUTE_EXACT_SMF_AMT, l_smfBarSize);
TS_FAIL("testDistributeExactAmt: Unexpected amount of memory allocated. Expected: 0x%x, actual 0x%x", (DISTRIBUTE_EXACT_SMF_AMT/l_procList.size()), l_smfBarSize);
}
} while(0);

Expand Down Expand Up @@ -400,9 +406,14 @@ public:
break;
}

if(l_smfBarSize != DISTRIBUTE_EXACT_SMF_AMT)
// Memory is distributed across processors so need to divide the
// expected results by the number of processors
TARGETING::TargetHandleList l_procList;
TARGETING::getAllChips(l_procList, TARGETING::TYPE_PROC, true);

if(l_smfBarSize != (DISTRIBUTE_EXACT_SMF_AMT/l_procList.size()))
{
TS_FAIL("testDistributeNotExactAmt: Unexpected amount of memory allocated. Expected: 0x%x, actual 0x%x", DISTRIBUTE_EXACT_SMF_AMT, l_smfBarSize);
TS_FAIL("testDistributeNotExactAmt: Unexpected amount of memory allocated. Expected: 0x%x, actual 0x%x", (DISTRIBUTE_EXACT_SMF_AMT/l_procList.size()), l_smfBarSize);
}
} while(0);

Expand Down

0 comments on commit 5f27f36

Please sign in to comment.