diff options
-rw-r--r-- | src/usr/devtree/bld_devtree.C | 12 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types_hb.xml | 19 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/target_types_hb.xml | 1 |
3 files changed, 29 insertions, 3 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 { diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml index c912b455e..eb2f03a08 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml @@ -5,7 +5,7 @@ <!-- --> <!-- OpenPOWER HostBoot Project --> <!-- --> -<!-- Contributors Listed Below - COPYRIGHT 2012,2014 --> +<!-- Contributors Listed Below - COPYRIGHT 2012,2015 --> <!-- [+] Google Inc. --> <!-- [+] International Business Machines Corp. --> <!-- --> @@ -756,4 +756,21 @@ <writeable/> </attribute> +<attribute> + <id>OPAL_MODEL</id> + <description> + Specifies the compatible model name for Opal to key off of. + This is sourced from the MRW and should be of the format + 'vendor,model', e.g. 'tyan,palmetto'. + </description> + <simpleType> + <string> + <default>tyan,palmetto</default><!-- @fixme-RTC:120092 --> + <sizeInclNull>32</sizeInclNull> + </string> + </simpleType> + <persistency>non-volatile</persistency> + <readable/> +</attribute> + </attributes> diff --git a/src/usr/targeting/common/xmltohb/target_types_hb.xml b/src/usr/targeting/common/xmltohb/target_types_hb.xml index cdab85f84..00848bade 100644 --- a/src/usr/targeting/common/xmltohb/target_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/target_types_hb.xml @@ -62,6 +62,7 @@ <attribute><id>OPEN_POWER_N_PLUS_ONE_MAX_MEM_POWER_WATTS</id></attribute> <attribute><id>OPEN_POWER_TURBO_MODE_SUPPORTED</id></attribute> <attribute><id>OCC_CONTROL_DATA</id></attribute> + <attribute><id>OPAL_MODEL</id></attribute> </targetTypeExtension> <targetTypeExtension> |