summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H
Commit message (Collapse)AuthorAgeFilesLines
* Code restruct: TOR APIClaus Michael Olsen2017-12-101-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Key_Cronus_Test=XIP_REGRESS Code restructuring aiming at: - utilizing TOR magic header info - enforce a common approach for - extracting metadata for all image,chipType combinations - traversing images for all image,chipType combinations - shrinking code size by reusing common code segments - improve readability by - separating more clearly metadata extraction and image traversal - slight rearrange of certain code segments - remove leftover hardcoded assumptions about ring/TOR data and structs - variables appropriately renamed and now all using camel style Change-Id: I50ace8b2fdb340a97ce6d74ce545c5e1acd21c40 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38863 Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: GIRISANKAR PAULRAJ <gpaulraj@in.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43251 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>
* p9_xip_tool support for DD level section parsingRichard J. Knight2017-11-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Currently supports only .overlays section. - Fixed an heap problem causing segmentation fault after repetitive use of malloc in rs4_decompress() and rs4_extract_cmsk(). Now allocating buffers locally and calling _rs4_decompress() and _rs4_extract_cmsk() instead so only have to use malloc once. - Fixed a bug in the usage of the ringBlockPtr which got moved away from pointing to its initially allocated buffer after the first CMSK ring is processed. - Even though malloc() can be used in a C++ context, we really should be using the new() operator. So, I replaced all malloc() and free() with new() and delete() instead in both p9_xip_tool.C and p9_scan_compression.C. Change-Id: I2da7509ed7aaa13345185dc07bce57f71c3740fd Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42531 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@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: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Sumit Kumar <sumit_kumar@in.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42803 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: Christian R. Geddes <crgeddes@us.ibm.com>
* Update: xip_tool: Introducing image section type (IST).Claus Michael Olsen2017-11-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Currently xip_tool bails out if attempting to run a "report" on a standalone overrides or overlays ring section. So, added support for: - "report" for standalone TOR ring section and standalone DD container. - Introduced the Image Section Type (IST) to enumerate the various image types supported in an XIP image. Change-Id: I465248e802d496c4ff571ad92ea42cda9656db68 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48720 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@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: Sumit Kumar <sumit_kumar@in.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48723 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: Christian R. Geddes <crgeddes@us.ibm.com>
* GPTR/Overlays stage-2 supportSumit Kumar2017-07-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | -Updated ringClass to include Gptr for Nest/EQ/EX/EC to support CME/SGPE. - Bug fixes: - big endian to local host endian conversion - now also processing Gptr rings in RT_CME/SGPE sysPhases - improved error checking, error capturing and trace outs Change-Id: Idfc19bdf1b7187d6f75c459f7ddbeda80ccfec28 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43080 Reviewed-by: Claus M. Olsen <cmolsen@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+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/43082 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-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>
* GPTR/Overlays stage-1b support in xip_customizeSumit Kumar2017-07-141-1/+1
| | | | | | | | | | | | | | | | | | | - Enabled to poll Nimbus DD level with support for overlays in the XIP. - Enabled to pass hw image with overlays section populated with dd levels. Change-Id: Ib7de3698ac103b34293115d0b4870afd0e617315 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41407 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Claus M. Olsen <cmolsen@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+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/41409 Reviewed-by: Dean Sanner <dsanner@us.ibm.com> Tested-by: Dean Sanner <dsanner@us.ibm.com>
* xip_customize: MVPD compatible file set.Claus Michael Olsen2017-02-221-5/+15
| | | | | | | | | | | | | Change-Id: Ib3b7aeb8045a28ca05d33370c1ef1dcb9ba1fb64 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29448 Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Michael C. Sgro <mcs793@us.ibm.com> Reviewed-by: Martin Peschke <mpeschke@de.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29450 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* xip_customize: Four fixes for relieving Seeprom space constraint.Claus Michael Olsen2016-12-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Now calculating correct value of MAX_SEEPROM_IMAGE_SIZE. 2) Now returning error RC!=0 whenever image size exceeds Seeprom space. 3) Now allowing for temporarily exceeding max image size during customization of Vpd rings since we know with certain that the image will loose three sections (toc, fixed_toc and strings) as the very last step in xip_customize. 4) Now extracting platform dependent value of MAX_SBE_SEEPROM_SIZE to allow Cronus to use larger image size than can fit into SBE Seeprom. 5) Updated wrapper as well to illustrate the new rule how to call xip_customize, namely by supplying buffer sizes greater than MAX_SEEPROM_IMAGE_SIZE, e.g. using MAX_SBE_SEEPROM_SIZE instead. Please see xip_customize.H for new API rules. Change-Id: Ia87fc285378ec15ab53d171757fde33b5a7f3399 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33359 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Kahn C. Evans <kahnevan@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33364 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
* Cleanup: TOR API cleaning upClaus Michael Olsen2016-10-201-1/+3
| | | | | | | | | | | | | | | | | | | | | - Catching all abrupt ending if-elseif endings. - Updated all API comments in *.C file. - Making local functions static. - Accommodated additional six EX rings in tor_get_block_of_rings(CPLT). - Now limiting max DD levels to 20 to prevent infinite trace out loop. - Fixing bunch of inconsistent error return code situations. Change-Id: I516c9554836b32a7717ef626afcba0cf4c03d6bf Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30798 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Joachim Fenkes <fenkes@de.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30840 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Cleanup: Getting rid of FIXED_RING_BUF_SIZE (RTC156706).Claus Michael Olsen2016-10-181-1/+0
| | | | | | | | | | | | | Change-Id: I5701bf15e064144d0106eeb921819424777116dc Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31355 Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+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: Martin Peschke <mpeschke@de.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31366 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Cleanup: ring_apply and associated routinesClaus Michael Olsen2016-10-171-2/+1
| | | | | | | | | | | | | | | | | | | Key cleanup items: - Eliminated ringNameImg in GenRingIdList - Getting rid of FIXED_RING_BUF_SIZE, but not until accommodation on HB side to switch to MAX_RING_BUF_SIZE. Change-Id: If23bd5f190b9f83f43805fc618ffa1f54ea40d44 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31118 Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+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: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Martin Peschke <mpeschke@de.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31193 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* p9_xip_customize: Add #G and #R rings to the seeprom image from VPDPrachi Gupta2016-08-301-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | xip_customize supports the following: - Updates mailbox attributes in Seeprom image - Appends Mvpd #G and #R rings (but excl #G GPTR) into .rings ring section. - Shuffles around .hbbl, .overrides and .rings so that .rings is the last section in the Seeprom image as otherwise we can't reappend .rings section after updating it (since it wasn't last to begin with). - Honors of the bootCoreMask to append Vpd rings only for EC/EX/EQs associated with the ECs as indicated in the bootCoreMask. - Removes .toc, .fixedtoc and .strings in the Seeprom image. - Captures FFDC (100% complete). - Detects potential image overflow condition. Change-Id: I68bd2f39e3c407ea196f2228bdd31472a00a4c9e Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26150 Tested-by: Jenkins Server <pfd-jenkins+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/27259 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Update prologs of mirrored files to apache licenseStephen Cprek2016-08-051-8/+14
| | | | | | | | Change-Id: I25a782f6f8af801beb35f541f6076c482b78bf8e Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27920 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* p9_xip_customize L1 checkin w/backwards support for Seeprom MB settings.Claus Michael Olsen2016-07-291-6/+21
| | | | | | | | | | | | Change-Id: I0a70ced101cf57bd469bd960ebeb15a75b2f939b Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27406 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Prem Shanker Jha <premjha2@in.ibm.com> Reviewed-by: Martin Peschke <mpeschke@de.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27407 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
* p9_infrastruct_help: fix missing inludeMartin Peschke2016-07-181-0/+1
| | | | | | | | | | | Use of FAPI macros requires the corresponding fapi header file. Change-Id: I21e1cff98066411d88cbbcc0e292a131978cfdf6 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26663 Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26665 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
* Replace usage of printf() with FAPI_INF() in p9_torBill Hoffa2016-06-141-3/+9
| | | | | | | | | | | Change-Id: If81a7fe4ef17b0da8ef35dcafc74973eee0645e4 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25597 Tested-by: Jenkins Server Reviewed-by: GIRISANKAR PAULRAJ <gpaulraj@in.ibm.com> Tested-by: Hostboot CI Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25683 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* p9_infrastruct_help: cleaning up endianess conversionMartin Peschke2016-06-141-63/+0
| | | | | | | | | | | | | | | Use system header endian.h routines to do endianess conversion instead of own routines. Change-Id: I2d433154f6bb05c69371f832f879f1c2b3cd028a Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24902 Tested-by: Jenkins Server Reviewed-by: Claus M. Olsen <cmolsen@us.ibm.com> Tested-by: Hostboot CI Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Martin Peschke <mpeschke@de.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25619 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Remove File I/O from p9_infrastruct_help.HBill Hoffa2016-06-081-5/+0
| | | | | | | | | | | | | Change-Id: I1e92f4eb8346d55695a1a4371b1e1987ba1262bb Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25476 Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Martin Peschke <mpeschke@de.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25479 Tested-by: FSP CI Jenkins Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
* move production code from tools/imageProcs to chips/p9/utils/imageProcsMartin Peschke2016-06-071-0/+118
Change-Id: I5ea81699989be9b72219dd0715a9080f9ee38e87 Original-Change-Id: I516c770ec7fd6d1fb2f8f7933a2579038c13ce6d Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24786 Tested-by: Jenkins Server Reviewed-by: Claus M. Olsen <cmolsen@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Martin Peschke <mpeschke@de.ibm.com>
OpenPOWER on IntegriCloud