summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndres Lugo <aalugore@us.ibm.com>2015-02-04 13:08:33 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-02-20 07:30:42 -0600
commit840f51601c3a261b838d4bc1f83f4fbb3379bff8 (patch)
tree3735ade1cba2bafcfcd3e02bf2e808c783e0b0ea /src
parent27809d56544caa11f43b21321a519c5bd9014054 (diff)
downloadblackbird-hostboot-840f51601c3a261b838d4bc1f83f4fbb3379bff8.tar.gz
blackbird-hostboot-840f51601c3a261b838d4bc1f83f4fbb3379bff8.zip
OpenPOWER support to set PROC_BOOT_VOLTAGE_VID
Change-Id: I18c31e0580ca7044e999326b1c994edbfb305c11 RTC:121693 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15645 Tested-by: Jenkins Server Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/isteps/istep06list.H2
-rw-r--r--src/makefile3
-rw-r--r--src/usr/hwpf/hwp/pstates/makefile10
-rw-r--r--src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.C42
-rw-r--r--src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.H25
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/slave_sbe.C93
-rw-r--r--src/usr/hwpf/hwp/slave_sbe/slave_sbe.H13
-rw-r--r--src/usr/vpd/makefile9
8 files changed, 158 insertions, 39 deletions
diff --git a/src/include/usr/isteps/istep06list.H b/src/include/usr/isteps/istep06list.H
index c77eb56fc..6adb784d9 100644
--- a/src/include/usr/isteps/istep06list.H
+++ b/src/include/usr/isteps/istep06list.H
@@ -159,9 +159,7 @@ const DepModInfo g_istep06Dependancies = {
DEP_LIB(libslave_sbe.so),
DEP_LIB(libsbe.so),
DEP_LIB(libporeve.so),
-#ifdef CONFIG_HTMGT
DEP_LIB(libpstates.so),
-#endif
NULL
}
};
diff --git a/src/makefile b/src/makefile
index 767cc1952..97dbc3e39 100644
--- a/src/makefile
+++ b/src/makefile
@@ -162,8 +162,7 @@ EXTENDED_MODULES += secureboot_ext
EXTENDED_MODULES += devtree
EXTENDED_MODULES += sbe
EXTENDED_MODULES += proc_hwreconfig
-
-EXTENDED_MODULES += $(if $(CONFIG_HTMGT)$(CONFIG_SET_NOMINAL_PSTATE),pstates)
+EXTENDED_MODULES += pstates
EXTENDED_MODULES += $(if $(CONFIG_HTMGT),htmgt)
EXTENDED_MODULES += $(if $(CONFIG_GPIODD),gpio,)
EXTENDED_MODULES += $(if $(CONFIG_CONSOLE),console)
diff --git a/src/usr/hwpf/hwp/pstates/makefile b/src/usr/hwpf/hwp/pstates/makefile
index 21a98b899..dbfe05529 100644
--- a/src/usr/hwpf/hwp/pstates/makefile
+++ b/src/usr/hwpf/hwp/pstates/makefile
@@ -5,9 +5,9 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2013,2014
-# [+] International Business Machines Corp.
+# Contributors Listed Below - COPYRIGHT 2013,2015
# [+] Google Inc.
+# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -32,6 +32,7 @@ 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
@@ -39,7 +40,7 @@ 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/???
@@ -54,8 +55,7 @@ OBJS += p8_build_pstate_datablock.o
OBJS += proc_get_voltage.o
OBJS += pstates.o
OBJS += pstate_tables.o
-OBJS += $(if $(CONFIG_SET_NOMINAL_PSTATE)$(CONFIG_HTMGT),freqVoltageSvc.o)
-
+OBJS += freqVoltageSvc.o
OBJS += proc_set_max_pstate.o
## NOTE: add a new directory onto the vpaths when you add a new HWP
diff --git a/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.C b/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.C
index cfda8a083..c690d1568 100644
--- a/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.C
+++ b/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -43,12 +43,14 @@
#include <fapiPlatHwpInvoker.H>
#include <hwpf/fapi/fapiMvpdAccess.H>
#include <hwpf/hwpf_reasoncodes.H>
+#include <slave_sbe.H>
#include <p8_build_pstate_datablock.H>
#include <proc_get_voltage.H>
#include <pstates.h>
#include <targeting/common/commontargeting.H>
#include <targeting/common/utilFilter.H>
#include <vpd/mvpdenums.H>
+#include <initserviceif.H>
extern trace_desc_t* g_fapiTd;
@@ -362,35 +364,55 @@ namespace FREQVOLTSVC
// FREQVOLTSVC::runProcGetVoltage
//**************************************************************************
errlHndl_t runProcGetVoltage(
- const TARGETING::Target * i_procChip,
- const uint32_t i_bootFreqMhz,
- uint8_t & o_vdd_vid,
- uint8_t & o_vcs_vid)
+ TARGETING::Target * io_procChip,
+ const uint32_t i_bootFreqMhz)
{
+ TRACDCOMP(g_fapiTd,INFO_MRK"Enter runProcGetVoltage");
+
+ uint8_t l_vdd_vid = 0;
+ uint8_t l_vcs_vid = 0;
+
errlHndl_t l_err = NULL;
+ TARGETING::ATTR_BOOT_VOLTAGE_type l_boot_voltage_info =
+ PROC_BOOT_VOLT_PORT0_ENABLE;
- TRACFCOMP(g_fapiTd,INFO_MRK"i_bootFreqMhz: 0x%08X",i_bootFreqMhz);
+ TRACDCOMP(g_fapiTd,INFO_MRK"i_bootFreqMhz: 0x%08X",i_bootFreqMhz);
// Assert on NULL input target
- assert(i_procChip != NULL);
+ // If the target is NULL, we have NO functional PROCS.
+ // Terminate IPL
+ assert(io_procChip != NULL);
// convert to fapi target
fapi::Target l_fapiProcChip(fapi::TARGET_TYPE_PROC_CHIP,
reinterpret_cast<void *>
- (const_cast<TARGETING::Target*>(i_procChip)));
+ (const_cast<TARGETING::Target*>(io_procChip)));
// Invoke HW procedure
FAPI_INVOKE_HWP(l_err, proc_get_voltage,l_fapiProcChip,i_bootFreqMhz,
- o_vdd_vid,o_vcs_vid);
+ l_vdd_vid,l_vcs_vid);
if( l_err != NULL)
{
TRACFCOMP( g_fapiTd,ERR_MRK"Error from HWP: proc_get_voltage: "
"i_bootFreq: 0x%08X, "
"HUID: 0x%08X", i_bootFreqMhz,
- i_procChip->getAttr<TARGETING::ATTR_HUID>());
+ io_procChip->getAttr<TARGETING::ATTR_HUID>());
}
+ TRACDCOMP("Vdd: 0x%02x, vcs: 0x%02x", l_vdd_vid, l_vcs_vid);
+
+ // create boot voltage value
+ l_boot_voltage_info |= ( ( static_cast<uint32_t>(l_vdd_vid) <<
+ PROC_BOOT_VOLT_VDD_SHIFT) & ( PROC_BOOT_VOLT_VDD_MASK ) );
+ l_boot_voltage_info |= ( ( static_cast<uint32_t>(l_vcs_vid) <<
+ PROC_BOOT_VOLT_VCS_SHIFT) & ( PROC_BOOT_VOLT_VDD_MASK ) );
+
+ // set ATTR_PROC_BOOT_VOLTAGE_VID
+ io_procChip->setAttr<
+ TARGETING::ATTR_PROC_BOOT_VOLTAGE_VID>( l_boot_voltage_info );
+
+
return l_err;
}
diff --git a/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.H b/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.H
index 183f7be9e..b8f047b29 100644
--- a/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.H
+++ b/src/usr/hwpf/hwp/pstates/pstates/freqVoltageSvc.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -40,6 +40,17 @@
namespace FREQVOLTSVC
{
+
+/**
+ * @brief - Constants used to calculate boot voltage value and set
+ * ATTR_PROC_BOOT_VOLTAGE_VID attribute.
+ */
+static const uint32_t PROC_BOOT_VOLT_PORT0_ENABLE = 0x80000000;
+static const uint8_t PROC_BOOT_VOLT_VDD_SHIFT = 16;
+static const uint8_t PROC_BOOT_VOLT_VCS_SHIFT = 8;
+static const uint32_t PROC_BOOT_VOLT_VDD_MASK = 0x00ff0000;
+static const uint32_t PROC_BOOT_VOLT_VCS_MASK = 0x0000ff00;
+
/**
* @brief Set system frequency attribute
*
@@ -81,24 +92,18 @@ namespace FREQVOLTSVC
* This function is wrapper for executing proc_get_voltage
* HW procedure.
*
- * @param[in] i_procChip
+ * @param[in] io_procChip
* Valid functional Processor Chip target pointer
* @param[in] i_bootFreqMhz
* Boot Frequency in MHZ
- * @param[out] o_vdd_vid
- * On success, holds VDD value
- * @param[out] o_vcs_vid
- * On success, holds VCS value
*
* @return Error log handle indicating the status of the request
*
* @retval NULL Successfully retrieved boot voltage data
* @retval !NULL Failed to get boot voltage, ignore output
*/
- errlHndl_t runProcGetVoltage(const TARGETING::Target * i_procChip,
- const uint32_t i_bootFreqMhz,
- uint8_t & o_vdd_vid,
- uint8_t & o_vcs_vid);
+ errlHndl_t runProcGetVoltage(TARGETING::Target * io_procChip,
+ const uint32_t i_bootFreqMhz);
/**
* @brief Get system frequency
diff --git a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C
index 63717dce6..49225a4aa 100644
--- a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C
+++ b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C
@@ -35,7 +35,6 @@
// Includes
/******************************************************************************/
#include <stdint.h>
-
#include <trace/interface.H>
#include <initservice/taskargs.H>
#include <errl/errlentry.H>
@@ -49,8 +48,8 @@
// targeting support
#include <targeting/common/commontargeting.H>
#include <targeting/common/utilFilter.H>
-#include <targeting/namedtarget.H>
-#include <targeting/attrsync.H>
+#include <targeting/namedtarget.H>
+#include <targeting/attrsync.H>
#include <hwpisteperror.H>
#include <errl/errludtarget.H>
@@ -137,8 +136,8 @@ void* call_proc_revert_sbe_mcs_setup(void *io_pArgs)
//******************************************************************************
void* call_host_slave_sbe_config(void *io_pArgs)
{
+ errlHndl_t l_errl = NULL;
IStepError l_stepError;
-
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_slave_sbe_config entry" );
@@ -147,7 +146,7 @@ void* call_host_slave_sbe_config(void *io_pArgs)
#ifdef CONFIG_HTMGT
// Set system frequency attributes
- errlHndl_t l_errl = FREQVOLTSVC::setSysFreq();
+ l_errl = FREQVOLTSVC::setSysFreq();
if (l_errl )
{
// Create IStep error log and cross reference error that occurred
@@ -158,14 +157,98 @@ void* call_host_slave_sbe_config(void *io_pArgs)
}
#endif // CONFIG_HTMGT
+ // If there is no FSP, set ATTR_PROC_BOOT_VOLTAGE_VID
+
+ if (!INITSERVICE::spBaseServicesEnabled())
+ {
+ l_errl = set_proc_boot_voltage_vid();
+ if( l_errl )
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "Error setting PROC_BOOT_VOLTAGE_VID: "
+ "slave_sbe.C::call_host_slave_sbe_config()");
+ // Create IStep error log
+ l_stepError.addErrorDetails( l_errl );
+
+ // Commit Error
+ errlCommit( l_errl, HWPF_COMP_ID );
+
+ }
+ }
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_slave_sbe_config exit" );
+
+
// end task, returning any errorlogs to IStepDisp
return l_stepError.getErrorHandle();
}
+
+//******************************************************************************
+// set_proc_boot_voltage_vid
+//******************************************************************************
+errlHndl_t set_proc_boot_voltage_vid()
+{
+ errlHndl_t l_errl = NULL;
+ IStepError l_stepError;
+ TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ENTER set_proc_boot_voltage_vid()");
+ do
+ {
+ // Get the top level target/system target
+ Target* l_pTopLevelTarget = NULL;
+ targetService().getTopLevelTarget(l_pTopLevelTarget);
+
+ // If there is no top level target, terminate
+ assert(l_pTopLevelTarget, "ERROR: Top level "
+ "target not found - slave_sbe.C::set_proc_boot_voltage_vid");
+
+ // Get all Procs
+ PredicateCTM l_proc(CLASS_CHIP, TYPE_PROC);
+ PredicateIsFunctional l_functional;
+ PredicatePostfixExpr l_procs;
+
+ l_procs.push(&l_proc).push(&l_functional).And();
+
+ TargetRangeFilter l_filter( targetService().begin(),
+ targetService().end(),
+ &l_procs);
+
+ ATTR_BOOT_FREQ_MHZ_type l_boot_freq_mhz =
+ l_pTopLevelTarget->getAttr<ATTR_BOOT_FREQ_MHZ>();
+ for(; l_filter; ++l_filter)
+ {
+
+ l_errl = FREQVOLTSVC::runProcGetVoltage(*l_filter,
+ l_boot_freq_mhz);
+ if( l_errl )
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR: calling runProcGetVoltage for Proc "
+ "Target HUID[0x%08X]",
+ l_filter->getAttr<ATTR_HUID>());
+
+
+ // Deconfig the processor
+ l_errl->addHwCallout(*l_filter,
+ HWAS::SRCI_PRIORITY_LOW,
+ HWAS::DECONFIG,
+ HWAS::GARD_NULL);
+
+
+ // Commit error log
+ errlCommit( l_errl, HWPF_COMP_ID );
+ }
+ }
+
+
+ }while( 0 );
+ return l_errl;
+}
+
+
//******************************************************************************
// call_host_sbe_start function
//******************************************************************************
diff --git a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H
index 28d5c2052..ccb5733be 100644
--- a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H
+++ b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,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. */
@@ -95,6 +97,15 @@ void* call_proc_revert_sbe_mcs_setup(void *io_pArgs);
*/
void* call_host_slave_sbe_config(void *io_pArgs);
+
+/**
+ * @brief set_proc_voltage_vid - sets ATTR_PROC_BOOT_VOLTAGE_VID
+ *
+ * return error logs
+ */
+errlHndl_t set_proc_boot_voltage_vid();
+
+
/**
* @brief host_sbe_start
*
diff --git a/src/usr/vpd/makefile b/src/usr/vpd/makefile
index 781a2f654..cd7299257 100644
--- a/src/usr/vpd/makefile
+++ b/src/usr/vpd/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2013,2014
+# Contributors Listed Below - COPYRIGHT 2013,2015
# [+] International Business Machines Corp.
#
#
@@ -38,9 +38,10 @@ SUBDIRS += runtime.d
BINARY_FILES = $(IMGDIR)/dimmspd.dat:3a9f53e3684e57401ed0aed75f25980fca99f40b
-#Update to Murano DD2.1 for CCIN 54E6
-BINARY_FILES += $(IMGDIR)/procmvpd.dat:c510eda768a9e3921ff957b549574507fd5c9ce9
-BINARY_FILES += $(IMGDIR)/procmvpd_ven.dat:683bdae079c2e2708ffda655dbd849f14a16f816
+#Update mvpd to include LRPx records for all possible cores CCIN 54E3
+BINARY_FILES += $(IMGDIR)/procmvpd.dat:254c30077a002ccdaca3b34c50abcafbf5ae3e48
+BINARY_FILES += $(IMGDIR)/procmvpd_ven.dat:dd8507bec946283260f82af212ed32feaeb3363a
+
#Update to Centaur DD2.0 for CCIN 31E8
BINARY_FILES += $(IMGDIR)/cvpd.dat:2e33352ca95279b992927336567adf960dca7d46
OpenPOWER on IntegriCloud