diff options
author | Claus Michael Olsen <cmolsen@us.ibm.com> | 2017-09-21 22:58:58 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-10-03 16:39:50 -0400 |
commit | b91461624f7884b8f543493e8c4dc84175253677 (patch) | |
tree | 9f25f0fa54dfca5f488465e1c609e74026cad5fa /src/import/chips/p9/xip | |
parent | 079ed45786c3b355b1c8aa6b7937e1c5c0a89401 (diff) | |
download | talos-hostboot-b91461624f7884b8f543493e8c4dc84175253677.tar.gz talos-hostboot-b91461624f7884b8f543493e8c4dc84175253677.zip |
Overlays and multi-DD XIP related updates to xip_image and dd_container
to support WIN32 for manu team.
Also,
- various updates to dd_container error handling,
- improved DD support query checking.
Change-Id: I706e56258894c3453cf01aa1a637fe888af1db00
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46596
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Richard J. Knight <rjknight@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+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: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46599
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/xip')
-rw-r--r-- | src/import/chips/p9/xip/p9_xip_image.C | 27 | ||||
-rw-r--r-- | src/import/chips/p9/xip/p9_xip_image.h | 4 |
2 files changed, 20 insertions, 11 deletions
diff --git a/src/import/chips/p9/xip/p9_xip_image.C b/src/import/chips/p9/xip/p9_xip_image.C index 95905d068..7c109ba4d 100644 --- a/src/import/chips/p9/xip/p9_xip_image.C +++ b/src/import/chips/p9/xip/p9_xip_image.C @@ -44,9 +44,9 @@ #else #include <stdint.h> #include <endian.h> - #ifndef __PPE__ - #include "p9_dd_container.h" - #endif +#endif +#ifndef __PPE__ + #include "p9_dd_container.h" #endif #include <stdlib.h> #include <string.h> @@ -2025,7 +2025,7 @@ p9_xip_image_size(void* io_image, uint32_t* o_size) } -#if defined(__PPE__) || defined(WIN32) +#if defined(__PPE__) int p9_xip_get_section(const void* i_image, const int i_sectionId, @@ -2091,15 +2091,15 @@ p9_xip_get_section(const void* i_image, { switch (rc) { - case P9_DD_FAILURE_NOT_FOUND: + case DDCO_DDLEVEL_NOT_FOUND: rc = P9_XIP_DDLEVEL_NOT_FOUND; break; - case P9_DD_FAILURE_DOES_NOT_EXIST: + case DDCO_DDCO_DOES_NOT_EXIST: rc = P9_XIP_NULL_BUFFER; break; - case P9_DD_FAILURE_BROKEN: + case DDCO_FAILURE_MAGIC_NOT_FOUND: rc = P9_XIP_NO_DDLEVEL_SUPPORT; break; @@ -3257,7 +3257,7 @@ p9_xip_map_toc(void* io_image, } -#if !defined(__PPE__) && !defined(WIN32) +#if !defined(__PPE__) // // Inform caller if specified sectionId has DD support // @@ -3272,7 +3272,16 @@ int p9_xip_dd_section_support(const void* i_image, if (!rc) { - o_bDdSupport = (bool)section.iv_ddSupport; + if (section.iv_ddSupport == 0 || section.iv_ddSupport == 1) + { + o_bDdSupport = (bool)section.iv_ddSupport; + } + else + { + // iv_ddSupport is uninitialized or corrupted + o_bDdSupport = false; + rc = P9_XIP_IMAGE_ERROR; + } } return rc; diff --git a/src/import/chips/p9/xip/p9_xip_image.h b/src/import/chips/p9/xip/p9_xip_image.h index 838f0276c..dfa20d454 100644 --- a/src/import/chips/p9/xip/p9_xip_image.h +++ b/src/import/chips/p9/xip/p9_xip_image.h @@ -699,7 +699,7 @@ p9_xip_image_size(void* i_image, uint32_t* o_size); int p9_xip_get_section(const void* i_image, const int i_sectionId, -#if defined(__PPE__) || defined(WIN32) +#if defined(__PPE__) P9XipSection* o_hostSection); #else P9XipSection* o_hostSection, @@ -1380,7 +1380,7 @@ p9_xip_get_toc(void* i_image, /// \retval 0 Success /// /// \retval non-0 See \ref p9_xip_image_errors -#if !defined(__PPE__) && !defined(WIN32) +#if !defined(__PPE__) int p9_xip_dd_section_support(const void* i_image, const int i_sectionId, |