summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2018-01-29 20:56:41 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-02-03 19:48:04 -0500
commit53b3c1f1d859cb5a6b03060b46933d4ac049ca83 (patch)
treeb97feb581ebce9cd0b4156315c16bc4de8660517
parent07c9730e0a3ff5bf6ca59b09fc91da69ac4c9753 (diff)
downloadtalos-hostboot-53b3c1f1d859cb5a6b03060b46933d4ac049ca83.tar.gz
talos-hostboot-53b3c1f1d859cb5a6b03060b46933d4ac049ca83.zip
HB supports - Use ADU chipops to switch fabric configuration
Change-Id: I090cdac654d9c6efbe30748713687c6e36ff914d RTC:177597 CQ:SW413432 Backport: release-fips910 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52878 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: Daniel M. Crowell <dcrowell@us.ibm.com>
-rwxr-xr-xsrc/build/tools/listdeps.pl6
-rw-r--r--src/include/usr/fapi2/subroutine_executor.H40
-rw-r--r--src/include/usr/isteps/istep06list.H3
-rw-r--r--src/include/usr/isteps/istep07list.H3
-rw-r--r--src/include/usr/isteps/istep09list.H1
-rw-r--r--src/include/usr/isteps/istep10list.H3
-rw-r--r--src/include/usr/isteps/istep12list.H3
-rw-r--r--src/include/usr/isteps/istep14list.H3
-rw-r--r--src/include/usr/isteps/istep15list.H3
-rw-r--r--src/include/usr/isteps/istep16list.H3
-rw-r--r--src/include/usr/isteps/istep21list.H3
-rw-r--r--src/makefile2
-rw-r--r--src/usr/fapi2/plat_hw_access.C7
-rw-r--r--src/usr/hwplibs/makefile29
-rw-r--r--src/usr/hwplibs/nest/makefile31
-rw-r--r--src/usr/hwplibs/nest/nestmemutils.mk42
-rw-r--r--src/usr/isteps/istep07/makefile7
-rw-r--r--src/usr/isteps/istep10/makefile13
-rw-r--r--src/usr/isteps/istep12/makefile6
-rw-r--r--src/usr/isteps/istep14/makefile7
-rw-r--r--src/usr/isteps/istep16/makefile5
-rw-r--r--src/usr/isteps/pm/pm.mk3
-rw-r--r--src/usr/makefile3
-rw-r--r--src/usr/sbeio/sbe_fifodd.H111
-rw-r--r--src/usr/sbeio/sbe_secureHwp.C198
25 files changed, 408 insertions, 127 deletions
diff --git a/src/build/tools/listdeps.pl b/src/build/tools/listdeps.pl
index 7096f0a38..d3c9ce495 100755
--- a/src/build/tools/listdeps.pl
+++ b/src/build/tools/listdeps.pl
@@ -6,7 +6,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2013,2017
+# Contributors Listed Below - COPYRIGHT 2013,2018
# [+] Google Inc.
# [+] International Business Machines Corp.
#
@@ -279,6 +279,10 @@ foreach my $module_name (@istep_modules )
my $lib = $FunctionMap->{ $elem};
+ # if there is a dependency on another istep lib
+ # print out the mangled funtion name for debug
+ print "$lib : $elem\n" if($lib =~ /istep[0-9]/);
+
# if we have this module in our "seen it" array, just skip it
# otherwise we will add it as a new dependency
next if $seen{ $lib }++;
diff --git a/src/include/usr/fapi2/subroutine_executor.H b/src/include/usr/fapi2/subroutine_executor.H
index 82ca296a3..f0a223ab9 100644
--- a/src/include/usr/fapi2/subroutine_executor.H
+++ b/src/include/usr/fapi2/subroutine_executor.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -45,6 +45,9 @@
#include <secureboot/service.H>
#include <plat_hw_access.H>
+// Debug trace
+#define DEBUG_TRACE 0 // 0 = disable
+
/**
* @brief Given a hwp name, and its parameters, serialize the parmeters and pass the serialized
* data to the SBE via a FIFO chipop
@@ -59,26 +62,35 @@ errlHndl_t requestHwpViaSbe(const char * i_hwpName, TARGETING::Target * i_target
{
errlHndl_t l_errl = nullptr;
- //Determine argument byte size
+ // Retrieve argument byte size
size_t l_sizeOfArgInBytes =0;
using expander = int[];
(void) expander{ 0, (l_sizeOfArgInBytes+=sizeof(types), 0)... };
- //Set up the buffer which will be passed to chip op send function
+ // Retrieve the remaining arguments
uint8_t l_buffer[l_sizeOfArgInBytes];
- uint8_t* l_bufferPtr = &l_buffer[0];
+ uint8_t* l_bufferPtr = &(l_buffer[0]);
memset(l_bufferPtr, 0, l_sizeOfArgInBytes);
-
- // Serialize the arguments into the buffer
(void) expander{ 0, ((memcpy(l_bufferPtr,&types,sizeof(types)),l_bufferPtr+=sizeof(types)), 0)... };
+ FAPI_INF("requestHwpViaSbe - HWP name %s, Target 0x%.8X, Size of arguments %d bytes",
+ i_hwpName, TARGETING::get_huid(i_target), l_sizeOfArgInBytes);
+
+#if DEBUG_TRACE
+ for (uint32_t ii = 0; ii < l_sizeOfArgInBytes; ii++)
+ {
+ FAPI_INF("requestHwpViaSbe - l_buffer[%d] = 0x%.2X", ii, l_buffer[ii]);
+ }
+#endif
+
//Call the chip op send function to request the SBE to call the HWP
- l_errl = SBEIO::sendSecureHwpRequest(i_target, l_bufferPtr, l_sizeOfArgInBytes, i_hwpName);
+ l_bufferPtr = &(l_buffer[8]); // Advance past target argument value
+ l_errl = SBEIO::sendSecureHwpRequest(i_target, l_bufferPtr,
+ l_sizeOfArgInBytes - sizeof(i_target), i_hwpName);
return l_errl;
}
-
//Macros that return the 1st argument
#define _GET_1ST_ARG(N, ...) N
@@ -103,7 +115,7 @@ errlHndl_t requestHwpViaSbe(const char * i_hwpName, TARGETING::Target * i_target
/*Check if secureboot is enabled and if the target exists on the master proc*/ \
bool isSecure = SECUREBOOT::enabled(); \
bool isMaster = false; \
- l_errl = isOnMasterProc(l_target, isMaster); \
+ l_errl = fapi2::isOnMasterProc(l_target, isMaster); \
if(l_errl) \
{ \
FAPI_INF("subroutine_executor: Failed trying to determine is target was on master chip"); \
@@ -120,19 +132,25 @@ errlHndl_t requestHwpViaSbe(const char * i_hwpName, TARGETING::Target * i_target
/*Otherwise request the HWP via chipop to the SBE*/ \
else \
{ \
- FAPI_INF("subroutine_executor: isSecure = %d isMaster = %d .. executing hwp %s on host", \
+ FAPI_INF("subroutine_executor: isSecure = %d isMaster = %d .. executing hwp %s via SBE chip-op", \
isSecure, isMaster, l_function); \
l_errl = requestHwpViaSbe(l_function, l_target, _args); \
/*For now until SBE support comes fallback to running on host if chipop fails*/ \
if(l_errl) \
{ \
+ FAPI_INF("subroutine_executor: SBE HWP invoking returns error. " \
+ "Commit error and retry locally"); \
/*Commit the error as informational and attempt hwp */ \
l_errl->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL); \
errlCommit(l_errl, SBEIO_COMP_ID); \
RC = FUNC(_args);\
} \
+ else \
+ { \
+ FAPI_INF("subroutine_executor: SBE HWP invoking successful."); \
+ } \
} \
} while(0); \
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/include/usr/isteps/istep06list.H b/src/include/usr/isteps/istep06list.H
index fb14022b3..a5dce4781 100644
--- a/src/include/usr/isteps/istep06list.H
+++ b/src/include/usr/isteps/istep06list.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -235,6 +235,7 @@ const DepModInfo g_istep06Dependancies = {
DEP_LIB(libistep06.so),
DEP_LIB(libsbe.so),
DEP_LIB(libpm.so),
+ DEP_LIB(libnestmemutils.so),
DEP_LIB(libp9_cpuWkup.so),
NULL
}
diff --git a/src/include/usr/isteps/istep07list.H b/src/include/usr/isteps/istep07list.H
index 54224db75..7334993ff 100644
--- a/src/include/usr/isteps/istep07list.H
+++ b/src/include/usr/isteps/istep07list.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -162,6 +162,7 @@ namespace INITSERVICE
const DepModInfo g_istep07Dependancies = {
{
DEP_LIB(libistep07.so),
+ DEP_LIB(libnestmemutils.so),
DEP_LIB(libisteps_mss.so),
DEP_LIB(libsbe.so),
DEP_LIB(libcen.so),
diff --git a/src/include/usr/isteps/istep09list.H b/src/include/usr/isteps/istep09list.H
index 30c1b4e6b..6cefef355 100644
--- a/src/include/usr/isteps/istep09list.H
+++ b/src/include/usr/isteps/istep09list.H
@@ -230,6 +230,7 @@ const DepModInfo g_istep09Dependancies = {
DEP_LIB(libistep09.so),
DEP_LIB(libpm.so),
DEP_LIB(libp9_fab_iovalid.so),
+ DEP_LIB(libnestmemutils.so),
NULL
}
};
diff --git a/src/include/usr/isteps/istep10list.H b/src/include/usr/isteps/istep10list.H
index 86df45b47..97f5648bd 100644
--- a/src/include/usr/isteps/istep10list.H
+++ b/src/include/usr/isteps/istep10list.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -310,6 +310,7 @@ const DepModInfo g_istep10Dependancies = {
{
DEP_LIB(libistep10.so),
DEP_LIB(libsbe.so),
+ DEP_LIB(libnestmemutils.so),
NULL
}
};
diff --git a/src/include/usr/isteps/istep12list.H b/src/include/usr/isteps/istep12list.H
index 861401bc0..5dffa7a56 100644
--- a/src/include/usr/isteps/istep12list.H
+++ b/src/include/usr/isteps/istep12list.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -287,6 +287,7 @@ const TaskInfo g_istep12[] = {
const DepModInfo g_istep12Dependancies = {
{
DEP_LIB(libistep12.so),
+ DEP_LIB(libnestmemutils.so),
NULL
}
};
diff --git a/src/include/usr/isteps/istep14list.H b/src/include/usr/isteps/istep14list.H
index 6a04488c9..5bb3e8c28 100644
--- a/src/include/usr/isteps/istep14list.H
+++ b/src/include/usr/isteps/istep14list.H
@@ -46,7 +46,7 @@
* 14.7 proc_exit_cache_contained
* : Execution from memory
* 14.8 host_mpipl_service
- * : Perform MPIPL tasks
+ * : Perform MPIPL tasks
*
* Please see the note in initsvcstructs.H for description of
* the ISTEPNAME macro.
@@ -200,6 +200,7 @@ const DepModInfo g_istep14Dependancies = {
DEP_LIB(libisteps_mss.so),
DEP_LIB(libpm.so),
DEP_LIB(libcen.so),
+ DEP_LIB(libnestmemutils.so),
NULL
}
};
diff --git a/src/include/usr/isteps/istep15list.H b/src/include/usr/isteps/istep15list.H
index 97ebc7e16..0a7583aeb 100644
--- a/src/include/usr/isteps/istep15list.H
+++ b/src/include/usr/isteps/istep15list.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -136,6 +136,7 @@ const DepModInfo g_istep15Dependancies = {
{
DEP_LIB(libistep15.so),
DEP_LIB(libp9_stop_util.so),
+ DEP_LIB(libnestmemutils.so),
DEP_LIB(libpm.so),
DEP_LIB(libsbe.so),
NULL
diff --git a/src/include/usr/isteps/istep16list.H b/src/include/usr/isteps/istep16list.H
index e11f02a5f..4950f0293 100644
--- a/src/include/usr/isteps/istep16list.H
+++ b/src/include/usr/isteps/istep16list.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -158,6 +158,7 @@ namespace INITSERVICE
const DepModInfo g_istep16Dependancies = {
{
DEP_LIB(libistep16.so),
+ DEP_LIB(libnestmemutils.so),
DEP_LIB(libp9_cpuWkup.so),
DEP_LIB(libisteps_mss.so),
DEP_LIB(libpm.so),
diff --git a/src/include/usr/isteps/istep21list.H b/src/include/usr/isteps/istep21list.H
index c58ced1a0..e5b81497b 100644
--- a/src/include/usr/isteps/istep21list.H
+++ b/src/include/usr/isteps/istep21list.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -123,6 +123,7 @@ const DepModInfo g_istep21Dependancies = {
DEP_LIB(libruntime.so),
DEP_LIB(libp9_cpuWkup.so),
DEP_LIB(libpm.so),
+ DEP_LIB(libnestmemutils.so),
#ifdef CONFIG_HTMGT
DEP_LIB(libhtmgt.so),
DEP_LIB(libisteps_mss.so),
diff --git a/src/makefile b/src/makefile
index b8b76957b..59d90374e 100644
--- a/src/makefile
+++ b/src/makefile
@@ -204,6 +204,7 @@ EXTENDED_MODULES += $(if $(CONFIG_ENABLE_HDAT_IN_HOSTBOOT),hdat)
EXTENDED_MODULES += $(if $(CONFIG_SECUREBOOT),secureboot_ext)
EXTENDED_MODULES += tod
EXTENDED_MODULES += p9_fab_iovalid
+EXTENDED_MODULES += nestmemutils
#***************************************
# Working test modules
@@ -288,6 +289,7 @@ RUNTIME_MODULES += p9_cpuWkup
RUNTIME_MODULES += fsi_rt
RUNTIME_MODULES += sbeio_rt
RUNTIME_MODULES += tod_rt
+RUNTIME_MODULES += nestmemutils
RUNTIME_DATA_MODULES +=
RUNTIME_TESTCASE_MODULES += cxxtest_rt
diff --git a/src/usr/fapi2/plat_hw_access.C b/src/usr/fapi2/plat_hw_access.C
index 5fbabee11..09da6e320 100644
--- a/src/usr/fapi2/plat_hw_access.C
+++ b/src/usr/fapi2/plat_hw_access.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -407,6 +407,7 @@ errlHndl_t getCfamChipTarget(const TARGETING::Target* i_target,
l_err->collectTrace(FAPI_TRACE_NAME);
}
}
+
return l_err;
}
@@ -1100,8 +1101,9 @@ errlHndl_t isOnMasterProc(TARGETING::Target * i_target, bool & o_isMaster)
TARGETING::targetService().masterProcChipTargetHandle( l_pMasterProcChip );
assert(l_pMasterProcChip != nullptr, "isOnMasterProc:: Unable to find the system's master proc chip target handle");
o_isMaster = false;
- l_errl = getCfamChipTarget(i_target, l_pMasterProcChip);
+ // Target can be a chiplet or a proc, get the parent proc in case it's a chiplet
+ l_errl = getCfamChipTarget(i_target, l_pParentProcChip);
if(l_errl == nullptr)
{
if(l_pMasterProcChip == l_pParentProcChip)
@@ -1113,4 +1115,3 @@ errlHndl_t isOnMasterProc(TARGETING::Target * i_target, bool & o_isMaster)
}
} // End namespace
-
diff --git a/src/usr/hwplibs/makefile b/src/usr/hwplibs/makefile
new file mode 100644
index 000000000..a24ebb8c8
--- /dev/null
+++ b/src/usr/hwplibs/makefile
@@ -0,0 +1,29 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwplibs/makefile $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2017,2018
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+ROOTPATH = ../../..
+SUBDIRS += nest.d
+
+include ${ROOTPATH}/config.mk
+
diff --git a/src/usr/hwplibs/nest/makefile b/src/usr/hwplibs/nest/makefile
new file mode 100644
index 000000000..22b1adbb7
--- /dev/null
+++ b/src/usr/hwplibs/nest/makefile
@@ -0,0 +1,31 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwplibs/nest/makefile $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2017,2018
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+ROOTPATH = ../../..
+
+MODULE = nestmemutils
+
+include nestmemutils.mk
+
+include ${ROOTPATH}/config.mk
diff --git a/src/usr/hwplibs/nest/nestmemutils.mk b/src/usr/hwplibs/nest/nestmemutils.mk
new file mode 100644
index 000000000..a284cbbec
--- /dev/null
+++ b/src/usr/hwplibs/nest/nestmemutils.mk
@@ -0,0 +1,42 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwplibs/nest/nestmemutils.mk $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2017,2018
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+# NEST Memory utils functions
+ROOTPATH=../../../..
+
+
+HWP_NEST_MEM_UTILS_PATH := ${ROOTPATH}/src/import/chips/p9/procedures/hwp/nest/
+
+EXTRAINCDIR += ${HWP_NEST_MEM_UTILS_PATH}
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
+EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs
+
+VPATH += ${HWP_NEST_MEM_UTILS_PATH}
+
+include ${ROOTPATH}/procedure.rules.mk
+
+include ${HWP_NEST_MEM_UTILS_PATH}/p9_putmemproc.mk
+
+include ${ROOTPATH}/config.mk
diff --git a/src/usr/isteps/istep07/makefile b/src/usr/isteps/istep07/makefile
index 935f20468..b4b6c1eee 100644
--- a/src/usr/isteps/istep07/makefile
+++ b/src/usr/isteps/istep07/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2017
+# Contributors Listed Below - COPYRIGHT 2015,2018
# [+] International Business Machines Corp.
#
#
@@ -35,6 +35,8 @@ OBJS += call_mss_freq.o
OBJS += call_mss_eff_config.o
OBJS += call_mss_attr_update.o
OBJS += host_mss_attr_cleanup.o
+#mss_eff_config - Need in istep07 to group memory
+OBJS+=p9_mss_eff_grouping.o
#Add all the extra include paths
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
@@ -77,9 +79,6 @@ include $(HWP_PATH_2)/p9c_mss_volt.mk
include $(HWP_PATH_1)/p9_mss_freq.mk
include $(HWP_PATH_1)/p9_mss_freq_system.mk
include $(HWP_PATH_2)/p9c_mss_freq.mk
-
-#mss_eff_config : Determine effective config
-include $(PROCEDURES_PATH)/hwp/nest/p9_mss_eff_grouping.mk
include $(HWP_PATH_1)/p9_mss_eff_config.mk
include $(HWP_PATH_1)/p9_mss_eff_config_thermal.mk
include $(HWP_PATH_1)/p9_mss_bulk_pwr_throttles.mk
diff --git a/src/usr/isteps/istep10/makefile b/src/usr/isteps/istep10/makefile
index aa334f75f..576d82c09 100644
--- a/src/usr/isteps/istep10/makefile
+++ b/src/usr/isteps/istep10/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2017
+# Contributors Listed Below - COPYRIGHT 2015,2018
# [+] International Business Machines Corp.
#
#
@@ -60,6 +60,16 @@ OBJS += call_host_rng_bist.o
OBJS += call_host_update_redundant_tpm.o
OBJS += host_proc_pcie_scominit.o
+# HWP objects needed to build smp in istep 10
+# instead of using HWP p9_build_smp.mk.
+# This is done to avoid inter-isteps dependencies
+# p9_build_smp.mk
+OBJS+=p9_build_smp.o
+OBJS+=p9_fbc_smp_utils.o
+OBJS+=p9_build_smp_fbc_ab.o
+OBJS+=p9_build_smp_fbc_cd.o
+OBJS+=p9_build_smp_adu.o
+
VPATH += ${NEST_HWP_PATH}
VPATH += ${INITFILES_HWP_PATH}
VPATH += ${PERV_HWP_PATH}
@@ -71,7 +81,6 @@ VPATH += ${PROCEDURES_PATH}/hwp/lib/
include ${ROOTPATH}/procedure.rules.mk
#Include all the procedure makefiles
-include $(NEST_HWP_PATH)/p9_build_smp.mk
include ${INITFILES_HWP_PATH}/p9_fbc_ab_hp_scom.mk
include ${INITFILES_HWP_PATH}/p9_fbc_cd_hp1_scom.mk
include ${INITFILES_HWP_PATH}/p9_fbc_cd_hp2_scom.mk
diff --git a/src/usr/isteps/istep12/makefile b/src/usr/isteps/istep12/makefile
index 6a8fba51a..4ec7c41f2 100644
--- a/src/usr/isteps/istep12/makefile
+++ b/src/usr/isteps/istep12/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2017
+# Contributors Listed Below - COPYRIGHT 2015,2018
# [+] International Business Machines Corp.
#
#
@@ -77,6 +77,9 @@ OBJS += call_host_startprd_dmi.o
OBJS += call_host_attnlisten_memb.o
OBJS += call_cen_set_inband_addr.o
+# HWP objects needed to set inband addr in istep 12
+OBJS+=p9c_set_inband_addr.o
+
#Required before all the <procedure>.mk are included
include ${ROOTPATH}/procedure.rules.mk
@@ -93,7 +96,6 @@ include $(P9_IO_HWP_PATH)/p9_io_dmi_pre_trainadv.mk
include $(P9_IO_HWP_PATH)/p9_io_dmi_linktrain.mk
include $(P9_IO_HWP_PATH)/p9_io_dmi_post_trainadv.mk
include $(P9_PERV_HWP_PATH)/p9_cen_framelock.mk
-include $(P9_NEST_HWP_PATH)/p9c_set_inband_addr.mk
include $(P9_IO_HWP_PATH)/p9_io_common.mk
include $(P9_IO_HWP_PATH)/p9_io_dmi_pdwn_lanes.mk
include $(CENT_IO_HWP_PATH)/p9_io_cen_pdwn_lanes.mk
diff --git a/src/usr/isteps/istep14/makefile b/src/usr/isteps/istep14/makefile
index 4a994ad34..67ccb954f 100644
--- a/src/usr/isteps/istep14/makefile
+++ b/src/usr/isteps/istep14/makefile
@@ -60,9 +60,6 @@ include ${ROOTPATH}/procedure.rules.mk
include ${PROCEDURE_PATH}/hwp/nest/p9_exit_cache_contained.mk
include ${PROCEDURE_PATH}/hwp/nest/p9_mss_setup_bars.mk
-# TODO: RTC 184860 Remove MCS acker workaround
-include ${ROOTPATH}/src/import/chips/p9/procedures/hwp/nest/p9_revert_sbe_mcs_setup.mk
-
# TODO: RTC 159164: Multiple definition linker errors on HWPs that include the
# same *.o file in their *.mk files
# ---- Workaround: Compile the HWP directly below
@@ -70,10 +67,8 @@ OBJS += p9_htm_setup.o
OBJS += p9_htm_start.o
OBJS += p9_htm_reset.o
OBJS += p9_htm_adu_ctrl.o
-OBJS += p9_adu_coherent_utils.o
OBJS += p9_pcie_config.o
OBJS += p9_setup_bars.o
-OBJS += p9_fbc_utils.o
OBJS += p9_fbc_smp_utils.o
OBJS += p9_mpipl_chip_cleanup.o
OBJS += p9c_mss_thermal_init.o
@@ -82,6 +77,8 @@ OBJS += p9c_mss_power_cleanup.o
OBJS += p9c_cen_stopclocks.o
OBJS += p9c_mss_maint_cmds.o
OBJS += p9c_dimmBadDqBitmapFuncs.o
+# TODO: RTC 184860 Remove MCS acker workaround
+OBJS += p9_revert_sbe_mcs_setup.o
#include ${PROCEDURE_PATH}/hwp/nest/p9_htm_setup.mk
#include ${PROCEDURE_PATH}/hwp/nest/p9_pcie_config.mk
diff --git a/src/usr/isteps/istep16/makefile b/src/usr/isteps/istep16/makefile
index 8ceb38149..d15782d53 100644
--- a/src/usr/isteps/istep16/makefile
+++ b/src/usr/isteps/istep16/makefile
@@ -50,10 +50,12 @@ OBJS += call_mss_scrub.o
OBJS += call_host_ipl_complete.o
OBJS += call_host_load_io_ppe.o
+#HWP object file needed to run istep 16
+OBJS+=p9_rng_init_phase2.o
+
include ${ROOTPATH}/procedure.rules.mk
include ${PROCEDURES_PATH}/hwp/perv/p9_switch_cfsim.mk
include ${PROCEDURES_PATH}/hwp/perv/p9_switch_rec_attn.mk
-include ${PROCEDURES_PATH}/hwp/nest/p9_rng_init_phase2.mk
include ${PROCEDURES_PATH}/hwp/io/p9_io_xbus_image_build.mk
include ${PROCEDURES_PATH}/hwp/io/p9_io_obus_image_build.mk
include ${PROCEDURES_PATH}/hwp/pm/p9_check_idle_stop_done.mk
@@ -65,7 +67,6 @@ include ${PROCEDURES_PATH}/hwp/pm/p9_pm_recovery_ffdc_sgpe.mk
include ${PROCEDURES_PATH}/hwp/pm/p9_pm_recovery_ffdc_cme.mk
include ${ROOTPATH}/config.mk
-
VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/
VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/perv/
VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/nest/
diff --git a/src/usr/isteps/pm/pm.mk b/src/usr/isteps/pm/pm.mk
index 61c7ca70f..b82963d34 100644
--- a/src/usr/isteps/pm/pm.mk
+++ b/src/usr/isteps/pm/pm.mk
@@ -73,13 +73,11 @@ OBJS += occCheckstop.o
OBJS += p9_setup_evid.o
OBJS += p9_avsbus_lib.o
-
## NOTE: add a new directory onto the vpaths when you add a new HWP
VPATH += ${HWP_PM_PATH} ${HWP_CUST_PATH} ${HWP_ACC_PATH} ${HWP_LIB_PATH}
VPATH += ${HWP_XIP_PATH} ${HWP_IMAGEPROCS_PATH} ${HWP_CEN_IMAGEPROCS_PATH} ${HWP_COMMON_IMAGEPROCS_PATH} ${HWP_STOPUTIL_PATH}
VPATH += ${NEST_UTIL_PATH}
-
# TODO RTC: 164237
# Take another look at PM lib
@@ -121,7 +119,6 @@ include ${HWP_COMMON_IMAGEPROCS_PATH}/common_ringId.mk
include ${HWP_STOPUTIL_PATH}/p9_stop_util.mk
include ${HWP_STOPUTIL_PATH}/p9_stop_api.mk
include ${HWP_IMAGEPROCS_PATH}/p9_scan_compression.mk
-include ${NEST_UTIL_PATH}/p9_fbc_utils.mk
include ${HWP_PM_PATH}/p9_pstate_parameter_block.mk
include ${HWP_PM_PATH}/p9_pm_get_poundv_bucket.mk
include ${HWP_PM_PATH}/p9_pm_pstate_gpe_init.mk
diff --git a/src/usr/makefile b/src/usr/makefile
index c07030fb9..f0a4d00ae 100644
--- a/src/usr/makefile
+++ b/src/usr/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2010,2017
+# Contributors Listed Below - COPYRIGHT 2010,2018
# [+] Google Inc.
# [+] International Business Machines Corp.
#
@@ -66,6 +66,7 @@ SUBDIRS += $(if $(CONFIG_BMC_BT_LPC_IPMI),ipmi.d)
SUBDIRS += $(if $(CONFIG_HTMGT),htmgt.d)
SUBDIRS += diag.d
SUBDIRS += xz.d
+SUBDIRS += hwplibs.d
SUBDIRS += $(if $(CONFIG_ENABLE_HDAT_IN_HOSTBOOT),hdat.d,)
#errldisplay relies on some generated files from PRD.
diff --git a/src/usr/sbeio/sbe_fifodd.H b/src/usr/sbeio/sbe_fifodd.H
index 9bae59d91..837031b35 100644
--- a/src/usr/sbeio/sbe_fifodd.H
+++ b/src/usr/sbeio/sbe_fifodd.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -93,21 +93,32 @@ class SbeFifo
};
/**
- * @brief enums for FIFO Generic Messages
- */
- enum fifoGenericMessage
+ * @brief enums for FIFO MEMORY ACCESS Messages
+ */
+ enum fifoMemoryAccessMessage
{
- SBE_FIFO_CMD_GET_SBE_FFDC = 0x01,
+ SBE_FIFO_CMD_GETMEM = 0x01,
+ SBE_FIFO_CMD_PUTMEM = 0x02,
+ /**
+ * Command buffer layout (6 32-bit words)
+ * | Length |
+ * | reserved | reserved | 0xA4 | 0x02 |
+ * | Chiplet Id | ECC override | Flags |
+ * | Address 0:31 |
+ * | Address 32:63 |
+ * | Length of data (in bytes) |
+ * | Data.... |
+ **/
+ PUTMEM_CMD_BUF_LEN_IN_WORDS = 6,
+ BYTES_PER_WORD = 4,
};
/**
- * @brief enums for FIFO SECURE HWP Messages
+ * @brief enums for FIFO Generic Messages
*/
- enum fifoSecureHwpMessage
+ enum fifoGenericMessage
{
- //Replace this when we add real hwp support
- SBE_FIFO_CMD_PLACEHOLDER_HWP = 0x00,
- SBE_FIFO_CMD_UNSUPPORTED_HWP = 0xFF,
+ SBE_FIFO_CMD_GET_SBE_FFDC = 0x01,
};
/**
@@ -121,47 +132,48 @@ class SbeFifo
};
/**
- * @brief enums used by secureHwp requests
- */
- enum secureHwpDefines
- {
- REQUEST_SIZE_WITHOUT_DATA = 19,
- BYTES_PER_WORD = 4,
- };
-
- /**
- * @brief Struct for FIFO Secure Hwp request
+ * @brief Struct for FIFO PutMem request
*
*/
- struct fifoSecureHwpRequest
+ struct fifoPutMemRequest
{
+ // Note:
+ // The SBE putMem command used in HB is not a 'real' putMem command.
+ // It is used to tell SBE to run part of existing HWPs, via the flag
+ // settings in order to avoid creating new SBE chip-op.
+ // Therefore, coreChipletId and ECC_override are not used
+ // and default to 0.
+ // This is done so that HB doesn't invoke ADU SMP HWPs that access
+ // black-listed registers as part of Secure boot work.
uint32_t wordCnt;
uint16_t reserved;
uint8_t commandClass;
uint8_t command;
- uint16_t targetType;
- uint8_t chipletId;
- uint8_t * dataPtr;
- fifoSecureHwpRequest(uint64_t i_dataSizeBytes,
- uint8_t * i_dataPtr) :
- reserved(0), commandClass(SBE_FIFO_CLASS_SECURE_HWP), command(0), targetType(0), chipletId(0)
+ uint8_t coreChipletId;
+ uint8_t ECC_override;
+ uint16_t flags;
+ uint32_t address[2]; // address[0] = Address bits 0:31
+ // address[1] = Address bits 32:63
+ uint32_t dataLen;
+ uint32_t *dataPtr;
+
+ fifoPutMemRequest() :
+ wordCnt(0),
+ reserved(0),
+ commandClass(SBE_FIFO_CLASS_MEMORY_ACCESS),
+ command(SBE_FIFO_CMD_PUTMEM),
+ coreChipletId(0),
+ ECC_override(0),
+ flags(0),
+ dataLen(0),
+ dataPtr(NULL)
{
- //Determine if we need to round up to next word
- uint8_t needsRound = (REQUEST_SIZE_WITHOUT_DATA + i_dataSizeBytes) % BYTES_PER_WORD;
- wordCnt = ( (REQUEST_SIZE_WITHOUT_DATA + i_dataSizeBytes) / BYTES_PER_WORD);
- if(needsRound)
- {
- wordCnt++;
- }
- dataPtr = reinterpret_cast<uint8_t *>(malloc(i_dataSizeBytes));
- memcpy(dataPtr, i_dataPtr, i_dataSizeBytes);
+ address[0] = 0;
+ address[1] = 0;
}
- ~fifoSecureHwpRequest(){ free(dataPtr);};
-
- private:
- fifoSecureHwpRequest(){};
- fifoSecureHwpRequest(const fifoSecureHwpRequest&);
- fifoSecureHwpRequest& operator=(const fifoSecureHwpRequest&);
+ ~fifoPutMemRequest()
+ {
+ };
} PACKED;
/**
@@ -316,6 +328,21 @@ class SbeFifo
} PACKED;
/**
+ * @brief Struct for FIFO PutMem response
+ *
+ * The actual number of returned words varies based on whether there was
+ * an error.
+ */
+ struct fifoPutMemResponse
+ {
+ uint32_t len_written; // Length of Mainstore Data actually written in bytes ( includes ECC and TAG )
+ statusHeader status;
+ struct fapi2::ffdc_struct ffdc; // ffdc data
+ uint32_t status_distance; // distance to status
+ fifoPutMemResponse() {}
+ } PACKED;
+
+ /**
* @brief Struct for FIFO Put SCOM and Put SCOM under mask response
*
* The actual number of returned words varies based on whether there was
diff --git a/src/usr/sbeio/sbe_secureHwp.C b/src/usr/sbeio/sbe_secureHwp.C
index f6b3117ba..246935e78 100644
--- a/src/usr/sbeio/sbe_secureHwp.C
+++ b/src/usr/sbeio/sbe_secureHwp.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -36,38 +36,124 @@
#include <sbeio/sbeioreasoncodes.H>
#include <targeting/common/targetservice.H>
+#define DEBUG_TRACE 0 // 0 = disable
extern trace_desc_t* g_trac_sbeio;
+// -------------------------
+// Structure definitions
+// -------------------------
+
+// Argument pointer lay-out
+// uint64_t i_address
+// uint32_t i_bytes,
+// uint8_t* i_data,
+// uint32_t i_mem_flags
+struct argData_t
+{
+ uint32_t address_0;
+ uint32_t address_1;
+ uint32_t dataLen;
+ uint64_t dataLoc;
+ uint32_t flags;
+} PACKED;
+
#define SBE_TRACD(printf_string,args...) \
TRACDCOMP(g_trac_sbeio,"secureHwp: " printf_string,##args)
#define SBE_TRACF(printf_string,args...) \
TRACFCOMP(g_trac_sbeio,"secureHwp: " printf_string,##args)
-
namespace SBEIO
{
- //List out name of valid hwps that have chipop equivalents
- //these static variable will be used by
- static const char* test_hwp = "test_hwp"; // SBE_FIFO_CMD_PLACEHOLDER_HWP
-
/**
- * @brief Convert a hwp name passed in as a string to a chipOp code
- * @param[in] i_hwpName name of hwp as a string
- * @return fifoSecureHwpMessage returns a chipOp representing the HWP, if found
- * otherwise returns UNSUPPORTED_HWP enum
+ * @brief Perform an SBE PutMem chip-op with arguments given from a
+ * "p9_putmemproc" secured function call.
+ *
+ * @param[in] i_target TARGETING::Target which the HWP is being called on
+ * @param[in] i_argPtr Pointer to arguments of the HWP
+ * @param[in] i_argSize Argument size in bytes
+ *
+ * @return errlHndl_t Error log handle on failure.
*/
- SbeFifo::fifoSecureHwpMessage convertHwpStringToOpCode(const char* i_hwpName)
+ errlHndl_t putMemChipOpRequest(TARGETING::Target *i_target,
+ const uint8_t* i_argPtr,
+ const size_t i_argSize)
{
- //Default to undefined HWP
- SbeFifo::fifoSecureHwpMessage l_hwpOpCode = SbeFifo::fifoSecureHwpMessage::SBE_FIFO_CMD_UNSUPPORTED_HWP;
+ SBE_TRACD(ENTER_MRK "putMemChipOpRequest");
+ errlHndl_t l_errl = nullptr;
- //If we find a match, set the return value
- if(strcmp(i_hwpName,test_hwp) == 0)
+ do
{
- l_hwpOpCode = SbeFifo::fifoSecureHwpMessage::SBE_FIFO_CMD_PLACEHOLDER_HWP;
- }
- return l_hwpOpCode;
+
+#if DEBUG_TRACE
+ for (uint32_t ii = 0; ii < i_argSize; ii++)
+ {
+ SBE_TRACF("putMemChipOpRequest - i_argPtr[%d] = 0x%.2X", ii, i_argPtr[ii]);
+ }
+#endif
+
+ // Setup command
+ SbeFifo::fifoPutMemRequest l_fifoRequest;
+ SbeFifo::fifoPutMemResponse l_fifoResponse;
+
+ // Map input arg pointer into structure
+ argData_t* l_argPtr = (argData_t*)i_argPtr;
+
+ // Address bits 0:31
+ l_fifoRequest.address[0] = l_argPtr->address_0;
+
+ // Address bits 32:63
+ l_fifoRequest.address[1] = l_argPtr->address_1;
+
+ // Data length
+ l_fifoRequest.dataLen = l_argPtr->dataLen;
+
+ // Allocate memory for data
+ l_fifoRequest.dataPtr =
+ reinterpret_cast<uint32_t *>(malloc(l_fifoRequest.dataLen));
+
+ // Copy data from memory into allocated memory
+ memcpy(l_fifoRequest.dataPtr,
+ reinterpret_cast<uint32_t *>(l_argPtr->dataLoc),
+ l_fifoRequest.dataLen);
+
+ // Flag
+ l_fifoRequest.flags = l_argPtr->flags;
+
+ // Command length
+ l_fifoRequest.wordCnt = SbeFifo::PUTMEM_CMD_BUF_LEN_IN_WORDS +
+ (l_fifoRequest.dataLen / SbeFifo::BYTES_PER_WORD);
+ if (l_fifoRequest.dataLen % SbeFifo::BYTES_PER_WORD)
+ {
+ l_fifoRequest.wordCnt += 1;
+ }
+
+ SBE_TRACF("INFO_MRK: Target: 0x%.8X, Address: 0x%.16llX, Datalen: %d, "
+ "Data[0]: 0x%.8X, Flags 0x%.4x, WordCnt: %d",
+ TARGETING::get_huid(i_target),
+ ((uint64_t)(l_fifoRequest.address[0]) << 32) | l_fifoRequest.address[1],
+ l_fifoRequest.dataLen,
+ *l_fifoRequest.dataPtr,
+ l_fifoRequest.flags,
+ l_fifoRequest.wordCnt);
+
+ l_errl = SbeFifo::getTheInstance().performFifoChipOp(
+ i_target,
+ (uint32_t *)&l_fifoRequest,
+ (uint32_t *)&l_fifoResponse,
+ sizeof(l_fifoResponse));
+ if (l_errl)
+ {
+ SBE_TRACF("ERR_MRK: SBE Putmem chip-op call returns an error.");
+ }
+
+ free(l_fifoRequest.dataPtr);
+
+ } while(0);
+
+ SBE_TRACD(EXIT_MRK "putMemChipOpRequest");
+
+ return l_errl;
}
/**
@@ -76,11 +162,10 @@ namespace SBEIO
* @param[in] i_target The target of which the HWP is intended to be called on,
* this must be the first param of the request HWP
*
- * @param[in] i_dataPointer Pointer to a blob of data that contains additional parameters
- * for the requests HWP
+ * @param[in] i_argPtr Pointer to argument data for the request HWP
+ * arguments for the requests HWP
*
- * @param[in] i_dataSize Size of blob of data that contains additional parameters
- * for the requests HWP
+ * @param[in] i_argSize Size of argument data for the requests HWP, in bytes
*
* @param[in] i_hwpName Pointer to string of chars representing hwp name
*
@@ -88,16 +173,18 @@ namespace SBEIO
*
*/
errlHndl_t sendSecureHwpRequest(TARGETING::Target * i_target,
- uint8_t * i_dataPointer,
- uint64_t i_dataSize,
+ uint8_t * i_argPtr,
+ size_t i_argSize,
const char * i_hwpName)
{
errlHndl_t errl = nullptr;
do
{
- SBE_TRACD(ENTER_MRK "sendSecureHwpRequest");
- //First we need to figure out if this is a proc, if it isn't
- //then we need to find its parent proccessor chip
+ SBE_TRACF(ENTER_MRK "sendSecureHwpRequest: HWP %s, Target 0x%.8X",
+ i_hwpName, TARGETING::get_huid(i_target));
+
+ // First we need to figure out if this is a proc, if it isn't
+ // then we need to find its parent proccessor chip
auto l_targType = i_target->getAttr<TARGETING::ATTR_TYPE>();
TARGETING::Target * l_proc;
if(l_targType == TARGETING::TYPE_PROC)
@@ -109,29 +196,54 @@ namespace SBEIO
l_proc = const_cast<TARGETING::Target *>(getParentChip(i_target));
}
- SbeFifo::fifoSecureHwpRequest l_fifoRequest(i_dataSize, i_dataPointer);
- SbeFifo::fifoStandardResponse l_fifoResponse;
-
- //Command is computed by converting hwp string to function
- l_fifoRequest.command = convertHwpStringToOpCode(i_hwpName);
- l_fifoRequest.targetType = translateToSBETargetType(i_target);
- l_fifoRequest.chipletId = getChipletIDForSBE(i_target);
+ // -----------------------------------------------
+ // Identify HWP and call appropriate chip-op setup
+ // -----------------------------------------------
+ // HWP = p9_putmemproc
+ if (strcmp(i_hwpName,"p9_putmemproc") == 0)
+ {
+ // Perform PutMem chip-op
+ errl = putMemChipOpRequest(l_proc, i_argPtr, i_argSize);
+ if (errl)
+ {
+ break;
+ }
+ }
- SBE_TRACD(ENTER_MRK "requesting secureHwp %d on proc %d HB -> SBE ",
- l_fifoRequest.command,
- l_proc->getAttr<TARGETING::ATTR_POSITION>());
+ // HWP = test_hwp
+ else if (strcmp(i_hwpName, "test_hwp") == 0)
+ {
+ }
- errl = SbeFifo::getTheInstance().performFifoChipOp(l_proc,
- (uint32_t *)&l_fifoRequest,
- (uint32_t *)&l_fifoResponse,
- sizeof(SbeFifo::fifoStandardResponse));
+ // HWP = procedure_to_call
+ // This procedure is called via error path test case.
+ // Return an error so FAPI_PLAT_CALL_SUBROUTINE invokes
+ // a local copy written for the test case.
+ else if (strcmp(i_hwpName, "procedure_to_call") == 0)
+ {
+ SBE_TRACF(ERR_MRK "sendSecureHwpRequest: HWP %s not supported in SBE.", i_hwpName);
+ errl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ SBEIO_FIFO,
+ SBEIO_FIFO_INVALID_OPERATION,
+ 0,
+ 0,
+ true /*SW error*/);
+ errl->collectTrace(SBEIO_COMP_NAME);
+ break;
+ }
- SBE_TRACD(EXIT_MRK "sendSecureHwpRequest");
+ // HWP = unknown
+ // Assert if HWP is not recognized, either a code bug or HWP needs
+ // to be supported
+ else
+ {
+ assert(false,"sendSecureHwpRequest: HWP name is not recognized: %s", i_hwpName);
+ }
}while(0);
+ SBE_TRACD(EXIT_MRK "sendSecureHwpRequest");
return errl;
};
} //end namespace SBEIO
-
OpenPOWER on IntegriCloud