summaryrefslogtreecommitdiffstats
path: root/src/usr/devtree/bld_devtree.C
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2014-12-19 15:18:46 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-01-09 15:50:02 -0600
commit6a8f7095e72dab0877365666f3c45760f3c9d9e6 (patch)
tree4b8ef8e3f13056c14c3e1b8f04ca7f8e226e3b29 /src/usr/devtree/bld_devtree.C
parentbc4ee7e583fbc9037bb08938eab93b24ba594b19 (diff)
downloadblackbird-hostboot-6a8f7095e72dab0877365666f3c45760f3c9d9e6.tar.gz
blackbird-hostboot-6a8f7095e72dab0877365666f3c45760f3c9d9e6.zip
Add compatible model attribute for Opal
Opal requires a known system name be listed in the compatible model property. This is used for code, whereas the value in OPFR-DR is the user-visible machine type/model. Change-Id: I9a57025e2b0f5ab61cdaa1cfab41a9d9e8d89df3 RTC: 88056 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15028 Tested-by: Jenkins Server Reviewed-by: Dean Sanner <dsanner@us.ibm.com> Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/devtree/bld_devtree.C')
-rw-r--r--src/usr/devtree/bld_devtree.C12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/usr/devtree/bld_devtree.C b/src/usr/devtree/bld_devtree.C
index ca6d6d296..34c884a74 100644
--- a/src/usr/devtree/bld_devtree.C
+++ b/src/usr/devtree/bld_devtree.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2015 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -601,9 +601,15 @@ errlHndl_t bld_fdt_system(devTree * i_dt, bool i_smallTree)
// Nothing to do for small trees currently.
if (!i_smallTree)
{
+ /* Fetch the MRW-defined compatible model from attributes */
+ ATTR_OPAL_MODEL_type l_model = {0};
+ TARGETING::Target* sys = NULL;
+ TARGETING::targetService().getTopLevelTarget(sys);
+ sys->tryGetAttr<TARGETING::ATTR_OPAL_MODEL>(l_model);
/* Add compatibility node */
- i_dt->addPropertyString(rootNode, "compatible", "ibm,powernv");
+ const char* l_compats[] = { "ibm,powernv", l_model, NULL };
+ i_dt->addPropertyStrings(rootNode, "compatible", l_compats);
/* Add system model node */
// Based off of the DR field in the OPFR
@@ -629,6 +635,8 @@ errlHndl_t bld_fdt_system(devTree * i_dt, bool i_smallTree)
{
TRACFCOMP(g_trac_devtree,ERR_MRK" Couldn't get DR size for HUID=0x%.8X",
TARGETING::get_huid(l_pMem));
+ i_dt->addPropertyString(rootNode, "model", "unknown");
+ errlCommit(errhdl, DEVTREE_COMP_ID);
}
else
{
OpenPOWER on IntegriCloud