diff options
author | Sunil Kumar <skumar8j@gfw171.aus.stglabs.ibm.com> | 2017-04-13 12:33:53 -0500 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-07-07 03:44:21 -0400 |
commit | bed2ff6802182156ce5346102cc6ad9ef9664a52 (patch) | |
tree | ea0579dbcc28ea9d1bc27b0c6861ad760127c2c4 /src/boot/loader_l2.c | |
parent | 8a0b1daa3a809ae0d0a5c46d6bdd68a88426433f (diff) | |
download | talos-sbe-bed2ff6802182156ce5346102cc6ad9ef9664a52.tar.gz talos-sbe-bed2ff6802182156ce5346102cc6ad9ef9664a52.zip |
Sbe Compression Decompression
Change-Id: I8eb691ba7b28a4c7347040d3da5c16c01d5b9697
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39225
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/boot/loader_l2.c')
-rw-r--r-- | src/boot/loader_l2.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/boot/loader_l2.c b/src/boot/loader_l2.c index 003a2af6..1bdc0828 100644 --- a/src/boot/loader_l2.c +++ b/src/boot/loader_l2.c @@ -23,20 +23,24 @@ /* */ /* IBM_PROLOG_END_TAG */ #include "sbeXipUtils.H" +#include "sbeDecompression.h" // Load section to destination address int32_t loadSection( P9XipSection * i_section, uint64_t *i_destAddr ) { - uint32_t idx = 0; - uint64_t *seepromAddr = (uint64_t *)( g_headerAddr + i_section->iv_offset); - uint32_t sectionSize = i_section->iv_size; - for( idx = 0; idx < sectionSize; idx += 8 ) - { - *i_destAddr = *seepromAddr; - i_destAddr++; seepromAddr++; + uint32_t rc = 0; + do { - } - return 0; + uint8_t *seepromAddr = (uint8_t *)( g_headerAddr + i_section->iv_offset); + + uint8_t rc = decompress(seepromAddr, (uint8_t *)i_destAddr); + + if (rc != 0 ) + break; + + } while(0); + + return rc; } // Function to load base image into PIBMEM |