From 265ac2d6c7eee92deb434808c72af19b9ff4c9d5 Mon Sep 17 00:00:00 2001 From: Elizabeth Liner Date: Wed, 9 Mar 2016 10:32:37 -0600 Subject: Adding xz decompression functionality for the skiboot image Change-Id: I50d1eaa8bc76a030b42f982e2a967773e113f123 RTC:125550 depends-on: I2a104ec955966a6fcb9ed94dde54ab763c30210a Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/21854 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: William G. Hoffa --- src/usr/pnor/common/ffs_hb.H | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/usr/pnor/common/ffs_hb.H') diff --git a/src/usr/pnor/common/ffs_hb.H b/src/usr/pnor/common/ffs_hb.H index 23070a2e3..a7f579129 100644 --- a/src/usr/pnor/common/ffs_hb.H +++ b/src/usr/pnor/common/ffs_hb.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -52,7 +52,8 @@ enum FFS_CHIPSEL_UNUSED = 0xFF, /**< Chip select not used */ /* Compression : 1 byte */ - FFS_COMPRESS_UNUSED = 0xFF, /**< Compression not used */ + FFS_COMPRESS_XZ = 0x80, /**< Section is XZ compressed */ + FFS_COMPRESS_UNUSED = 0x7F, /**< Compression not used */ /* Data Integrity : 2 bytes */ FFS_INTEG_ECC_PROTECT = 0x8000, /**< Data Integrity: ECC protected */ @@ -76,13 +77,14 @@ enum * This matches the PNOR binary layout of the data[] in an ffs_entry. */ struct ffs_hb_user_t{ - uint8_t chip; /**< Chip Select (0,1) */ - uint8_t compressType; /**< Compression Indication/alg (0=not compressed) */ - uint16_t dataInteg; /**< Indicates Data Integrity mechanism */ - uint8_t verCheck; /**< Indicates Version check type */ - uint8_t miscFlags; /**< Misc Partition related Flags */ - uint8_t freeMisc[2]; /**< Unused Miscellaneious Info */ - uint32_t freeUser[13]; /**< Unused User Data */ + uint8_t chip; /**< Chip Select (0,1) */ + uint8_t compressType; /**< Compression Indication/alg (0=not compressed) */ + uint16_t dataInteg; /**< Indicates Data Integrity mechanism */ + uint8_t verCheck; /**< Indicates Version check type */ + uint8_t miscFlags; /**< Misc Partition related Flags */ + uint8_t freeMisc[2]; /**< Unused Miscellaneious Info */ + uint32_t decompressSize; /**< Size after data is uncompressed in bytes */ + uint32_t freeUser[12]; /**< Unused User Data */ } PACKED; -- cgit v1.2.1