diff options
author | Thi Tran <thi@us.ibm.com> | 2017-12-17 08:45:48 -0600 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2018-01-13 21:38:12 -0500 |
commit | f55ed0656b82e5f9381e0fd8eefe935ca9611c0d (patch) | |
tree | a23bb0e5b57996ccf0a48ad6f62ce0930a914be7 /src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C | |
parent | d4106818dcc15dc4675107545fe307f4e7d47d12 (diff) | |
download | talos-sbe-f55ed0656b82e5f9381e0fd8eefe935ca9611c0d.tar.gz talos-sbe-f55ed0656b82e5f9381e0fd8eefe935ca9611c0d.zip |
p9_build_smp -- use ADU chipops to switch fabric configuration part #1
This commit is the first part of 49692, which is splitted in
order to have SBE platform proceed with code supports.
Change-Id: I1f491cac6cfef8476487217067d69d4551de1228
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51048
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51049
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C b/src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C index 4e06e229..a1982c9e 100644 --- a/src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C +++ b/src/import/chips/p9/procedures/hwp/nest/p9_adu_access.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -43,6 +43,11 @@ #include <p9_adu_access.H> #include <p9_adu_coherent_utils.H> +// ADU operation delay times for HW/sim +const uint32_t P9_ADU_ACCESS_ADU_OPER_HW_NS_DELAY = 10000; +const uint32_t P9_ADU_ACCESS_ADU_OPER_SIM_CYCLE_DELAY = 50000; + + extern "C" { //-------------------------------------------------------------------------- @@ -74,23 +79,40 @@ extern "C" { l_myAduFlag.setAutoIncrement(false); } + // don't generate fabric command + if ((l_myAduFlag.getOperationType() == p9_ADU_oper_flag::PRE_SWITCH_AB) || + (l_myAduFlag.getOperationType() == p9_ADU_oper_flag::PRE_SWITCH_CD) || + (l_myAduFlag.getOperationType() == p9_ADU_oper_flag::POST_SWITCH)) + { + goto fapi_try_exit; + } + //If we were using autoinc and this is the last granule we need to clear autoinc before the last read/write if( i_lastGranule && l_myAduFlag.getAutoIncrement() ) { FAPI_TRY(p9_adu_coherent_clear_autoinc(i_target), "Error from p9_adu_coherent_clear_autoinc"); } - //If we are doing a read operation read the data - if (i_rnw) + if (l_myAduFlag.isAddressOnly()) { - FAPI_TRY(p9_adu_coherent_adu_read(i_target, i_firstGranule, i_address, l_myAduFlag, io_data), - "Error from p9_adu_coherent_adu_read"); + FAPI_TRY(fapi2::delay(P9_ADU_ACCESS_ADU_OPER_HW_NS_DELAY, + P9_ADU_ACCESS_ADU_OPER_SIM_CYCLE_DELAY), + "fapiDelay error"); } - //Otherwise this is a write and write the data else { - FAPI_TRY(p9_adu_coherent_adu_write(i_target, i_firstGranule, i_address, l_myAduFlag, io_data), - "Error from p9_adu_coherent_adu_write"); + //If we are doing a read operation read the data + if (i_rnw) + { + FAPI_TRY(p9_adu_coherent_adu_read(i_target, i_firstGranule, i_address, l_myAduFlag, io_data), + "Error from p9_adu_coherent_adu_read"); + } + //Otherwise this is a write and write the data + else + { + FAPI_TRY(p9_adu_coherent_adu_write(i_target, i_firstGranule, i_address, l_myAduFlag, io_data), + "Error from p9_adu_coherent_adu_write"); + } } //If we are not in fastmode or this is the last granule, we want to check the status @@ -110,7 +132,7 @@ extern "C" { //We only want to do the status check if this is not a ci operation if (l_myAduFlag.getOperationType() != p9_ADU_oper_flag::CACHE_INHIBIT) { - FAPI_TRY(p9_adu_coherent_status_check(i_target, l_busyHandling, false, + FAPI_TRY(p9_adu_coherent_status_check(i_target, l_busyHandling, l_myAduFlag.isAddressOnly(), l_busyBitStatus), "Error from p9_adu_coherent_status_check"); } |