diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2019-04-30 09:53:44 -0500 |
---|---|---|
committer | Nicholas E. Bofferding <bofferdn@us.ibm.com> | 2019-05-02 13:10:21 -0500 |
commit | eb3c89638a1e1ba41f16af41dbb8538c395529ff (patch) | |
tree | c87f9ff54fff445a5e73f8f6897e40c3d0e94e85 | |
parent | 49d81ec6a770e74cd2a41acb15bcc4efc3434261 (diff) | |
download | talos-hostboot-eb3c89638a1e1ba41f16af41dbb8538c395529ff.tar.gz talos-hostboot-eb3c89638a1e1ba41f16af41dbb8538c395529ff.zip |
Handle DD2.3 mode properly when setting elevated risk in HDAT
When running in native (DD2.3) mode, the value of ATTR_RISK_LEVEL
is always greater than zero. The code needs to handle the higher
values when setting the elevated risk level bit in the HDAT
structures that go up to the OS.
Change-Id: Ib8d9c4f885ad84cf2b0344e38d6e3c74b7c21ef8
CQ: SW464159
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/76728
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Jayashankar Padath <jayashankar.padath@in.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
-rwxr-xr-x | src/usr/hdat/hdatiplparms.C | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/usr/hdat/hdatiplparms.C b/src/usr/hdat/hdatiplparms.C index a22dfbbe2..1f4e3f066 100755 --- a/src/usr/hdat/hdatiplparms.C +++ b/src/usr/hdat/hdatiplparms.C @@ -705,8 +705,16 @@ void HdatIplParms::hdatGetSystemParamters() HDAT_ERR(" Error in getting attribute PAYLOAD_IN_MIRROR_MEM"); } - this->iv_hdatIPLParams->iv_sysParms.hdatSystemAttributes |= - l_pSysTarget->getAttr<ATTR_RISK_LEVEL>() ? HDAT_RISK_LEVEL_ELEVATED : 0 ; + // Check both compat and native mode for relevant risk levels + ATTR_RISK_LEVEL_type l_risk = l_pSysTarget->getAttr<ATTR_RISK_LEVEL>(); + if( !((l_risk == UTIL::P9N22_P9C12_RUGBY_FAVOR_SECURITY) + || (l_risk == UTIL::P9N23_P9C13_NATIVE_SMF_RUGBY_FAVOR_SECURITY)) ) + { + // running in a mode that doesn't favor security, set elevated risk + this->iv_hdatIPLParams->iv_sysParms.hdatSystemAttributes |= + HDAT_RISK_LEVEL_ELEVATED; + } + this->iv_hdatIPLParams->iv_sysParms.hdatSystemAttributes |= l_pSysTarget->getAttr<ATTR_IS_MPIPL_SUPPORTED>() ? HDAT_MPIPL_SUPPORTED : 0 ; |