diff options
author | CHRISTINA L. GRAVES <clgraves@us.ibm.com> | 2017-04-19 09:34:16 -0500 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-05-11 10:11:54 -0400 |
commit | 3da6fe6871348160704ece80e51957dec71b0652 (patch) | |
tree | e6742c19a52f250bdb94dc0c1367879f93d5e842 /src/import/chips/p9/procedures/hwp/nest/p9_pba_access.C | |
parent | 598baada7a26aae90ba1d2ea4531becfdd3be935 (diff) | |
download | talos-sbe-3da6fe6871348160704ece80e51957dec71b0652.tar.gz talos-sbe-3da6fe6871348160704ece80e51957dec71b0652.zip |
PBA Level 3 code, changed owner to Josh, and added comments
Change-Id: Idc9bb1dad6498e3458a9bbd1e93c9d1728784c44
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39429
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Reviewed-by: DHRUVARAJ SUBHASH CHANDRAN <dhruvaraj@in.ibm.com>
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39459
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/nest/p9_pba_access.C')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/nest/p9_pba_access.C | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_pba_access.C b/src/import/chips/p9/procedures/hwp/nest/p9_pba_access.C index 04b5d939..e8a9690e 100644 --- a/src/import/chips/p9/procedures/hwp/nest/p9_pba_access.C +++ b/src/import/chips/p9/procedures/hwp/nest/p9_pba_access.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -27,10 +27,10 @@ /// @file p9_pba_access.C /// @brief Read coherent state of memory via the PBA (FAPI) /// -// *HWP HWP Owner: Christina Graves clgraves@us.ibm.com +// *HWP HWP Owner: Joshua Hannan jlhannan@us.ibm.com // *HWP FW Owner: Thi Tran thi@us.ibm.com // *HWP Team: Nest -// *HWP Level: 2 +// *HWP Level: 3 // *HWP Consumed by: SBE //-------------------------------------------------------------------------- @@ -56,7 +56,6 @@ extern "C" { uint8_t io_data[]) { //return codes - fapi2::ReturnCode rc; fapi2::ReturnCode rc1; // mark HWP entry @@ -69,47 +68,51 @@ extern "C" { //if read if (i_rnw) { - rc1 = p9_pba_coherent_pba_read(i_target, i_address, io_data); + FAPI_TRY(p9_pba_coherent_pba_read(i_target, i_address, io_data), + "p9_pba_coherent_pba_read() returns error l_rc 0x%.8X", + (uint64_t)fapi2::current_err); } //else if write else { - rc1 = p9_pba_coherent_pba_write(i_target, i_address, io_data); + FAPI_TRY(p9_pba_coherent_pba_write(i_target, i_address, io_data), + "p9_pba_coherent_pba_write() returns error l_rc 0x%.8X", + (uint64_t)fapi2::current_err); + } //If we are not in fastmode or this is the last granule, we want to check the status - if (!rc1) + if ( i_lastGranule || (l_myPbaFlag.getFastMode() == false) ) { - if ( i_lastGranule || (l_myPbaFlag.getFastMode() == false) ) + rc1 = p9_pba_coherent_status_check(i_target); + + if (i_lastGranule) { - rc1 = p9_pba_coherent_status_check(i_target); - - if (i_lastGranule) - { - //Clean up the PBA since it's the last read/write and it has been finished - FAPI_TRY(p9_pba_coherent_cleanup_pba(i_target), - "Error doing p9_pba_coherent_cleanup_pba"); - } + //Clean up the PBA since it's the last read/write and it has been finished + FAPI_TRY(p9_pba_coherent_cleanup_pba(i_target), + "Error doing p9_pba_coherent_cleanup_pba"); } + + // No error at this point + // Set error to rc1 returned from status check + fapi2::current_err = rc1; } // mark HWP exit fapi_try_exit: //Handling error. PBA access is the main error if there's one. - if (rc1) - { - //Commit error from clean up (secondary) - if (rc) - { - //fapi2::fapiLogError(rc, FAPI_ERRL_SEV_RECOVERED); - } + //Append the input data to an error if we got an error back for non-PPE env +#ifndef __PPE__ - //Set return error to pba access error - fapi2::current_err = rc1; + if (fapi2::current_err) + { + p9_pba_coherent_append_input_data(i_address, i_rnw, i_flags, fapi2::current_err); } - FAPI_DBG("Exit ...\n"); +#endif + + FAPI_DBG("Exiting..."); return fapi2::current_err; } |