Skip to content

Commit

Permalink
Add expscom test cases
Browse files Browse the repository at this point in the history
This commit introduces some tests that check that scoms out to the
explorer chip work. This first commit only enables test through the
i2c path to ddimm0. Eventually expscomtest.H should contain tests
that write and read over both i2c and mmio on ddimms that are and
are not behind mux chips.

Change-Id: I9a0e6612fd1d72a26991b936301aabd29508db90
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69579
Tested-by: Jenkins Server <pfd-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>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
crgeddes authored and dcrowell77 committed Feb 16, 2019
1 parent 345f3cf commit 8b07197
Show file tree
Hide file tree
Showing 5 changed files with 738 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ TESTCASE_MODULES += testintr
TESTCASE_MODULES += testfapi2
TESTCASE_MODULES += $(if $(CONFIG_FSP_BUILD),,testnvram)
TESTCASE_MODULES += testsmf
TESTCASE_MODULES += testexpscom

#******************************************************************
#KNOWN ISSUES (I might let these run but there is something wrong)
Expand Down
10 changes: 7 additions & 3 deletions src/usr/expscom/i2cscomdd.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -35,7 +35,8 @@
#include <lib/i2c/exp_i2c_scom.H> // i2c_get_scom
#include <errl/errludtarget.H> // ErrlUserDetailsTarget
#include <hwpf/fapi2/include/fapi2_hwp_executor.H> // FAPI_EXEC_HWP
#include "i2cscomdd.H" //i2cScomPerformOp
#include <expscom/expscom_reasoncodes.H> // EXPSCOM::MOD_I2CSCOM_PERFORM_OP
#include "i2cscomdd.H" //i2cScomPerformOp
#include "expscom_trace.H" //g_trac_expscom
#include "expscom_utils.H" //validateInputs

Expand Down Expand Up @@ -68,10 +69,13 @@ errlHndl_t i2cScomPerformOp(DeviceFW::OperationType i_opType,
fapi2::buffer<uint32_t> l_fapi2Buffer32;
l_fapi2Buffer64.extractToRight<32,32>(l_fapi2Buffer32);

TRACDCOMP( g_trac_expscom, ERR_MRK "i2cScomPerformOp> %s 0x%.16x or 0x%.8x to Address 0x%lx ",
i_opType == DeviceFW::READ ? "READ" : "WRITE", l_fapi2Buffer64(), l_fapi2Buffer32() , l_scomAddr );

do
{
// First make sure the inputs are valid
l_err = EXPSCOM::validateInputs ( i_opType, i_target, l_scomAddr, io_buflen);
l_err = EXPSCOM::validateInputs ( i_opType, i_target, io_buflen, l_scomAddr );

if(l_err)
{
Expand Down
6 changes: 3 additions & 3 deletions src/usr/expscom/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2011,2018
# Contributors Listed Below - COPYRIGHT 2011,2019
# [+] International Business Machines Corp.
#
#
Expand Down Expand Up @@ -40,8 +40,8 @@ OBJS += expscom_trace.o
OBJS += expscom_utils.o
OBJS += i2cscomdd.o
OBJS += mmioscomdd.o
# TODO RTC:196806 ADD TESTs
#SUBDIRS += test.d

SUBDIRS += test.d

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

Expand Down

0 comments on commit 8b07197

Please sign in to comment.