summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/hwpf/hwp')
-rw-r--r--src/usr/hwpf/hwp/occ/runtime/rt_occ.C34
-rw-r--r--src/usr/hwpf/hwp/pstates/makefile36
-rw-r--r--src/usr/hwpf/hwp/pstates/pstates_common.mk59
-rw-r--r--src/usr/hwpf/hwp/pstates/runtime/makefile38
4 files changed, 135 insertions, 32 deletions
diff --git a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C
index 6d3407677..cb68f46f6 100644
--- a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C
+++ b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C
@@ -140,6 +140,39 @@ namespace RT_OCC
//------------------------------------------------------------------------
+ int htmgt_pass_thru (uint16_t i_cmdLength,
+ uint8_t * i_cmdData,
+ uint16_t * o_rspLength,
+ uint8_t * o_rspData)
+ {
+ int rc = 0;
+#ifdef CONFIG_HTMGT
+ errlHndl_t err = HTMGT::passThruCommand(i_cmdLength, i_cmdData,
+ *o_rspLength, o_rspData);
+ if (err)
+ {
+ rc = err->reasonCode();
+ if (0 == rc)
+ {
+ // If there was a failure, be sure to return non-zero status
+ rc = -1;
+ }
+ if ((i_cmdLength > 0) && (NULL != i_cmdData))
+ {
+ TRACFCOMP (g_fapiTd,ERR_MRK"htmgt_pass_thru: command 0x%02X"
+ " (%d bytes) failed with rc=0x%04X",
+ i_cmdData[0], i_cmdLength, err->reasonCode());
+ }
+ errlCommit (err, HWPF_COMP_ID);
+ }
+#else
+ o_rspLength = 0;
+#endif
+ return rc;
+ }
+
+ //------------------------------------------------------------------------
+
int executeLoadOCC(uint64_t i_homer_addr_phys,
uint64_t i_homer_addr_va,
uint64_t i_common_addr_phys,
@@ -427,6 +460,7 @@ namespace RT_OCC
rt_intf->process_occ_error = &process_occ_error;
rt_intf->process_occ_reset = &process_occ_reset;
rt_intf->enable_occ_actuation = &enable_occ_actuation;
+ rt_intf->mfg_htmgt_pass_thru = &htmgt_pass_thru;
// If we already loaded OCC during the IPL we need to fix up
// the virtual address because we're now not using virtual
diff --git a/src/usr/hwpf/hwp/pstates/makefile b/src/usr/hwpf/hwp/pstates/makefile
index dbfe05529..ef68862cf 100644
--- a/src/usr/hwpf/hwp/pstates/makefile
+++ b/src/usr/hwpf/hwp/pstates/makefile
@@ -27,39 +27,11 @@ ROOTPATH = ../../../../..
MODULE = pstates
-## support for Targeting and 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/include/usr/initservice
+SUBDIRS += runtime.d
-## pointer to common HWP files
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
+# objects common to hostboot and hbrt
+include pstates_common.mk
-## NOTE: add the base istep dir here.
-##@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/@istepname
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/pstates
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe
-## Include sub dirs
-## NOTE: add a new EXTRAINCDIR when you add a new HWP
-##@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/???
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/pstates/pstates
-EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/
-
-
-## NOTE: add new object files when you add a new HWP
-OBJS += gpstCheckByte.o
-OBJS += lab_pstates.o
-OBJS += p8_build_pstate_datablock.o
-OBJS += proc_get_voltage.o
-OBJS += pstates.o
-OBJS += pstate_tables.o
-OBJS += freqVoltageSvc.o
-OBJS += proc_set_max_pstate.o
-
-## NOTE: add a new directory onto the vpaths when you add a new HWP
-##@ VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/???
-VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/pstates/pstates
+# objects unique to hostboot
include ${ROOTPATH}/config.mk
diff --git a/src/usr/hwpf/hwp/pstates/pstates_common.mk b/src/usr/hwpf/hwp/pstates/pstates_common.mk
new file mode 100644
index 000000000..bded93134
--- /dev/null
+++ b/src/usr/hwpf/hwp/pstates/pstates_common.mk
@@ -0,0 +1,59 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwpf/hwp/pstates/pstates_common.mk $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2013,2015
+# [+] 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
+
+## support for Targeting and 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/include/usr/initservice
+
+## pointer to common HWP files
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
+
+## NOTE: add the base istep dir here.
+##@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/@istepname
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/pstates
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/slave_sbe
+## Include sub dirs
+## NOTE: add a new EXTRAINCDIR when you add a new HWP
+##@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/???
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/pstates/pstates
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar/
+
+
+## NOTE: add new object files when you add a new HWP
+OBJS += gpstCheckByte.o
+OBJS += lab_pstates.o
+OBJS += p8_build_pstate_datablock.o
+OBJS += proc_get_voltage.o
+OBJS += pstates.o
+OBJS += pstate_tables.o
+OBJS += freqVoltageSvc.o
+OBJS += proc_set_max_pstate.o
+
+## NOTE: add a new directory onto the vpaths when you add a new HWP
+##@ VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/???
+VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/pstates/pstates
diff --git a/src/usr/hwpf/hwp/pstates/runtime/makefile b/src/usr/hwpf/hwp/pstates/runtime/makefile
new file mode 100644
index 000000000..004996877
--- /dev/null
+++ b/src/usr/hwpf/hwp/pstates/runtime/makefile
@@ -0,0 +1,38 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/hwpf/hwp/pstates/runtime/makefile $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2015
+# [+] 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
+
+HOSTBOOT_RUNTIME = 1
+
+ROOTPATH = ../../../../../..
+VPATH += ../
+
+MODULE = pstates_rt
+
+## Objects unique to HBRT
+
+## Objects common to HBRT and HB IPL
+include ../pstates_common.mk
+
+include ${ROOTPATH}/config.mk
OpenPOWER on IntegriCloud