diff options
author | Claus Michael Olsen <cmolsen@us.ibm.com> | 2017-11-18 12:15:52 -0600 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-12-06 10:46:01 -0500 |
commit | 8e0caa8e381d9910dd4845612fe87ebce6602e5e (patch) | |
tree | 7b0057414d71f9709bfcaf3b4b14918439f18051 /src | |
parent | 62551f8feb3a2b8466241b8ebc2b3dabaae400f7 (diff) | |
download | talos-sbe-8e0caa8e381d9910dd4845612fe87ebce6602e5e.tar.gz talos-sbe-8e0caa8e381d9910dd4845612fe87ebce6602e5e.zip |
Error out on non-TOR ring section detection.
Updating ring section parsing code to error out if it detects
that there is no valid TOR magic header word in the beginning
of the ring section.
Change-Id: If92278a16de3e4f5c1605161606ed8621e30f56e
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49883
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/hwpf/plat_ring_traverse.C | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/hwpf/plat_ring_traverse.C b/src/hwpf/plat_ring_traverse.C index 8b6554d2..98e391b1 100644 --- a/src/hwpf/plat_ring_traverse.C +++ b/src/hwpf/plat_ring_traverse.C @@ -72,7 +72,7 @@ fapi2::ReturnCode findRS4InImageAndApply( SBE_TRACE("No ring data in .RING section"); break; } - + uint8_t l_torHdrSz; TorHeader_t* torHeader = (TorHeader_t*)(g_seepromAddr + l_section->iv_offset); @@ -83,13 +83,10 @@ fapi2::ReturnCode findRS4InImageAndApply( } else { - // Note that after the merge of this code and after the TOR - // magic merge on the HB side has settled down, the code - // inside these bracket will be replaced with the return of - // an error. - l_torHdrSz = 0; - SBE_TRACE("TOR magic header (=0x%08x) != TOR_MAGIC_SBE (=0x%08x)", + SBE_ERROR("ERROR: TOR magic header (=0x%08x) != TOR_MAGIC_SBE (=0x%08x)", torHeader->magic, TOR_MAGIC_SBE); + l_rc = fapi2::FAPI2_RC_PLAT_TOR_HEADER_DATA_INVALID; + break; } SectionTOR* l_sectionTOR = (SectionTOR*)(g_seepromAddr + |