Skip to content

Commit

Permalink
Test runtime scom support in Axone
Browse files Browse the repository at this point in the history
Needed to disable i2c explorer command tests during
runtime.  Currently just support mmio operations for runtime.

Change-Id: Ifd2888b1deb03b76408b03516a9dd030896e1ee1
RTC:210321
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80236
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R Geddes <crgeddes@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-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>
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
  • Loading branch information
mderkse1 authored and dcrowell77 committed Aug 20, 2019
1 parent a950157 commit 052182c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/makefile
Expand Up @@ -350,7 +350,7 @@ RUNTIME_TESTCASE_MODULES += testtargeting_rt
RUNTIME_TESTCASE_MODULES += testsbeio_rt
RUNTIME_TESTCASE_MODULES += testpm_rt
RUNTIME_TESTCASE_MODULES += testrsvdtracebuf_rt
# RUNTIME_TESTCASE_MODULES += testexpaccess_rt
RUNTIME_TESTCASE_MODULES += testexpaccess_rt

RELOCATABLE_IMAGE_LDFLAGS = -pie --export-dynamic

Expand Down
5 changes: 3 additions & 2 deletions src/usr/cxxtest/TestSuite.C
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -115,10 +115,11 @@ void doFailTest( )

void doFailTest( const char *filename, uint32_t linenum )
{
TRACDCOMP( g_trac_test,
TRACFCOMP( g_trac_test,
"!!! > Test %s Failed at line %d ",
filename,
linenum );

if(g_FailedTests < CXXTEST_FAIL_LIST_SIZE)
{
memcpy(g_FailedTestList[g_FailedTests].failTestFile,
Expand Down
2 changes: 1 addition & 1 deletion src/usr/expaccess/expaccess.mk
Expand Up @@ -33,7 +33,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2

VPATH += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/inband/

# Need to build exp_indband to use EKB's getMMIO/putMMIO/getCMD/getRSP
# Need to build exp_inband to use EKB's getMMIO/putMMIO/getCMD/getRSP
OBJS += exp_inband.o
OBJS += expscom_trace.o
OBJS += expscom_utils.o
Expand Down
3 changes: 0 additions & 3 deletions src/usr/expaccess/runtime/test/makefile
Expand Up @@ -30,9 +30,6 @@ MODULE = testexpaccess_rt

include ../../test/test.mk

#TODO RTC:196806 re-enable mmio communication tests when mmio works
TESTS = ../../test/expscomtest.H

include ${ROOTPATH}/config.mk


13 changes: 10 additions & 3 deletions src/usr/expaccess/test/expscomtest.H
Expand Up @@ -42,8 +42,8 @@
#include <fapi2/hw_access.H>
#include <lib/shared/exp_consts.H>
#include "exptest_utils.H"
#include "../expscom_trace.H"

extern trace_desc_t* g_trac_expscom;

using namespace TARGETING;
using namespace ERRORLOG;
Expand Down Expand Up @@ -120,6 +120,8 @@ public:
*/
void testExpscomI2c(void)
{
// Only MMIO supported at runtime
#ifndef __HOSTBOOT_RUNTIME
TRACFCOMP( g_trac_expscom, ">> Enter testExpscomI2c");
// Keep trace of pass/fails
uint32_t l_tests = 0;
Expand Down Expand Up @@ -272,8 +274,8 @@ public:
// << atomic section
mutex_unlock(iv_serializeTestMutex);
}while(0);

TRACFCOMP( g_trac_expscom, "<< Exit testExpscomI2c");
#endif
return;
}

Expand All @@ -282,6 +284,8 @@ public:
*/
void testExpscomI2cPlatform(void)
{
// Only mmio supported at runtime
#ifndef __HOSTBOOT_RUNTIME
TRACFCOMP( g_trac_expscom, ">> Enter testExpscomI2cPlatform");
// Keep trace of pass/fails
uint32_t l_tests = 0;
Expand Down Expand Up @@ -434,6 +438,7 @@ public:
}while(0);

TRACFCOMP( g_trac_expscom, "<< Exit testExpscomI2cPlatform");
#endif
return;
}

Expand Down Expand Up @@ -620,6 +625,8 @@ public:
*/
void testExpscomCombined(void)
{
// Only MMIO scoms supported at runtime, i2c not supported
#ifndef __HOSTBOOT_RUNTIME
TargetHandleList l_explorerList;
uint32_t l_tests = 0;
uint32_t l_fails = 0;
Expand Down Expand Up @@ -796,7 +803,7 @@ public:
}while(0);

TRACFCOMP(g_trac_expscom, "<< Exit testExpscomCombined");

#endif
return;
}

Expand Down
2 changes: 0 additions & 2 deletions src/usr/expaccess/test/makefile
Expand Up @@ -28,8 +28,6 @@ MODULE = testexpaccess

include test.mk

OBJS += exptest_utils.o

TESTS = *.H

include ${ROOTPATH}/config.mk
7 changes: 7 additions & 0 deletions src/usr/expaccess/test/test.mk
Expand Up @@ -30,6 +30,13 @@ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/ocmb/explorer/common/include
EXTRAINCDIR += ${ROOTPATH}/src/import
EXTRAINCDIR += ${ROOTPATH}/src/usr/expaccess/
EXTRAINCDIR += ${ROOTPATH}/src/usr/expaccess/test/

VPATH += ${ROOTPATH}/src/usr/expaccess/test/
VPATH += ${ROOTPATH}/src/usr/expaccess/

OBJS += exptest_utils.o


include ${ROOTPATH}/config.mk

0 comments on commit 052182c

Please sign in to comment.