diff options
author | Prem Shanker Jha <premjha2@in.ibm.com> | 2017-05-05 01:52:15 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-06-13 15:26:03 -0400 |
commit | c5e728889fea48d6ada9083c638754790df8951f (patch) | |
tree | 425470f25f04e4b9a5a57110a55cc25a2a291cd8 /src | |
parent | 22441c2f41d891c59663a8a79d31f49be3da9e5b (diff) | |
download | talos-hostboot-c5e728889fea48d6ada9083c638754790df8951f.tar.gz talos-hostboot-c5e728889fea48d6ada9083c638754790df8951f.zip |
PM: Changes for Hcode Image Build level3 - part 1
Commit is part of series of commits planned for making
hcode image build level 3 ready. Commit intends to
improve debuggability of HWP in case of bad input
arguments.
Change-Id: Ib38636f32fdf0d89f39fff0324302cea86c1e48c
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40118
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Reviewed-by: BRIAN D. VICTOR <brian.d.victor1@ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40122
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C | 49 | ||||
-rwxr-xr-x | src/import/chips/p9/procedures/xml/error_info/p9_hcode_image_build_errors.xml | 77 |
2 files changed, 96 insertions, 30 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C index c70138ee7..3e7c815b5 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C @@ -546,15 +546,21 @@ fapi2::ReturnCode validateInputArguments( void* const i_pImageIn, void* i_pImage FAPI_DBG("Entering validateInputArguments ..."); - FAPI_ASSERT( (( i_pImageIn != NULL ) && ( i_pImageOut != NULL ) && + FAPI_ASSERT( (( i_pImageIn != NULL ) && ( i_pImageIn != i_pImageOut )), - fapi2::IMG_PTR_ERROR() + fapi2::HW_IMG_PTR_ERROR() .set_HW_IMG_BUF_PTR( i_pImageIn ) .set_HOMER_IMG_BUF_PTR( i_pImageOut ), - "Bad pointer to HW Image or HOMER Image" ); + "Bad pointer to HW Image" ); + + FAPI_ASSERT( ( i_pImageOut != NULL ), + fapi2::HOMER_IMG_PTR_ERROR() + .set_HOMER_IMG_BUF_PTR( i_pImageOut ), + "Bad pointer to HOMER Image" ); + l_rc = p9_xip_image_size( i_pImageIn, &hwImagSize ); - FAPI_DBG("size is 0x%08X; xip_image_size RC is 0x%02x HARDWARE_IMG_SIZE 0x%08X Sz 0x%08X", + FAPI_INF("size is 0x%08X; xip_image_size RC is 0x%02x HARDWARE_IMG_SIZE 0x%08X Sz 0x%08X", hwImagSize, l_rc, HARDWARE_IMG_SIZE, hwImagSize ); FAPI_ASSERT( (( IMG_BUILD_SUCCESS == l_rc ) && ( hwImagSize > 0 ) && @@ -563,33 +569,42 @@ fapi2::ReturnCode validateInputArguments( void* const i_pImageIn, void* i_pImage .set_HW_IMG_SIZE( hwImagSize ) .set_MAX_HW_IMG_SIZE( HARDWARE_IMG_SIZE ), "Hardware image size found out of range" ); + FAPI_ASSERT( (( i_phase > PHASE_NA ) && ( i_phase < PHASE_END )), fapi2::HCODE_INVALID_PHASE() .set_SYS_PHASE( i_phase ), "Invalid value passed as build phase" ); FAPI_ASSERT( ( i_pBuf1 != NULL ), - fapi2::HCODE_INVALID_TEMP_BUF() - .set_TEMP_BUF_PTR( i_pBuf1 ), + fapi2::HCODE_INVALID_TEMP1_BUF() + .set_TEMP1_BUF_SIZE( i_bufSize1 ), "Invalid temp buffer1 passed for hcode image build" ); - FAPI_ASSERT( (( i_bufSize1 != 0 ) && ( i_bufSize2 != 0 ) && ( i_bufSize3 != 0 )), - fapi2::HCODE_TEMP_BUF_SIZE() - .set_TEMP_BUF1_SIZE( i_bufSize1 ) - .set_TEMP_BUF2_SIZE( i_bufSize2 ) - .set_TEMP_BUF3_SIZE( i_bufSize3 ), - "Invalid work buffer size " ); - FAPI_ASSERT( ( i_pBuf2 != NULL ), - fapi2::HCODE_INVALID_TEMP_BUF() - .set_TEMP_BUF_PTR( i_pBuf2 ), + fapi2::HCODE_INVALID_TEMP2_BUF() + .set_TEMP2_BUF_SIZE( i_bufSize2 ), "Invalid temp buffer2 passed for hcode image build" ); FAPI_ASSERT( ( i_pBuf3 != NULL ), - fapi2::HCODE_INVALID_TEMP_BUF() - .set_TEMP_BUF_PTR( i_pBuf3 ), + fapi2::HCODE_INVALID_TEMP3_BUF() + .set_TEMP3_BUF_SIZE( i_bufSize3 ), "Invalid temp buffer3 passed for hcode image build" ); + FAPI_ASSERT( ( i_bufSize1 != 0 ) , + fapi2::HCODE_INVALID_TEMP1_BUF_SIZE() + .set_TEMP1_BUF_SIZE( i_bufSize1 ), + "Invalid size for temp buf1 passed for hcode image build" ); + + FAPI_ASSERT( ( i_bufSize2 != 0 ), + fapi2::HCODE_INVALID_TEMP2_BUF_SIZE() + .set_TEMP2_BUF_SIZE( i_bufSize2 ), + "Invalid size for temp buf2 passed for hcode image build" ); + + FAPI_ASSERT( ( i_bufSize3 != 0 ), + fapi2::HCODE_INVALID_TEMP3_BUF_SIZE() + .set_TEMP3_BUF_SIZE( i_bufSize3 ), + "Invalid size for temp buf3 passed for hcode image build" ); + FAPI_ASSERT( ( i_imgType.isBuildValid() ), fapi2::HCODE_INVALID_IMG_TYPE(), "Invalid image type passed for hcode image build" ); diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_hcode_image_build_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_hcode_image_build_errors.xml index c8c572f6b..86d76ce96 100755 --- a/src/import/chips/p9/procedures/xml/error_info/p9_hcode_image_build_errors.xml +++ b/src/import/chips/p9/procedures/xml/error_info/p9_hcode_image_build_errors.xml @@ -27,8 +27,8 @@ <hwpErrors> <!-- *********************************************************************** --> <hwpError> - <rc>RC_IMG_PTR_ERROR</rc> - <description>Image pointers passed are either bad or point to same location.</description> + <rc>RC_HW_IMG_PTR_ERROR</rc> + <description>HW Image pointer is either NULL or points to same location as HOMER base</description> <ffdc>HW_IMG_BUF_PTR</ffdc> <ffdc>HOMER_IMG_BUF_PTR</ffdc> <callout> @@ -38,6 +38,16 @@ </hwpError> <!-- *********************************************************************** --> <hwpError> + <rc>RC_HOMER_IMG_PTR_ERROR</rc> + <description>HOMER Image pointer is NULL</description> + <ffdc>HOMER_IMG_BUF_PTR</ffdc> + <callout> + <procedure>CODE</procedure> + <priority>HIGH</priority> + </callout> + </hwpError> + <!-- *********************************************************************** --> + <hwpError> <rc>RC_HW_IMAGE_INVALID_SIZE</rc> <description>Hardware Image size is not in expected range </description> <ffdc>HW_IMG_SIZE</ffdc> @@ -50,7 +60,7 @@ <!-- *********************************************************************** --> <hwpError> <rc>RC_HCODE_INVALID_PHASE</rc> - <description>System phase is neither IPL nor Hypervisor</description> + <description>Invalid or unsupported build phase passed to the HOMER build procedure</description> <ffdc>SYS_PHASE</ffdc> <callout> <procedure>CODE</procedure> @@ -59,10 +69,49 @@ </hwpError> <!-- *********************************************************************** --> <hwpError> - <rc>RC_HCODE_INVALID_TEMP_BUF</rc> - <description>Temporary buffer is invalid.</description> - <ffdc>TEMP_BUF_PTR</ffdc> - <ffdc>TEMP_BUF_SIZE</ffdc> + <rc>RC_HCODE_INVALID_TEMP1_BUF</rc> + <description>Temporary buffer1 is invalid</description> + <ffdc>TEMP1_BUF_SIZE</ffdc> + <callout> + <procedure>CODE</procedure> + <priority>HIGH</priority> + </callout> + </hwpError> + <!-- *********************************************************************** --> + <hwpError> + <rc>RC_HCODE_INVALID_TEMP1_BUF_SIZE</rc> + <description>Invalid size for temp buf1</description> + <ffdc>TEMP1_BUF_SIZE</ffdc> + <callout> + <procedure>CODE</procedure> + <priority>HIGH</priority> + </callout> + </hwpError> + <!-- *********************************************************************** --> + <hwpError> + <rc>RC_HCODE_INVALID_TEMP2_BUF</rc> + <description>Temporary buffer2 is invalid</description> + <ffdc>TEMP2_BUF_SIZE</ffdc> + <callout> + <procedure>CODE</procedure> + <priority>HIGH</priority> + </callout> + </hwpError> + <!-- *********************************************************************** --> + <hwpError> + <rc>RC_HCODE_INVALID_TEMP2_BUF_SIZE</rc> + <description>Invalid size for temp buf2</description> + <ffdc>TEMP2_BUF_SIZE</ffdc> + <callout> + <procedure>CODE</procedure> + <priority>HIGH</priority> + </callout> + </hwpError> + <!-- *********************************************************************** --> + <hwpError> + <rc>RC_HCODE_INVALID_TEMP3_BUF</rc> + <description>Temporary buffer3 is invalid.</description> + <ffdc>TEMP3_BUF_SIZE</ffdc> <callout> <procedure>CODE</procedure> <priority>HIGH</priority> @@ -70,11 +119,9 @@ </hwpError> <!-- *********************************************************************** --> <hwpError> - <rc>RC_HCODE_TEMP_BUF_SIZE</rc> - <description>Temporary buffer size invalid</description> - <ffdc>TEMP_BUF1_SIZE</ffdc> - <ffdc>TEMP_BUF2_SIZE</ffdc> - <ffdc>TEMP_BUF3_SIZE</ffdc> + <rc>RC_HCODE_INVALID_TEMP3_BUF_SIZE</rc> + <description>Invalid size for temp buf3</description> + <ffdc>TEMP3_BUF_SIZE</ffdc> <callout> <procedure>CODE</procedure> <priority>HIGH</priority> @@ -154,7 +201,9 @@ <!-- *********************************************************************** --> <hwpError> <rc>RC_CME_IMG_EXCEED_SRAM_SIZE</rc> - <description>Size of CME image exceeded the SRAM size</description> + <description>Size of CME image exceeded the SRAM size. + Note: 0xFFFFFFFF in field MAX_CME_IMG_SIZE_ALLOWED indicates an invalid size. + </description> <ffdc>BAD_IMG_SIZE</ffdc> <ffdc>MAX_CME_IMG_SIZE_ALLOWED</ffdc> <callout> @@ -166,6 +215,7 @@ <hwpError> <rc>RC_SGPE_IMG_EXCEED_SRAM_SIZE</rc> <description>Size of SGPE image exceeded the size allowed in OCC SRAM</description> + Note: 0xFFFFFFFF in field MAX_SGPE_IMG_SIZE_ALLOWED indicates an invalid size. <ffdc>BAD_IMG_SIZE</ffdc> <ffdc>MAX_SGPE_IMG_SIZE_ALLOWED</ffdc> <callout> @@ -177,6 +227,7 @@ <hwpError> <rc>RC_PGPE_IMG_EXCEED_SRAM_SIZE</rc> <description>Size of PGPE image exceeded the size allowed in OCC SRAM</description> + Note: 0xFFFFFFFF in field MAX_PGPE_IMG_SIZE_ALLOWED indicates an invalid size. <ffdc>BAD_IMG_SIZE</ffdc> <ffdc>MAX_PGPE_IMG_SIZE_ALLOWED</ffdc> <callout> |