From d935c5c94a9e1c23325f3dcd4ed113a6985412db Mon Sep 17 00:00:00 2001 From: Roland Veloz Date: Tue, 30 Apr 2019 23:22:00 -0500 Subject: Added more error reporting to HWSV when PNOR fails, removed superfluous code - Replaced the terminate (terminateExecuteTI) raw calls with bl_terminate. Returning descriptive RC codes with bl_terminate call. - Module ID MOD_PNORACC_FINDTOC(=0x08) was added to hbblModuleId enums. - Return codes RC_LPC_ERR(HBBL_COMP_ID | 0x10) and RC_TOC_NOT_FOUND_ERR(HBBL_COMP_ID | 0x11) added to hbblReasonCode enums. - Freed up space in bootoloader: - Removed unnecessary calls to the method PNOR::checkForNullBuffer, because the call is always guaranteed to return with no error. - Once the calls to PNOR::checkForNullBuffer were dropped, the method PNOR::checkForNullBuffer is no longer necessary - removed it from production code. - The unit tests relied heavily on the call to PNOR::checkForNullBuffer, was not sure if the call could be removed from the unit tests, so relocated the PNOR::checkForNullBuffer method to the unit tests, out of production code. Change-Id: I1e3f8915ee4ed9b75ad74c57627ca1d2bc3a458d CQ:SW464040 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/76787 Reviewed-by: Daniel M. Crowell Tested-by: Daniel M. Crowell --- src/include/bootloader/bootloader_trace.H | 4 ++-- src/include/bootloader/hbblreasoncodes.H | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/bootloader/bootloader_trace.H b/src/include/bootloader/bootloader_trace.H index 69c708ad0..0c82a936e 100644 --- a/src/include/bootloader/bootloader_trace.H +++ b/src/include/bootloader/bootloader_trace.H @@ -166,9 +166,9 @@ enum BootloaderTraces /** Bootloader main removeECC returned error */ BTLDR_TRC_MAIN_REMOVEECC_FAIL = 0xF1, - + /** Bootloader PNOR Access readTOC checkForNullBuffer null buffer */ - BTLDR_TRC_PA_READTOC_CHKNULLBUFFER_NULL = 0xF2, + BTLDR_TRC_PA_READTOC_CHKNULLBUFFER_NULL = 0xF2, // deprecated - do not use /** Bootloader PNOR Access readTOC performHdrChecksum checksum error */ BTLDR_TRC_PA_READTOC_HDRCHECKSUM_ERR = 0xF3, diff --git a/src/include/bootloader/hbblreasoncodes.H b/src/include/bootloader/hbblreasoncodes.H index 7ea0f189f..b5fe331e3 100644 --- a/src/include/bootloader/hbblreasoncodes.H +++ b/src/include/bootloader/hbblreasoncodes.H @@ -50,6 +50,7 @@ namespace Bootloader MOD_BOOTLOADER_VERIFY = 0x05, /**< bootloader.C : verifyContainer */ MOD_BOOTLOADER_ASSERT = 0x06, /**< bootloader.H assert */ MOD_BOOTLOADER_VERIFY_COMP_ID = 0x07, /**< bootloader.C : verifyComponentId */ + MOD_PNORACC_FINDTOC = 0x08, /**< bl_pnorAccess.C : find TOC */ }; /** @@ -75,6 +76,8 @@ namespace Bootloader RC_PNOR_SECID_OUT_OF_RANGE = HBBL_COMP_ID | 0x0D, /**< Requested PNOR SecId DNE in string array */ RC_PNOR_NULLPTR = HBBL_COMP_ID | 0x0E, /**< Requested address to compare is a nullptr */ RC_BAD_WORK_LEN = HBBL_COMP_ID | 0x0F, /**< Working length too large */ + RC_LPC_ERR = HBBL_COMP_ID | 0x10, /**< LPC Error */ + RC_TOC_NOT_FOUND_ERR = HBBL_COMP_ID | 0x11, /**< TOC Not Found Error */ }; }; // end Bootloader -- cgit v1.2.3