summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Ploetz <maploetz@us.ibm.com>2014-09-29 11:37:29 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-10-08 10:18:55 -0500
commitc4a67582b9dd4bb233c17dd12100c7f18cd1c6f3 (patch)
treee16ed1f1ba83cdf68764856bc3bf933560dace0a /src
parent48fbeca0d3ddb1077fb84b97592e02f59cbd7eb1 (diff)
downloadblackbird-hostboot-c4a67582b9dd4bb233c17dd12100c7f18cd1c6f3.tar.gz
blackbird-hostboot-c4a67582b9dd4bb233c17dd12100c7f18cd1c6f3.zip
BMC: HCDB support
Called update_hwas_changed_mask on the target passed in, and its children Change-Id: I1d6ae317455b7e7dc48832f54d50150e7c280da5 RTC: 106886 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13652 Tested-by: Jenkins Server Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/hwas/hwasPlat.H37
-rw-r--r--src/usr/hwas/HBconfig5
-rw-r--r--src/usr/hwas/hostbootIstep.C11
-rw-r--r--src/usr/hwas/hwasPlat.C32
4 files changed, 51 insertions, 34 deletions
diff --git a/src/include/usr/hwas/hwasPlat.H b/src/include/usr/hwas/hwasPlat.H
index 7a0361c0d..26781a0be 100644
--- a/src/include/usr/hwas/hwasPlat.H
+++ b/src/include/usr/hwas/hwasPlat.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* [+] 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. */
@@ -23,6 +25,8 @@
#ifndef __HWAS_PLAT_H
#define __HWAS_PLAT_H
+#include <config.h>
+
/**
* @file hwas/hwasPlat.H
* @brief hostboot platform specific HWAS functions
@@ -32,19 +36,6 @@ namespace HWAS
{
/**
- * @brief hwasChangeDetection hostboot function
- *
- * This routine will do 'what is needed' to see if any hardware has
- * changed (ie, look at ECID or serial numbers..)
- *
- * @param none
- *
- * @return errlHndl_t valid errlHndl_t handle if there was an error
- * NULL if no errors;
- */
-errlHndl_t hwasChangeDetection();
-
-/**
* @brief hwasPLDDetection hostboot function
*
* This routine will do 'what is needed' to see if there were any
@@ -56,6 +47,22 @@ errlHndl_t hwasChangeDetection();
*/
bool hwasPLDDetection();
-}
+/**
+ * @brief Wrapper function that updates the bit mask to let consumers
+ * know that a piece of hardware, and its possible children, have changed.
+ *
+ * @param[in] i_target Target of the changed Hardware
+ */
+#ifndef CONFIG_HOST_HCDB_SUPPORT
+inline
+#endif
+void markTargetChanged(TARGETING::TargetHandle_t i_target)
+#ifdef CONFIG_HOST_HCDB_SUPPORT
+ ;
+#else
+ {};
+#endif
+
+} // namespace HWAS
#endif // __HWAS_PLAT_H
diff --git a/src/usr/hwas/HBconfig b/src/usr/hwas/HBconfig
index d41516809..5fd8b798c 100644
--- a/src/usr/hwas/HBconfig
+++ b/src/usr/hwas/HBconfig
@@ -8,3 +8,8 @@ config NO_GARD_SUPPORT
help
Skip guarding when set
+config HOST_HCDB_SUPPORT
+ default n
+ depends on CVPD_READ_FROM_HW || MVPD_READ_FROM_HW || DJVPD_READ_FROM_HW
+ help
+ Hostboot will detect hardware changes
diff --git a/src/usr/hwas/hostbootIstep.C b/src/usr/hwas/hostbootIstep.C
index 6b01b28fd..5de7a739e 100644
--- a/src/usr/hwas/hostbootIstep.C
+++ b/src/usr/hwas/hostbootIstep.C
@@ -128,17 +128,6 @@ void* host_discover_targets( void *io_pArgs )
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "Normal IPL mode");
errl = discoverTargets();
-
- // also if SP doesn't support change detection, call
- // function to do it here.
- if (!errl &&
- !l_pTopLevel->getAttr<ATTR_SP_FUNCTIONS>()
- .hardwareChangeDetection)
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "calling hwasChangeDetection");
- errl = hwasChangeDetection();
- }
}
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
diff --git a/src/usr/hwas/hwasPlat.C b/src/usr/hwas/hwasPlat.C
index 6525401ad..689ba54f0 100644
--- a/src/usr/hwas/hwasPlat.C
+++ b/src/usr/hwas/hwasPlat.C
@@ -47,6 +47,7 @@
#include <targeting/common/utilFilter.H>
#include <fsi/fsiif.H>
#include <config.h>
+#include <targeting/common/targetservice.H>
namespace HWAS
{
@@ -477,19 +478,34 @@ bool hwasPLDDetection()
return rc;
} // hwasPLDDetection
-
//******************************************************************************
-// hwasChangeDetection function
+// markTargetChanged function
//******************************************************************************
-errlHndl_t hwasChangeDetection()
+#ifdef CONFIG_HOST_HCDB_SUPPORT
+void markTargetChanged(TARGETING::TargetHandle_t i_target)
{
- errlHndl_t errl = NULL;
+ TargetHandleList l_pChildList;
- // TODO: RTC: 70460
- HWAS_DBG("hwasChangeDetection");
+ HWAS_INF("Marking target and all children as changed for parent HUID %.8X",
+ TARGETING::get_huid(i_target) );
- return errl;
-} // hwasChangeDetection
+ //Call update mask on the target
+ update_hwas_changed_mask(i_target);
+
+ //Get all children under this target, and set them into the list
+ targetService().getAssociated(l_pChildList, i_target,
+ TargetService::CHILD, TargetService::ALL);
+
+ //Iterate through the child list that was populated, and update mask
+ for (TargetHandleList::iterator l_pChild_it = l_pChildList.begin();
+ l_pChild_it != l_pChildList.end(); ++l_pChild_it)
+ {
+ TargetHandle_t l_pChild = *l_pChild_it;
+ update_hwas_changed_mask(l_pChild);
+ }
+
+} // markTargetChanged
+#endif
//******************************************************************************
// platCheckMinimumHardware()
OpenPOWER on IntegriCloud