Skip to content

Commit 0ebe8be

Browse files
ploetzmadcrowell77
authored andcommitted
Add manufacturing mode to the devtree
Change-Id: I86cf60ea88c57b1676570ce266de81fb4639cd73 CQ:SW360496 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27525 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Christopher J. Engel <cjengel@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
1 parent 130dc89 commit 0ebe8be

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/usr/devtree/bld_devtree.C

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,6 +2335,27 @@ errlHndl_t bld_fdt_secureboot(devTree * i_dt, bool i_smallTree)
23352335
return errhdl;
23362336
}
23372337

2338+
void bld_fdt_mnfgMode(devTree * i_dt, bool i_smallTree)
2339+
{
2340+
// Nothing to do for small trees currently.
2341+
if (i_smallTree) { return; }
2342+
2343+
// Get manufacturing mode flags
2344+
TARGETING::Target* l_pTopLevel = NULL;
2345+
TARGETING::targetService().getTopLevelTarget(l_pTopLevel);
2346+
TARGETING::ATTR_MNFG_FLAGS_type l_mnfgFlags =
2347+
l_pTopLevel->getAttr<TARGETING::ATTR_MNFG_FLAGS>();
2348+
// @todo RTC 118752 Use generic mfg-mode attr when available
2349+
if (l_mnfgFlags & TARGETING::MNFG_FLAG_SRC_TERM)
2350+
{
2351+
// Find the / node and add a manufacturing mode node under it.
2352+
dtOffset_t rootNode = i_dt->findNode("/");
2353+
2354+
i_dt->addProperty(rootNode, "ibm,manufacturing-mode");
2355+
}
2356+
return;
2357+
}
2358+
23382359
errlHndl_t build_flatdevtree( uint64_t i_dtAddr, size_t i_dtSize,
23392360
bool i_smallTree )
23402361
{
@@ -2405,6 +2426,10 @@ errlHndl_t build_flatdevtree( uint64_t i_dtAddr, size_t i_dtSize,
24052426
{
24062427
break;
24072428
}
2429+
2430+
TRACFCOMP( g_trac_devtree, "---devtree mnfg mode ---" );
2431+
bld_fdt_mnfgMode(dt, i_smallTree);
2432+
24082433
}while(0);
24092434

24102435
return errhdl;

0 commit comments

Comments
 (0)