summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/runtime/interface.h18
-rw-r--r--src/include/usr/hwpf/fapi/fapiReturnCodes.H3
-rw-r--r--src/makefile4
-rw-r--r--src/usr/hwpf/fapi/fapi.mk39
-rw-r--r--src/usr/hwpf/fapi/makefile19
-rw-r--r--src/usr/hwpf/fapi/runtime/makefile32
-rw-r--r--src/usr/hwpf/hwp/chip_accessors/chip.mk2
-rw-r--r--src/usr/hwpf/hwp/hwp.mk44
-rw-r--r--src/usr/hwpf/hwp/makefile32
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk4
-rw-r--r--src/usr/hwpf/hwp/pll_accessors/pll.mk4
-rw-r--r--src/usr/hwpf/hwp/runtime/makefile32
-rw-r--r--src/usr/hwpf/hwp/spd_accessors/spd.mk4
-rw-r--r--src/usr/hwpf/hwp/utility_procedures/utils.mk4
-rw-r--r--src/usr/hwpf/hwp/winkle_ring_accessors/winkle_ring.mk4
-rw-r--r--src/usr/hwpf/plat/fapiPlatAttrOverrideSync.C12
-rw-r--r--src/usr/hwpf/plat/fapiPlatUtil.C48
-rw-r--r--src/usr/hwpf/plat/makefile22
-rw-r--r--src/usr/hwpf/plat/plat.mk39
-rw-r--r--src/usr/hwpf/plat/runtime/makefile34
-rw-r--r--src/usr/hwpf/test/fapiRcTest.C2
-rw-r--r--src/usr/hwpf/test/hwpftest.H8
-rw-r--r--src/usr/hwpf/test/hwpftest.mk33
-rw-r--r--src/usr/hwpf/test/makefile15
-rw-r--r--src/usr/hwpf/test/runtime/makefile34
25 files changed, 409 insertions, 83 deletions
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h
index dd744a27d..4ff5e0687 100644
--- a/src/include/runtime/interface.h
+++ b/src/include/runtime/interface.h
@@ -116,6 +116,24 @@ typedef struct hostInterfaces
**/
uint64_t (*get_reserved_mem)(const char*);
+ /**
+ * @brief Force a core to be awake, or clear the force
+ * @param[in] i_core Core to wake (based on devtree defn)
+ * @param[in] i_mode 0=force awake
+ * 1=clear force
+ * 2=clear all previous forces
+ * @return rc non-zero on error
+ */
+ int (*wakeup)(uint32_t i_core, uint32_t i_mode );
+
+ /**
+ * @brief Delay/sleep for at least the time given
+ * @param[in] seconds
+ * @param[in] nano seconds
+ */
+ void (*nanosleep)(uint64_t i_seconds, uint64_t i_nano_seconds);
+
+
// Reserve some space for future growth.
void (*reserved[32])(void);
diff --git a/src/include/usr/hwpf/fapi/fapiReturnCodes.H b/src/include/usr/hwpf/fapi/fapiReturnCodes.H
index d88ce3766..24e99c77f 100644
--- a/src/include/usr/hwpf/fapi/fapiReturnCodes.H
+++ b/src/include/usr/hwpf/fapi/fapiReturnCodes.H
@@ -99,6 +99,9 @@ enum ReturnCodes
// Operation to AlterDisplay unit failed because it is locked
FAPI_RC_PLAT_ERR_ADU_LOCKED = FAPI_RC_PLAT_MASK | 0x02,
+
+ // Operation not supported by HB runtime
+ FAPI_RC_PLAT_NOT_SUPPORTED_AT_RUNTIME = FAPI_RC_PLAT_MASK | 0x03,
};
}
diff --git a/src/makefile b/src/makefile
index c975fb31a..3b0cb94e8 100644
--- a/src/makefile
+++ b/src/makefile
@@ -73,12 +73,12 @@ RUNTIME_OBJECTS = rt_start.o rt_main.o rt_console.o rt_stdlib.o rt_sync.o \
rt_assert.o rt_vfs.o rt_task.o
RUNTIME_MODULES = trace_rt errl_rt targeting_rt util_rt devicefw_rt \
- xscom_rt scom_rt vpd_rt
+ xscom_rt scom_rt vpd_rt ecmddatabuffer fapi_rt hwp_rt plat_rt
RUNTIME_DATA_MODULES =
RUNTIME_TESTCASE_MODULES = cxxtest_rt testsyslib_rt testtargeting_rt \
testxscom_rt testerrl_rt testdevicefw_rt \
- testscom_rt testutil_rt testvpd_rt
+ testscom_rt testutil_rt testvpd_rt testhwpf_rt
RELOCATABLE_IMAGE_LDFLAGS = -pie --export-dynamic
diff --git a/src/usr/hwpf/fapi/fapi.mk b/src/usr/hwpf/fapi/fapi.mk
new file mode 100644
index 000000000..3be4d36cb
--- /dev/null
+++ b/src/usr/hwpf/fapi/fapi.mk
@@ -0,0 +1,39 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwpf/fapi/fapi.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2014
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
+
+CFLAGS += -D_NO_SPY_ACCESS=1
+
+OBJS += fapiReturnCode.o \
+ fapiReturnCodeDataRef.o \
+ fapiTarget.o \
+ fapiHwAccess.o \
+ fapiErrorInfo.o \
+ fapiAttributeService.o \
+ fapiChipEcFeature.o \
+ fapiCollectRegFfdc.o \
+
diff --git a/src/usr/hwpf/fapi/makefile b/src/usr/hwpf/fapi/makefile
index ae098e7d3..7cce04d0e 100644
--- a/src/usr/hwpf/fapi/makefile
+++ b/src/usr/hwpf/fapi/makefile
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011,2013
+# COPYRIGHT International Business Machines Corp. 2011,2014
#
# p1
#
@@ -23,22 +23,9 @@
ROOTPATH = ../../../..
MODULE = fapi
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
+SUBDIRS = runtime.d
-CFLAGS += -D_NO_SPY_ACCESS=1
-
-OBJS = fapiReturnCode.o \
- fapiReturnCodeDataRef.o \
- fapiTarget.o \
- fapiHwAccess.o \
- fapiErrorInfo.o \
- fapiAttributeService.o \
- fapiChipEcFeature.o \
- fapiCollectRegFfdc.o
+include fapi.mk
include ${ROOTPATH}/config.mk
diff --git a/src/usr/hwpf/fapi/runtime/makefile b/src/usr/hwpf/fapi/runtime/makefile
new file mode 100644
index 000000000..9ccebb6ac
--- /dev/null
+++ b/src/usr/hwpf/fapi/runtime/makefile
@@ -0,0 +1,32 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwpf/fapi/runtime/makefile $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2011,2014
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+ROOTPATH = ../../../../..
+MODULE = fapi_rt
+VPATH += ../
+HOSTBOOT_RUNTIME = 1
+
+include ../fapi.mk
+
+include ${ROOTPATH}/config.mk
+
+vpath %.C ${GENDIR}
diff --git a/src/usr/hwpf/hwp/chip_accessors/chip.mk b/src/usr/hwpf/hwp/chip_accessors/chip.mk
index 516179bcb..5a230dc3b 100644
--- a/src/usr/hwpf/hwp/chip_accessors/chip.mk
+++ b/src/usr/hwpf/hwp/chip_accessors/chip.mk
@@ -23,7 +23,7 @@
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/chip_accessors
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp/chip_accessors
-VPATH += chip_accessors
+VPATH += ${HWPPATH}/chip_accessors
OBJS += getPciOscswitchConfig.o
diff --git a/src/usr/hwpf/hwp/hwp.mk b/src/usr/hwpf/hwp/hwp.mk
new file mode 100644
index 000000000..ddbe47c8c
--- /dev/null
+++ b/src/usr/hwpf/hwp/hwp.mk
@@ -0,0 +1,44 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwpf/hwp/hwp.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2011,2014
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
+
+# CompressedScanData struct needed for getRepairRings()
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build
+
+OBJS += dimmBadDqBitmapAccessHwp.o \
+ dimmBadDqBitmapFuncs.o \
+ fapiTestHwpError.o \
+ fapiTestHwpFfdc.o \
+ fapiTestHwpConfig.o
+
+include ${ROOTPATH}/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk
+include ${ROOTPATH}/src/usr/hwpf/hwp/pll_accessors/pll.mk
+include ${ROOTPATH}/src/usr/hwpf/hwp/winkle_ring_accessors/winkle_ring.mk
+include ${ROOTPATH}/src/usr/hwpf/hwp/utility_procedures/utils.mk
+include ${ROOTPATH}/src/usr/hwpf/hwp/chip_accessors/chip.mk
+include ${ROOTPATH}/src/usr/hwpf/hwp/spd_accessors/spd.mk
+
diff --git a/src/usr/hwpf/hwp/makefile b/src/usr/hwpf/hwp/makefile
index b9877a705..a80baf8e1 100644
--- a/src/usr/hwpf/hwp/makefile
+++ b/src/usr/hwpf/hwp/makefile
@@ -21,41 +21,25 @@
#
# IBM_PROLOG_END_TAG
ROOTPATH = ../../../..
+HWPPATH = ./
MODULE = hwp
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
EXTRAINCDIR += ${ROOTPATH}/src/usr/initservice/istepdispatcher
-# CompressedScanData struct needed for getRepairRings()
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build
+include hwp.mk
-OBJS = fapiTestHwp.o \
- fapiTestHwpError.o \
- fapiTestHwpFfdc.o \
- fapiTestHwpConfig.o \
- fapiTestHwpDq.o \
- fapiHwpExecInitFile.o \
- dimmBadDqBitmapFuncs.o \
- dimmBadDqBitmapAccessHwp.o \
- hwpisteperror.o \
- hwpistepud.o
+OBJS += fapiTestHwp.o \
+ fapiTestHwpDq.o \
+ fapiHwpExecInitFile.o \
+ hwpisteperror.o \
+ hwpistepud.o
SUBDIRS = dmi_training.d sbe_centaur_init.d mc_config.d \
dram_training.d activate_powerbus.d build_winkle_images.d \
core_activate.d dram_initialization.d edi_ei_initialization.d \
establish_system_smp.d bus_training.d occ.d tod_init.d \
nest_chiplets.d start_payload.d thread_activate.d slave_sbe.d \
- pstates.d proc_hwreconfig.d
+ pstates.d proc_hwreconfig.d runtime.d
-include mvpd_accessors/mvpd.mk
-include spd_accessors/spd.mk
-include pll_accessors/pll.mk
-include winkle_ring_accessors/winkle_ring.mk
-include utility_procedures/utils.mk
-include chip_accessors/chip.mk
include ${ROOTPATH}/config.mk
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk b/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk
index bd53bd88c..5be3c56a8 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk
+++ b/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2012,2013
+# COPYRIGHT International Business Machines Corp. 2012,2014
#
# p1
#
@@ -23,7 +23,7 @@
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/mvpd_accessors
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp/mvpd_accessors
-VPATH += mvpd_accessors
+VPATH += ${HWPPATH}/mvpd_accessors
OBJS += getMvpdRing.o \
getMBvpdRing.o \
diff --git a/src/usr/hwpf/hwp/pll_accessors/pll.mk b/src/usr/hwpf/hwp/pll_accessors/pll.mk
index 643e17772..d3c1c1c4e 100644
--- a/src/usr/hwpf/hwp/pll_accessors/pll.mk
+++ b/src/usr/hwpf/hwp/pll_accessors/pll.mk
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2013
+# COPYRIGHT International Business Machines Corp. 2013,2014
#
# p1
#
@@ -22,7 +22,7 @@
# IBM_PROLOG_END_TAG
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp/pll_accessors
-VPATH += pll_accessors
+VPATH += ${HWPPATH}/pll_accessors
OBJS += getPllRingAttr.o
OBJS += getPllRingInfoAttr.o
diff --git a/src/usr/hwpf/hwp/runtime/makefile b/src/usr/hwpf/hwp/runtime/makefile
new file mode 100644
index 000000000..3bdc29040
--- /dev/null
+++ b/src/usr/hwpf/hwp/runtime/makefile
@@ -0,0 +1,32 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwpf/hwp/runtime/makefile $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2011,2014
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+ROOTPATH = ../../../../..
+HWPPATH = ../
+MODULE = hwp_rt
+HOSTBOOT_RUNTIME = 1
+
+VPATH += ../
+
+include ../hwp.mk
+
+include ${ROOTPATH}/config.mk
diff --git a/src/usr/hwpf/hwp/spd_accessors/spd.mk b/src/usr/hwpf/hwp/spd_accessors/spd.mk
index 0e14d703a..f8285568b 100644
--- a/src/usr/hwpf/hwp/spd_accessors/spd.mk
+++ b/src/usr/hwpf/hwp/spd_accessors/spd.mk
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2013
+# COPYRIGHT International Business Machines Corp. 2013,2014
#
# p1
#
@@ -23,7 +23,7 @@
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/spd_accessors
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp/spd_accessors
-VPATH += spd_accessors
+VPATH += ${HWPPATH}/spd_accessors
OBJS += getSpdAttrAccessor.o
diff --git a/src/usr/hwpf/hwp/utility_procedures/utils.mk b/src/usr/hwpf/hwp/utility_procedures/utils.mk
index 88432057d..3d74fbae1 100644
--- a/src/usr/hwpf/hwp/utility_procedures/utils.mk
+++ b/src/usr/hwpf/hwp/utility_procedures/utils.mk
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2012,2013
+# COPYRIGHT International Business Machines Corp. 2012,2014
#
# p1
#
@@ -25,7 +25,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp/utility_procedures
EXTRAINCDIR += ${ROOTPATH}/usr/hwpf/hwp/include
-VPATH += utility_procedures
+VPATH += ${HWPPATH}/utility_procedures
OBJS += mss_unmask_errors.o mss_maint_cmds.o
diff --git a/src/usr/hwpf/hwp/winkle_ring_accessors/winkle_ring.mk b/src/usr/hwpf/hwp/winkle_ring_accessors/winkle_ring.mk
index eb654c24a..b587631db 100644
--- a/src/usr/hwpf/hwp/winkle_ring_accessors/winkle_ring.mk
+++ b/src/usr/hwpf/hwp/winkle_ring_accessors/winkle_ring.mk
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2013
+# COPYRIGHT International Business Machines Corp. 2013,2014
#
# p1
#
@@ -22,7 +22,7 @@
# IBM_PROLOG_END_TAG
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp/winkle_ring_accessors
-VPATH += winkle_ring_accessors
+VPATH += ${HWPPATH}/winkle_ring_accessors
OBJS += getL3DeltaDataAttr.o
diff --git a/src/usr/hwpf/plat/fapiPlatAttrOverrideSync.C b/src/usr/hwpf/plat/fapiPlatAttrOverrideSync.C
index 99da5d9f9..c0d5cce6a 100644
--- a/src/usr/hwpf/plat/fapiPlatAttrOverrideSync.C
+++ b/src/usr/hwpf/plat/fapiPlatAttrOverrideSync.C
@@ -51,10 +51,12 @@ namespace fapi
// Global Variables
//******************************************************************************
+#ifndef __HOSTBOOT_RUNTIME
// Set by a debug tool to directly apply an Attribute Override
TARGETING::AttributeTank::AttributeHeader g_attrOverrideHeader;
uint8_t g_attrOverride[AttrOverrideSync::MAX_DIRECT_OVERRIDE_ATTR_SIZE_BYTES];
uint8_t g_attrOverrideFapiTank = 0;
+#endif
//******************************************************************************
// Apply a HWPF Attribute Override written directly into Hostboot memory from
@@ -62,6 +64,7 @@ uint8_t g_attrOverrideFapiTank = 0;
//******************************************************************************
void directOverride()
{
+#ifndef __HOSTBOOT_RUNTIME
// Apply the attribute override
if (g_attrOverrideFapiTank)
{
@@ -129,6 +132,7 @@ void directOverride()
g_attrOverrideHeader.iv_valSize,
&g_attrOverride);
}
+#endif
}
//******************************************************************************
@@ -146,6 +150,7 @@ AttrOverrideSync::~AttrOverrideSync() {}
//******************************************************************************
void AttrOverrideSync::monitorForFspMessages()
{
+#ifndef __HOSTBOOT_RUNTIME
FAPI_IMP("monitorForFspMessages starting");
// Register a message queue with the mailbox
@@ -253,6 +258,7 @@ void AttrOverrideSync::monitorForFspMessages()
msg_free(l_pMsg);
}
}
+#endif
}
//******************************************************************************
@@ -264,6 +270,7 @@ errlHndl_t AttrOverrideSync::sendAttrsToFsp(
{
errlHndl_t l_pErr = NULL;
+#ifndef __HOSTBOOT_RUNTIME
std::vector<TARGETING::AttributeTank::AttributeSerializedChunk>::iterator
l_itr;
@@ -305,6 +312,7 @@ errlHndl_t AttrOverrideSync::sendAttrsToFsp(
(*l_itr).iv_pAttributes = NULL;
}
io_attributes.clear();
+#endif
return l_pErr;
}
@@ -312,6 +320,7 @@ errlHndl_t AttrOverrideSync::sendAttrsToFsp(
//******************************************************************************
void AttrOverrideSync::sendAttrOverridesAndSyncsToFsp()
{
+#ifndef __HOSTBOOT_RUNTIME
const uint32_t MAILBOX_CHUNK_SIZE = 4096;
if (MBOX::mailbox_enabled())
@@ -430,11 +439,13 @@ void AttrOverrideSync::sendAttrOverridesAndSyncsToFsp()
}
}
}
+#endif
}
//******************************************************************************
void AttrOverrideSync::getAttrOverridesFromFsp()
{
+#ifndef __HOSTBOOT_RUNTIME
FAPI_IMP("Requesting Attribute Overrides from the FSP");
errlHndl_t l_pErr = NULL;
@@ -458,6 +469,7 @@ void AttrOverrideSync::getAttrOverridesFromFsp()
msg_free(l_pMsg);
l_pMsg = NULL;
+#endif
}
//******************************************************************************
diff --git a/src/usr/hwpf/plat/fapiPlatUtil.C b/src/usr/hwpf/plat/fapiPlatUtil.C
index ddff20d94..452158127 100644
--- a/src/usr/hwpf/plat/fapiPlatUtil.C
+++ b/src/usr/hwpf/plat/fapiPlatUtil.C
@@ -38,6 +38,10 @@
#include <initservice/initsvcbreakpoint.H>
#include <errl/errlentry.H>
+#ifdef __HOSTBOOT_RUNTIME
+#include <runtime/interface.h>
+#include <targeting/common/targetservice.H>
+#endif
//******************************************************************************
// Trace descriptors
@@ -84,7 +88,14 @@ void fapiAssert(bool i_expression)
fapi::ReturnCode fapiDelay(uint64_t i_nanoSeconds, uint64_t i_simCycles)
{
FAPI_DBG( INFO_MRK "delay %lld nanosec", i_nanoSeconds );
+#ifndef __HOSTBOOT_RUNTIME
nanosleep( 0, i_nanoSeconds );
+#else
+ if(g_hostInterfaces && g_hostInterfaces->nanosleep)
+ {
+ g_hostInterfaces->nanosleep(0, i_nanoSeconds);
+ }
+#endif
return fapi::FAPI_RC_SUCCESS;
}
@@ -159,6 +170,7 @@ bool platIsScanTraceEnabled()
fapi::ReturnCode fapiLoadInitFile(const fapi::Target & i_Target,
const char * i_file, const char *& o_addr, size_t & o_size)
{
+#ifndef __HOSTBOOT_RUNTIME
fapi::ReturnCode l_rc = fapi::FAPI_RC_SUCCESS;
errlHndl_t l_pError = NULL;
o_size = 0;
@@ -190,6 +202,9 @@ fapi::ReturnCode fapiLoadInitFile(const fapi::Target & i_Target,
*(reinterpret_cast<const uint64_t*>(o_addr)));
}
}
+#else
+ fapi::ReturnCode l_rc = fapi::FAPI_RC_PLAT_NOT_SUPPORTED_AT_RUNTIME;
+#endif
return l_rc;
}
@@ -200,6 +215,7 @@ fapi::ReturnCode fapiLoadInitFile(const fapi::Target & i_Target,
fapi::ReturnCode fapiUnloadInitFile(const char * i_file, const char *& io_addr,
size_t & io_size)
{
+#ifndef __HOSTBOOT_RUNTIME
fapi::ReturnCode l_rc = fapi::FAPI_RC_SUCCESS;
errlHndl_t l_pError = NULL;
@@ -217,6 +233,9 @@ fapi::ReturnCode fapiUnloadInitFile(const char * i_file, const char *& io_addr,
io_addr = NULL;
io_size = 0;
}
+#else
+ fapi::ReturnCode l_rc = fapi::FAPI_RC_PLAT_NOT_SUPPORTED_AT_RUNTIME;
+#endif
return l_rc;
}
@@ -226,7 +245,9 @@ fapi::ReturnCode fapiUnloadInitFile(const char * i_file, const char *& io_addr,
//******************************************************************************
void fapiBreakPoint( uint32_t i_info)
{
+#ifndef __HOSTBOOT_RUNTIME
INITSERVICE::iStepBreakPoint( i_info );
+#endif
}
//******************************************************************************
@@ -235,9 +256,34 @@ void fapiBreakPoint( uint32_t i_info)
fapi::ReturnCode fapiSpecialWakeup(const fapi::Target & i_target,
const bool i_enable)
{
+ fapi::ReturnCode fapi_rc = fapi::FAPI_RC_SUCCESS;
+ FAPI_INF("fapiSpecialWakeup");
+#ifdef __HOSTBOOT_RUNTIME
+ if(g_hostInterfaces && g_hostInterfaces->wakeup)
+ {
+ // TODO Support wakeup RTC = 98665
+ // We need to merge all rt - sapphire tareting id stuff into a
+ // common runtime targeting util - right now some is in xscom and some
+ // is in RT_OCC.
+
+ //TARGETING::Target* target =
+ // reinterpret_cast<TARGETING::Target*>(i_target.get());
+
+ //uint64_t core_id = 0;
+ //int rc = g_hostInterfaces->wakeup(core_id,0);
+ //if(rc)
+ //{
+ // FAPI_ERR("CPU core wakeup call to hypervisor returned rc = %d",
+ // rc);
+
+ // Make error log
+
+ //}
+ }
+#endif
// On Hostboot, processor cores cannot sleep so return success to the
// fapiSpecialWakeup enable/disable calls
- return fapi::FAPI_RC_SUCCESS;
+ return fapi_rc;
}
}
diff --git a/src/usr/hwpf/plat/makefile b/src/usr/hwpf/plat/makefile
index 07c1f2cd3..99edcb31e 100644
--- a/src/usr/hwpf/plat/makefile
+++ b/src/usr/hwpf/plat/makefile
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011,2013
+# COPYRIGHT International Business Machines Corp. 2011,2014
#
# p1
#
@@ -23,21 +23,11 @@
ROOTPATH = ../../../..
MODULE = plat
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
+# include common fapi OBJs between HB and HBRT
+include plat.mk
-OBJS = fapiPlatHwAccess.o \
- fapiPlatHwpInvoker.o \
- fapiPlatReturnCodeDataRef.o \
- fapiPlatSystemConfig.o \
- fapiPlatTarget.o \
- fapiPlatUtil.o \
- fapiPlatAttributeService.o \
- fapiPlatMvpdAccess.o \
- fapiPlatMBvpdAccess.o \
- fapiPlatTask.o \
- fapiPlatAttrOverrideSync.o
+OBJS += fapiPlatTask.o
+
+SUBDIRS = runtime.d
include ${ROOTPATH}/config.mk
diff --git a/src/usr/hwpf/plat/plat.mk b/src/usr/hwpf/plat/plat.mk
new file mode 100644
index 000000000..7abad2167
--- /dev/null
+++ b/src/usr/hwpf/plat/plat.mk
@@ -0,0 +1,39 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwpf/plat/plat.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2014
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+# Common to both HB and HBRT
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
+
+OBJS = fapiPlatHwAccess.o \
+ fapiPlatHwpInvoker.o \
+ fapiPlatReturnCodeDataRef.o \
+ fapiPlatSystemConfig.o \
+ fapiPlatTarget.o \
+ fapiPlatUtil.o \
+ fapiPlatAttributeService.o \
+ fapiPlatMvpdAccess.o \
+ fapiPlatMBvpdAccess.o \
+ fapiPlatAttrOverrideSync.o
+
diff --git a/src/usr/hwpf/plat/runtime/makefile b/src/usr/hwpf/plat/runtime/makefile
new file mode 100644
index 000000000..1c928682f
--- /dev/null
+++ b/src/usr/hwpf/plat/runtime/makefile
@@ -0,0 +1,34 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwpf/plat/runtime/makefile $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2011,2014
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+HOSTBOOT_RUNTIME = 1
+ROOTPATH = ../../../../..
+MODULE = plat_rt
+VPATH += ../
+
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp/pll_accessors/
+
+
+# include common fapi OBJs
+include ../plat.mk
+
+include ${ROOTPATH}/config.mk
diff --git a/src/usr/hwpf/test/fapiRcTest.C b/src/usr/hwpf/test/fapiRcTest.C
index 80e6ea026..21c0f8730 100644
--- a/src/usr/hwpf/test/fapiRcTest.C
+++ b/src/usr/hwpf/test/fapiRcTest.C
@@ -650,7 +650,7 @@ uint32_t rcTest12()
l_entries[5].iv_type = fapi::ReturnCode::EI_TYPE_HW_CALLOUT;
l_entries[5].hw_callout.iv_hw = fapi::HwCallouts::MEM_REF_CLOCK;
l_entries[5].hw_callout.iv_calloutPriority = fapi::CalloutPriorities::LOW;
-
+ l_entries[5].hw_callout.iv_refObjIndex = 0xff;
l_rc.addErrorInfo(l_objects, l_entries, 6);
do
diff --git a/src/usr/hwpf/test/hwpftest.H b/src/usr/hwpf/test/hwpftest.H
index 97a51387b..c71e539bb 100644
--- a/src/usr/hwpf/test/hwpftest.H
+++ b/src/usr/hwpf/test/hwpftest.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* COPYRIGHT International Business Machines Corp. 2011,2014 */
/* */
/* p1 */
/* */
@@ -265,6 +265,7 @@ public:
*/
void testHwpf5()
{
+#ifndef __HOSTBOOT_RUNTIME
typedef struct ifScom {
uint64_t addr;
uint64_t origData;
@@ -546,6 +547,7 @@ public:
TS_TRACE("testHwpf5: Unit Test passed. "
"fapiHwpExecInitFile passed.");
}
+#endif
}
/**
@@ -554,6 +556,7 @@ public:
*/
void testHwpf6()
{
+#ifndef __HOSTBOOT_RUNTIME
fapi::ReturnCode l_rc = fapi::FAPI_RC_SUCCESS;
// Get the sys target handle
@@ -640,6 +643,7 @@ public:
}
}
}
+#endif
}
// // unit test breakpoint
@@ -698,6 +702,7 @@ public:
*/
void testHwpf9()
{
+#ifndef __HOSTBOOT_RUNTIME
errlHndl_t l_err = NULL;
// Look for functional DIMMs
@@ -749,6 +754,7 @@ public:
{
TS_TRACE("testHwpf9: No functional DIMMs found, skipping test");
}
+#endif
}
/**
diff --git a/src/usr/hwpf/test/hwpftest.mk b/src/usr/hwpf/test/hwpftest.mk
new file mode 100644
index 000000000..32aa0dc6d
--- /dev/null
+++ b/src/usr/hwpf/test/hwpftest.mk
@@ -0,0 +1,33 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwpf/test/hwpftest.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2011,2014
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/mvpd_accessors
+EXTRAINCDIR += ${ROOTPATH}/src/usr/initservice/istepdispatcher
+
+# CompressedScanData struct needed for getRepairRings()
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build
+
diff --git a/src/usr/hwpf/test/makefile b/src/usr/hwpf/test/makefile
index 374d50af9..508080edc 100644
--- a/src/usr/hwpf/test/makefile
+++ b/src/usr/hwpf/test/makefile
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011,2013
+# COPYRIGHT International Business Machines Corp. 2011,2014
#
# p1
#
@@ -21,19 +21,12 @@
#
# IBM_PROLOG_END_TAG
ROOTPATH = ../../../..
+MODULE = testhwpf
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat
-EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/mvpd_accessors
-EXTRAINCDIR += ${ROOTPATH}/src/usr/initservice/istepdispatcher
-# CompressedScanData struct needed for getRepairRings()
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build
+include hwpftest.mk
-MODULE = testhwpf
TESTS = *.H
+SUBDIRS = runtime.d
include ${ROOTPATH}/config.mk
diff --git a/src/usr/hwpf/test/runtime/makefile b/src/usr/hwpf/test/runtime/makefile
new file mode 100644
index 000000000..e246a928b
--- /dev/null
+++ b/src/usr/hwpf/test/runtime/makefile
@@ -0,0 +1,34 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwpf/test/runtime/makefile $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2011,2014
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+ROOTPATH = ../../../../..
+
+HOSTBOOT_RUNTIME = 1
+MODULE = testhwpf_rt
+
+include ../hwpftest.mk
+
+TESTS = ../fapiattrtest.H ../fapitargettest.H ../fapirctest.H ../hwpftest.H
+# ../hwpMvpdAccessorTest.H ../hwpMBvpdAccessorTest.H
+
+include ${ROOTPATH}/config.mk
+
OpenPOWER on IntegriCloud