diff options
author | Jayashankar Padath <jayashankar.padath@in.ibm.com> | 2019-02-20 08:52:46 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-03-05 08:41:02 -0600 |
commit | 596bde3e93f33fadbce28719c960a1168bbe895e (patch) | |
tree | 59d05bbfdc6a72ea5ba4f9b6138750e5df9e5d19 /src/usr/hdat | |
parent | 3452fbd959890a33371a3314412265d7d2b516d0 (diff) | |
download | talos-hostboot-596bde3e93f33fadbce28719c960a1168bbe895e.tar.gz talos-hostboot-596bde3e93f33fadbce28719c960a1168bbe895e.zip |
HDAT : Support of new Rugby values in P9N systems
Change-Id: Iccec2894c30f503a68ae7be6b48debcb5797462b
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72185
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sampa Misra <sampmisr@in.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/hdat')
-rwxr-xr-x | src/usr/hdat/hdatiplparms.C | 39 | ||||
-rwxr-xr-x | src/usr/hdat/hdatiplparms.H | 185 |
2 files changed, 174 insertions, 50 deletions
diff --git a/src/usr/hdat/hdatiplparms.C b/src/usr/hdat/hdatiplparms.C index b6e867fcf..a22dfbbe2 100755 --- a/src/usr/hdat/hdatiplparms.C +++ b/src/usr/hdat/hdatiplparms.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -550,8 +550,8 @@ static void hdatGetFeatureFlagInfo( assert(l_pSysTarget != NULL); } - // Default the dd level to 2.2 - uint8_t l_ddLevel = HDAT_PROC_NIMBUS_DD_22; + // Default the dd level to 2.3 + uint8_t l_ddLevel = HDAT_PROC_NIMBUS_DD_23; const hdatIplpFeatureFlagSetting_t * l_featFlagArr; uint32_t l_featFlagArrSize = 0; uint8_t l_riskLvl = 0; @@ -563,24 +563,33 @@ static void hdatGetFeatureFlagInfo( // DD level is set l_ddLevel = l_pvr.getDDLevel(); - // Default to Nimbus DD2.2 settings (DD1.0 doesn't matter) and these are - // current settings for cumulus - // Default to DD2 flag struct index. - uint8_t l_idx = 2; - l_featFlagArr = hdatIplpFeatureFlagSettingsArray[l_riskLvl][l_idx]; + // Default to Nimbus DD2.3 + uint8_t l_ddLvlIdx = 2; + l_featFlagArr = hdatIplpFeatureFlagSettingsArray[l_riskLvl][l_ddLvlIdx]; l_featFlagArrSize = - sizeof(hdatIplpFeatureFlagSettingsArray[l_riskLvl][l_idx]); + sizeof(hdatIplpFeatureFlagSettingsArray[l_riskLvl][l_ddLvlIdx]); - // Modify for Nimubs DD2.0 and DD2.1 + // Set the value based on DD level and risk level if (l_pvr.chipType == PVR_t::NIMBUS_CHIP) { - if (l_ddLevel == HDAT_PROC_NIMBUS_DD_20) {l_idx = 0;} - else if (l_ddLevel == HDAT_PROC_NIMBUS_DD_21) {l_idx = 1;} - else if (l_ddLevel == HDAT_PROC_NIMBUS_DD_22) {l_idx = 2;} + if ( (l_ddLevel == HDAT_PROC_NIMBUS_DD_20) || + (l_ddLevel == HDAT_PROC_NIMBUS_DD_21) + ) + { + l_ddLvlIdx = HDAT_NIMBUS_DD_20_21_IDX; + } + else if (l_ddLevel == HDAT_PROC_NIMBUS_DD_22) + { + l_ddLvlIdx = HDAT_NIMBUS_DD_22_IDX; + } + else if (l_ddLevel == HDAT_PROC_NIMBUS_DD_23) + { + l_ddLvlIdx = HDAT_NIMBUS_DD_23_IDX; + } - l_featFlagArr = hdatIplpFeatureFlagSettingsArray[l_riskLvl][l_idx]; + l_featFlagArr = hdatIplpFeatureFlagSettingsArray[l_riskLvl][l_ddLvlIdx]; l_featFlagArrSize = - sizeof(hdatIplpFeatureFlagSettingsArray[l_riskLvl][l_idx]); + sizeof(hdatIplpFeatureFlagSettingsArray[l_riskLvl][l_ddLvlIdx]); } HDAT_DBG("Feature flag array size:0x%x, Model:0x%x, DD Level:0x%x " diff --git a/src/usr/hdat/hdatiplparms.H b/src/usr/hdat/hdatiplparms.H index 0f27e0560..86eb4ad5f 100755 --- a/src/usr/hdat/hdatiplparms.H +++ b/src/usr/hdat/hdatiplparms.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -265,9 +265,9 @@ struct hdatPortCodes_t } __attribute__ ((packed)); #define MAX_FEATURE_FLAGS 64 // Maximum number of feature flags -#define NUM_RISK_LEVELS 3 // 0,1,2 -#define NUM_OF_DD_LVLS 3 // DD2.0,2.1,2.2 -#define NUM_FF_FLAGS 15 +#define NUM_RISK_LEVELS 6 // 0, 1, 2, 3, 4, 5 +#define NUM_OF_DD_LVLS 3 // DD2.0/2.1, 2.2, 2.3 +#define NUM_FF_FLAGS 18 enum HDAT_FEATURE_FLAG_VERSION : uint32_t { @@ -277,6 +277,10 @@ enum HDAT_FEATURE_FLAG_VERSION : uint32_t const uint8_t HDAT_PROC_NIMBUS_DD_20 = 0x20; const uint8_t HDAT_PROC_NIMBUS_DD_21 = 0x21; const uint8_t HDAT_PROC_NIMBUS_DD_22 = 0x22; +const uint8_t HDAT_PROC_NIMBUS_DD_23 = 0x23; +const uint8_t HDAT_NIMBUS_DD_20_21_IDX = 0; +const uint8_t HDAT_NIMBUS_DD_22_IDX = 1; +const uint8_t HDAT_NIMBUS_DD_23_IDX = 2; struct hdatIplpFeatureFlagSetting_t { @@ -289,45 +293,51 @@ struct hdatIplpFeatureFlagSetting_t const hdatIplpFeatureFlagSetting_t hdatIplpFeatureFlagSettingsArray[NUM_RISK_LEVELS][NUM_OF_DD_LVLS][NUM_FF_FLAGS]= { -{ //RISK 0 (AIX/Linux/IBMi) { -// Risk Level 0 , DD2.0 +// Risk Level 0 , compat mode, nimbus DD2.0 / nimbus DD2.1 +{ {"tm-suspend-mode", 0x0000000000000000}, {"inst-spec-barrier-ori31,31,0", 0x8000000000000000}, -{"fw-bcctrl-serialized", 0x8000000000000000}, +{"fw-bcctrl-serialized", 0x0000000000000000}, {"inst-l1d-flush-ori30,30,0", 0x0000000000000000}, {"inst-l1d-flush-trig2", 0x0000000000000000}, {"fw-l1d-thread-split", 0x8000000000000000}, {"fw-branch-hints-honored", 0x8000000000000000}, {"inst-thread-reconfig-control-trig0-1", 0x0000000000000000}, -{"fw-count-cache-disabled", 0x0000000000000000}, +{"fw-count-cache-disabled", 0x8000000000000000}, {"fw-ltptr-serialized", 0x0000000000000000}, +{"fw-count-cache-flush-bcctr2,0,0", 0x0000000000000000}, {"speculation-policy-favor-security", 0x8000000000000000}, -{"user-mode-branch-speculation", 0x0000000000000000}, +{"user-mode-branch-speculation", 0x8000000000000000}, {"needs-l1d-flush-msr-hv-1-to-0", 0x8000000000000000}, {"needs-l1d-flush-msr-pr-0-to-1", 0x8000000000000000}, -{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}}, +{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}, +{"needs-pmu-restricted", 0x0000000000000000}, +{"needs-count-cache-flush-on-context-switch", 0x0000000000000000}}, -// Risk Level 0 , DD2.1 +// Risk Level 0 , compat mode , nimbus DD 2.2 { -{"tm-suspend-mode", 0x0000000000000000}, +{"tm-suspend-mode", 0x8000000000000000}, {"inst-spec-barrier-ori31,31,0", 0x8000000000000000}, -{"fw-bcctrl-serialized", 0x8000000000000000}, +{"fw-bcctrl-serialized", 0x0000000000000000}, {"inst-l1d-flush-ori30,30,0", 0x0000000000000000}, -{"inst-l1d-flush-trig2", 0x0000000000000000}, +{"inst-l1d-flush-trig2", 0x8000000000000000}, {"fw-l1d-thread-split", 0x8000000000000000}, {"fw-branch-hints-honored", 0x8000000000000000}, {"inst-thread-reconfig-control-trig0-1", 0x0000000000000000}, -{"fw-count-cache-disabled", 0x0000000000000000}, +{"fw-count-cache-disabled", 0x8000000000000000}, {"fw-ltptr-serialized", 0x0000000000000000}, +{"fw-count-cache-flush-bcctr2,0,0", 0x0000000000000000}, {"speculation-policy-favor-security", 0x8000000000000000}, {"user-mode-branch-speculation", 0x0000000000000000}, {"needs-l1d-flush-msr-hv-1-to-0", 0x8000000000000000}, {"needs-l1d-flush-msr-pr-0-to-1", 0x8000000000000000}, -{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}}, +{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}, +{"needs-pmu-restricted", 0x0000000000000000}, +{"needs-count-cache-flush-on-context-switch", 0x0000000000000000}}, -// Risk Level 0 , DD2.2 +// Risk Level 0 , compat mode , nimbus DD 2.3 { {"tm-suspend-mode", 0x8000000000000000}, {"inst-spec-barrier-ori31,31,0", 0x8000000000000000}, @@ -339,16 +349,20 @@ const hdatIplpFeatureFlagSetting_t hdatIplpFeatureFlagSettingsArray[NUM_RISK_LEV {"inst-thread-reconfig-control-trig0-1", 0x0000000000000000}, {"fw-count-cache-disabled", 0x8000000000000000}, {"fw-ltptr-serialized", 0x0000000000000000}, +{"fw-count-cache-flush-bcctr2,0,0", 0x0000000000000000}, {"speculation-policy-favor-security", 0x8000000000000000}, {"user-mode-branch-speculation", 0x0000000000000000}, {"needs-l1d-flush-msr-hv-1-to-0", 0x8000000000000000}, {"needs-l1d-flush-msr-pr-0-to-1", 0x8000000000000000}, -{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}} +{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}, +{"needs-pmu-restricted", 0x0000000000000000}, +{"needs-count-cache-flush-on-context-switch", 0x0000000000000000}}, +// End of Risk Level 0 }, //RISK 1 (AIX/Linux) { -// Risk Level 1 , DD2.0 +// Risk Level 1 , compat mode , nimbus DD 2.0 / nimbus DD 2.1 { {"tm-suspend-mode", 0x0000000000000000}, {"inst-spec-barrier-ori31,31,0", 0x8000000000000000}, @@ -360,31 +374,36 @@ const hdatIplpFeatureFlagSetting_t hdatIplpFeatureFlagSettingsArray[NUM_RISK_LEV {"inst-thread-reconfig-control-trig0-1", 0x0000000000000000}, {"fw-count-cache-disabled", 0x0000000000000000}, {"fw-ltptr-serialized", 0x0000000000000000}, +{"fw-count-cache-flush-bcctr2,0,0", 0x0000000000000000}, {"speculation-policy-favor-security", 0x8000000000000000}, {"user-mode-branch-speculation", 0x0000000000000000}, {"needs-l1d-flush-msr-hv-1-to-0", 0x8000000000000000}, {"needs-l1d-flush-msr-pr-0-to-1", 0x8000000000000000}, -{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}}, +{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}, +{"needs-pmu-restricted", 0x0000000000000000}, +{"needs-count-cache-flush-on-context-switch", 0x0000000000000000}}, -// Risk Level 1 , DD2.1 +// Risk Level 1 , compat mode , nimbus DD 2.2 { -{"tm-suspend-mode", 0x0000000000000000}, +{"tm-suspend-mode", 0x8000000000000000}, {"inst-spec-barrier-ori31,31,0", 0x8000000000000000}, {"fw-bcctrl-serialized", 0x8000000000000000}, {"inst-l1d-flush-ori30,30,0", 0x0000000000000000}, -{"inst-l1d-flush-trig2", 0x0000000000000000}, +{"inst-l1d-flush-trig2", 0x8000000000000000}, {"fw-l1d-thread-split", 0x8000000000000000}, {"fw-branch-hints-honored", 0x8000000000000000}, {"inst-thread-reconfig-control-trig0-1", 0x0000000000000000}, {"fw-count-cache-disabled", 0x0000000000000000}, {"fw-ltptr-serialized", 0x0000000000000000}, +{"fw-count-cache-flush-bcctr2,0,0", 0x0000000000000000}, {"speculation-policy-favor-security", 0x8000000000000000}, -{"user-mode-branch-speculation", 0x0000000000000000}, +{"user-mode-branch-speculation", 0x8000000000000000}, {"needs-l1d-flush-msr-hv-1-to-0", 0x8000000000000000}, {"needs-l1d-flush-msr-pr-0-to-1", 0x8000000000000000}, -{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}}, - -// Risk Level 1 , DD2.2 +{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}, +{"needs-pmu-restricted", 0x0000000000000000}, +{"needs-count-cache-flush-on-context-switch", 0x0000000000000000}}, +// Risk Level 1 , compat mode , nimbus DD 2.3 { {"tm-suspend-mode", 0x8000000000000000}, {"inst-spec-barrier-ori31,31,0", 0x8000000000000000}, @@ -396,16 +415,20 @@ const hdatIplpFeatureFlagSetting_t hdatIplpFeatureFlagSettingsArray[NUM_RISK_LEV {"inst-thread-reconfig-control-trig0-1", 0x0000000000000000}, {"fw-count-cache-disabled", 0x0000000000000000}, {"fw-ltptr-serialized", 0x0000000000000000}, +{"fw-count-cache-flush-bcctr2,0,0", 0x0000000000000000}, {"speculation-policy-favor-security", 0x8000000000000000}, {"user-mode-branch-speculation", 0x8000000000000000}, {"needs-l1d-flush-msr-hv-1-to-0", 0x8000000000000000}, {"needs-l1d-flush-msr-pr-0-to-1", 0x8000000000000000}, -{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}} +{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}, +{"needs-pmu-restricted", 0x0000000000000000}, +{"needs-count-cache-flush-on-context-switch", 0x0000000000000000}}, +// End of Risk Level 1 }, //RISK 2 (No Security) { -// Risk Level 2, DD2.0 +// Risk Level 2 , compat mode , nimbus DD 2.0 / nimbus DD 2.1 { {"tm-suspend-mode", 0x0000000000000000}, {"inst-spec-barrier-ori31,31,0", 0x0000000000000000}, @@ -417,15 +440,39 @@ const hdatIplpFeatureFlagSetting_t hdatIplpFeatureFlagSettingsArray[NUM_RISK_LEV {"inst-thread-reconfig-control-trig0-1", 0x0000000000000000}, {"fw-count-cache-disabled", 0x0000000000000000}, {"fw-ltptr-serialized", 0x0000000000000000}, +{"fw-count-cache-flush-bcctr2,0,0", 0x0000000000000000}, {"speculation-policy-favor-security", 0x0000000000000000}, {"user-mode-branch-speculation", 0x0000000000000000}, {"needs-l1d-flush-msr-hv-1-to-0", 0x0000000000000000}, {"needs-l1d-flush-msr-pr-0-to-1", 0x0000000000000000}, -{"needs-spec-barrier-for-bound-checks", 0x0000000000000000}}, +{"needs-spec-barrier-for-bound-checks", 0x0000000000000000}, +{"needs-pmu-restricted", 0x0000000000000000}, +{"needs-count-cache-flush-on-context-switch", 0x0000000000000000}}, -// Risk Level 2, DD2.1 +// Risk Level 2 , compat mode , nimbus DD 2.2 { -{"tm-suspend-mode", 0x0000000000000000}, +{"tm-suspend-mode", 0x8000000000000000}, +{"inst-spec-barrier-ori31,31,0", 0x0000000000000000}, +{"fw-bcctrl-serialized", 0x0000000000000000}, +{"inst-l1d-flush-ori30,30,0", 0x0000000000000000}, +{"inst-l1d-flush-trig2", 0x0000000000000000}, +{"fw-l1d-thread-split", 0x0000000000000000}, +{"fw-branch-hints-honored", 0x0000000000000000}, +{"inst-thread-reconfig-control-trig0-1", 0x0000000000000000}, +{"fw-count-cache-disabled", 0x0000000000000000}, +{"fw-ltptr-serialized", 0x0000000000000000}, +{"fw-count-cache-flush-bcctr2,0,0", 0x0000000000000000}, +{"speculation-policy-favor-security", 0x0000000000000000}, +{"user-mode-branch-speculation", 0x0000000000000000}, +{"needs-l1d-flush-msr-hv-1-to-0", 0x0000000000000000}, +{"needs-l1d-flush-msr-pr-0-to-1", 0x0000000000000000}, +{"needs-spec-barrier-for-bound-checks", 0x0000000000000000}, +{"needs-pmu-restricted", 0x0000000000000000}, +{"needs-count-cache-flush-on-context-switch", 0x0000000000000000}}, + +// Risk Level 2 , compat mode , nimbus DD 2.3 +{ +{"tm-suspend-mode", 0x8000000000000000}, {"inst-spec-barrier-ori31,31,0", 0x0000000000000000}, {"fw-bcctrl-serialized", 0x0000000000000000}, {"inst-l1d-flush-ori30,30,0", 0x0000000000000000}, @@ -435,13 +482,74 @@ const hdatIplpFeatureFlagSetting_t hdatIplpFeatureFlagSettingsArray[NUM_RISK_LEV {"inst-thread-reconfig-control-trig0-1", 0x0000000000000000}, {"fw-count-cache-disabled", 0x0000000000000000}, {"fw-ltptr-serialized", 0x0000000000000000}, +{"fw-count-cache-flush-bcctr2,0,0", 0x0000000000000000}, {"speculation-policy-favor-security", 0x0000000000000000}, {"user-mode-branch-speculation", 0x0000000000000000}, {"needs-l1d-flush-msr-hv-1-to-0", 0x0000000000000000}, {"needs-l1d-flush-msr-pr-0-to-1", 0x0000000000000000}, -{"needs-spec-barrier-for-bound-checks", 0x0000000000000000}}, +{"needs-spec-barrier-for-bound-checks", 0x0000000000000000}, +{"needs-pmu-restricted", 0x0000000000000000}, +{"needs-count-cache-flush-on-context-switch", 0x0000000000000000}}, +// End of Risk Level 2 +}, + + +//Risk levels 3 is being skipped as of now. Add values if needed infuture. +//RISK3 +{ +// Risk Level3 2.0 / nimbus DD 2.1 +{}, + +// Risk Level 3 nimbus DD2.2 +{}, + +// Risk Level 3 nimbus DD2.3 +{}, +// End of Risk Level 3 +}, + + +//RISK 4 +{ +// Risk Level 4 , native mode , nimbus DD 2.0 / nimbus DD 2.1 +{}, + +// Risk Level 4 , native mode , nimbus DD 2.2 +{}, + +// Risk Level 4 , native mode , nimbus DD 2.3 +{ +{"tm-suspend-mode", 0x8000000000000000}, +{"inst-spec-barrier-ori31,31,0", 0x8000000000000000}, +{"fw-bcctrl-serialized", 0x0000000000000000}, +{"inst-l1d-flush-ori30,30,0", 0x0000000000000000}, +{"inst-l1d-flush-trig2", 0x8000000000000000}, +{"fw-l1d-thread-split", 0x8000000000000000}, +{"fw-branch-hints-honored", 0x0000000000000000}, +{"inst-thread-reconfig-control-trig0-1", 0x0000000000000000}, +{"fw-count-cache-disabled", 0x0000000000000000}, +{"fw-ltptr-serialized", 0x0000000000000000}, +{"fw-count-cache-flush-bcctr2,0,0", 0x8000000000000000}, +{"speculation-policy-favor-security", 0x8000000000000000}, +{"user-mode-branch-speculation", 0x0000000000000000}, +{"needs-l1d-flush-msr-hv-1-to-0", 0x8000000000000000}, +{"needs-l1d-flush-msr-pr-0-to-1", 0x8000000000000000}, +{"needs-spec-barrier-for-bound-checks", 0x8000000000000000}, +{"needs-pmu-restricted", 0x0000000000000000}, +{"needs-count-cache-flush-on-context-switch", 0x8000000000000000}}, +// End of Risk Level 4 +}, + -// Risk Level 2, DD2.2 +//RISK 5 +{ +// Risk Level 5 , native mode , nimbus DD 2.0 / nimbus DD 2.1 +{}, + +// Risk Level 5 , native mode , nimbus DD 2.2 +{}, + +// Risk Level 5 , native mode , nimbus DD 2.3 { {"tm-suspend-mode", 0x8000000000000000}, {"inst-spec-barrier-ori31,31,0", 0x0000000000000000}, @@ -453,11 +561,18 @@ const hdatIplpFeatureFlagSetting_t hdatIplpFeatureFlagSettingsArray[NUM_RISK_LEV {"inst-thread-reconfig-control-trig0-1", 0x0000000000000000}, {"fw-count-cache-disabled", 0x0000000000000000}, {"fw-ltptr-serialized", 0x0000000000000000}, +{"fw-count-cache-flush-bcctr2,0,0", 0x0000000000000000}, {"speculation-policy-favor-security", 0x0000000000000000}, {"user-mode-branch-speculation", 0x0000000000000000}, {"needs-l1d-flush-msr-hv-1-to-0", 0x0000000000000000}, {"needs-l1d-flush-msr-pr-0-to-1", 0x0000000000000000}, -{"needs-spec-barrier-for-bound-checks", 0x0000000000000000}}}}; +{"needs-spec-barrier-for-bound-checks", 0x0000000000000000}, +{"needs-pmu-restricted", 0x0000000000000000}, +{"needs-count-cache-flush-on-context-switch", 0x0000000000000000}}, +// End of Risk Level 5 +}, + +}; #define HDAT_CHIP_TYPE_MURANO "MURANO" #define HDAT_CHIP_TYPE_VENICE "VENICE" |