sandbox_spl enables CONFIG_SPL_ZSTD so that link errors show up, but no
test feeds a zstd payload through load_simple_fit(), so the decoder
itself never runs.

Add FIT_INTERNAL_ZSTD and FIT_EXTERNAL_ZSTD next to the LZMA pair and
register them for the NOR loader the same way. do_spl_test_load() picks
the canned blob by compression name instead of assuming LZMA. The plain
payload was already seeded with that name.

image_supported() gives the new pair its own return instead of joining
the LZMA fallthrough, so the LZMA tests do not start depending on
CONFIG_SPL_ZSTD.

The blob is generate_data() output for the seed "zstd", compressed with
the same arguments binman's zstd bintool uses:

  zstd --compress --stdout plain.bin    (zstd v1.5.7)

Signed-off-by: Cole Munz <[email protected]>
---
 include/test/spl.h        |  10 +
 test/image/spl_load.c     | 403 +++++++++++++++++++++++++++++++++++++-
 test/image/spl_load_nor.c |   2 +
 3 files changed, 405 insertions(+), 10 deletions(-)

diff --git a/include/test/spl.h b/include/test/spl.h
index ce0e636d2537..4f66c2da9823 100644
--- a/include/test/spl.h
+++ b/include/test/spl.h
@@ -31,8 +31,10 @@ void generate_data(char *data, size_t size, const char 
*test_name);
  * @IMX8: i.MX8 Container images
  * @FIT_INTERNAL: FITs with internal data
  * @FIT_INTERNAL_LZMA: FITs with internal data, LZMA compressed
+ * @FIT_INTERNAL_ZSTD: FITs with internal data, Zstandard compressed
  * @FIT_EXTERNAL: FITs with external data
  * @FIT_EXTERNAL_LZMA: FITs with external data, LZMA compressed
+ * @FIT_EXTERNAL_ZSTD: FITs with external data, Zstandard compressed
  */
 enum spl_test_image {
        LEGACY,
@@ -40,8 +42,10 @@ enum spl_test_image {
        IMX8,
        FIT_INTERNAL,
        FIT_INTERNAL_LZMA,
+       FIT_INTERNAL_ZSTD,
        FIT_EXTERNAL,
        FIT_EXTERNAL_LZMA,
+       FIT_EXTERNAL_ZSTD,
 };
 
 /**
@@ -88,6 +92,8 @@ int check_image_info(struct unit_test_state *uts, struct 
spl_image_info *info1,
 /* Some compressed data and it size */
 extern const char lzma_compressed[];
 extern const size_t lzma_compressed_size;
+extern const char zstd_compressed[];
+extern const size_t zstd_compressed_size;
 
 /**
  * typedef write_image_t - Callback for writing an image
@@ -135,6 +141,10 @@ static inline bool image_supported(enum spl_test_image 
type)
                return IS_ENABLED(CONFIG_SPL_LEGACY_IMAGE_FORMAT);
        case IMX8:
                return IS_ENABLED(CONFIG_SPL_LOAD_IMX_CONTAINER);
+       case FIT_INTERNAL_ZSTD:
+       case FIT_EXTERNAL_ZSTD:
+               return IS_ENABLED(CONFIG_SPL_ZSTD) &&
+                      IS_ENABLED(CONFIG_SPL_LOAD_FIT);
        case FIT_INTERNAL_LZMA:
        case FIT_EXTERNAL_LZMA:
                if (!IS_ENABLED(CONFIG_SPL_LZMA))
diff --git a/test/image/spl_load.c b/test/image/spl_load.c
index 1fc0b8e9552e..547d130857ca 100644
--- a/test/image/spl_load.c
+++ b/test/image/spl_load.c
@@ -55,6 +55,9 @@ static const char *image_compression(enum spl_test_image type)
        case FIT_INTERNAL_LZMA:
        case FIT_EXTERNAL_LZMA:
                return "lzma";
+       case FIT_INTERNAL_ZSTD:
+       case FIT_EXTERNAL_ZSTD:
+               return "zstd";
        default:
                return NULL;
        }
@@ -306,6 +309,7 @@ size_t create_image(void *dst, enum spl_test_image type,
                return create_imx8(dst, info, data_offset);
        case FIT_EXTERNAL:
        case FIT_EXTERNAL_LZMA:
+       case FIT_EXTERNAL_ZSTD:
                /*
                 * spl_fit_append_fdt will clobber external images with U-Boot's
                 * FDT if the image doesn't have one. Just set the OS to
@@ -316,6 +320,7 @@ size_t create_image(void *dst, enum spl_test_image type,
                external = true;
        case FIT_INTERNAL:
        case FIT_INTERNAL_LZMA:
+       case FIT_INTERNAL_ZSTD:
                info->flags |= SPL_FIT_FOUND;
                return create_fit(dst, info, data_offset, external,
                                  comp ?: "none");
@@ -797,34 +802,412 @@ const char lzma_compressed[] = {
 
 const size_t lzma_compressed_size = sizeof(lzma_compressed);
 
+/*
+ * Zstandard is also too complex to generate on the fly. Compressed with:
+ *   zstd --compress --stdout plain.bin (zstd command line interface 64-bit 
v1.5.7)
+ * where plain.bin holds what generate_data() produces for the seed "zstd".
+ */
+const char zstd_compressed[] = {
+       0x28, 0xb5, 0x2f, 0xfd, 0x64, 0x03, 0x0f, 0x19, 0x80, 0x00, 0x08, 0x10,
+       0x25, 0x30, 0x40, 0x5d, 0x66, 0x79, 0x8a, 0x9b, 0xa5, 0xb6, 0xc9, 0xdd,
+       0xe0, 0xf8, 0x02, 0x1f, 0x2f, 0x38, 0x4b, 0x5e, 0x6b, 0x73, 0x83, 0x93,
+       0xaf, 0xbd, 0xcb, 0xd3, 0xea, 0xf4, 0x00, 0x1f, 0x21, 0x3c, 0x49, 0x5f,
+       0x63, 0x7a, 0x84, 0x9c, 0xa4, 0xb8, 0xc8, 0xd8, 0xe6, 0xf7, 0x00, 0x1f,
+       0x2d, 0x35, 0x44, 0x59, 0x6c, 0x70, 0x8f, 0x92, 0xa2, 0xb2, 0xcf, 0xdf,
+       0xe9, 0xf2, 0x04, 0x1f, 0x26, 0x34, 0x45, 0x53, 0x6c, 0x75, 0x83, 0x90,
+       0xa5, 0xbc, 0xc3, 0xda, 0xe9, 0xfb, 0x0e, 0x13, 0x20, 0x3d, 0x42, 0x5c,
+       0x68, 0x7d, 0x80, 0x99, 0xa6, 0xb8, 0xc6, 0xd7, 0xeb, 0xf3, 0x0a, 0x11,
+       0x22, 0x3f, 0x47, 0x53, 0x60, 0x74, 0x8a, 0x92, 0xae, 0xb1, 0xc5, 0xd0,
+       0xe2, 0xfa, 0x0f, 0x18, 0x2c, 0x3b, 0x41, 0x55, 0x6a, 0x71, 0x86, 0x9e,
+       0xa7, 0xb0, 0xc7, 0xdf, 0xe7, 0xf9, 0x0b, 0x17, 0x2a, 0x35, 0x48, 0x5e,
+       0x65, 0x7c, 0x8a, 0x9b, 0xa4, 0xbc, 0xc6, 0xde, 0xe0, 0xfa, 0x0b, 0x10,
+       0x2c, 0x3a, 0x40, 0x53, 0x67, 0x71, 0x84, 0x9b, 0xa6, 0xb9, 0xc4, 0xd8,
+       0xec, 0xfe, 0x0a, 0x1c, 0x28, 0x35, 0x4e, 0x57, 0x6b, 0x79, 0x84, 0x97,
+       0xad, 0xb5, 0xca, 0xd2, 0xe8, 0xfc, 0x0d, 0x1c, 0x29, 0x3e, 0x45, 0x51,
+       0x66, 0x7e, 0x81, 0x98, 0xa3, 0xb0, 0xc4, 0xd5, 0xe9, 0xf4, 0x0d, 0x1c,
+       0x2a, 0x30, 0x46, 0x53, 0x6d, 0x7f, 0x82, 0x96, 0xab, 0xb6, 0xc8, 0xd8,
+       0xed, 0xfd, 0x0d, 0x1a, 0x2e, 0x31, 0x4c, 0x53, 0x65, 0x79, 0x8d, 0x9b,
+       0xac, 0xba, 0xcf, 0xdf, 0xe5, 0xf4, 0x0c, 0x1d, 0x2b, 0x34, 0x43, 0x53,
+       0x6e, 0x73, 0x84, 0x92, 0xaa, 0xba, 0xcc, 0xd2, 0xe2, 0xf4, 0x00, 0x16,
+       0x21, 0x3a, 0x48, 0x5a, 0x6b, 0x7d, 0x84, 0x9f, 0xa0, 0xb4, 0xc5, 0xd2,
+       0xe2, 0xf6, 0x09, 0x12, 0x2d, 0x3d, 0x47, 0x54, 0x66, 0x7a, 0x8a, 0x9f,
+       0xac, 0xb1, 0xce, 0xd0, 0xed, 0xf6, 0x01, 0x11, 0x28, 0x3a, 0x47, 0x53,
+       0x69, 0x72, 0x84, 0x9a, 0xa5, 0xb6, 0xca, 0xd5, 0xe5, 0xf0, 0x0c, 0x1c,
+       0x23, 0x3e, 0x4f, 0x55, 0x65, 0x76, 0x8b, 0x9e, 0xa5, 0xbe, 0xc6, 0xd9,
+       0xea, 0xf3, 0x0c, 0x18, 0x2d, 0x37, 0x49, 0x52, 0x61, 0x73, 0x84, 0x9a,
+       0xaa, 0xb4, 0xc3, 0xd6, 0xee, 0xfa, 0x07, 0x10, 0x2c, 0x3e, 0x47, 0x59,
+       0x68, 0x73, 0x8a, 0x92, 0xa5, 0xb9, 0xc2, 0xd7, 0xea, 0xff, 0x0f, 0x18,
+       0x21, 0x3d, 0x4d, 0x57, 0x61, 0x75, 0x8a, 0x96, 0xa2, 0xbb, 0xcf, 0xd8,
+       0xeb, 0xf2, 0x06, 0x11, 0x2b, 0x33, 0x46, 0x50, 0x6f, 0x77, 0x84, 0x96,
+       0xae, 0xb0, 0xcb, 0xda, 0xe8, 0xf8, 0x0e, 0x1a, 0x2a, 0x34, 0x45, 0x56,
+       0x61, 0x73, 0x81, 0x9b, 0xa4, 0xbb, 0xc4, 0xd1, 0xe9, 0xfb, 0x08, 0x12,
+       0x2e, 0x3e, 0x42, 0x55, 0x69, 0x75, 0x85, 0x95, 0xa2, 0xbf, 0xc1, 0xd6,
+       0xea, 0xff, 0x03, 0x10, 0x2f, 0x39, 0x49, 0x56, 0x61, 0x7a, 0x89, 0x9e,
+       0xaf, 0xbd, 0xc2, 0xd1, 0xe3, 0xfb, 0x08, 0x11, 0x2a, 0x38, 0x4a, 0x53,
+       0x67, 0x70, 0x8b, 0x94, 0xa9, 0xb4, 0xca, 0xda, 0xea, 0xf3, 0x0e, 0x1a,
+       0x24, 0x3b, 0x4e, 0x5b, 0x63, 0x7f, 0x85, 0x93, 0xad, 0xbc, 0xc1, 0xd9,
+       0xe1, 0xf6, 0x02, 0x1c, 0x23, 0x34, 0x47, 0x5f, 0x63, 0x7a, 0x8d, 0x91,
+       0xa9, 0xb3, 0xc4, 0xd5, 0xec, 0xfb, 0x0a, 0x10, 0x26, 0x3a, 0x47, 0x59,
+       0x60, 0x7a, 0x8b, 0x96, 0xa2, 0xb3, 0xcf, 0xd2, 0xe0, 0xfc, 0x05, 0x1c,
+       0x29, 0x38, 0x49, 0x58, 0x64, 0x7f, 0x81, 0x91, 0xa6, 0xb4, 0xcd, 0xdf,
+       0xe8, 0xfa, 0x0c, 0x15, 0x25, 0x3d, 0x45, 0x56, 0x6f, 0x7e, 0x8d, 0x95,
+       0xab, 0xbd, 0xc8, 0xd9, 0xef, 0xf6, 0x0c, 0x17, 0x2a, 0x3b, 0x47, 0x5e,
+       0x60, 0x73, 0x8f, 0x95, 0xaa, 0xbe, 0xc3, 0xd0, 0xee, 0xfa, 0x00, 0x12,
+       0x2f, 0x38, 0x41, 0x5b, 0x65, 0x78, 0x84, 0x9c, 0xaf, 0xb5, 0xce, 0xd6,
+       0xe7, 0xfd, 0x02, 0x1c, 0x26, 0x33, 0x44, 0x5d, 0x69, 0x71, 0x80, 0x99,
+       0xad, 0xbe, 0xcf, 0xd4, 0xe9, 0xfb, 0x03, 0x1f, 0x22, 0x31, 0x41, 0x52,
+       0x64, 0x7d, 0x86, 0x97, 0xa0, 0xb3, 0xcc, 0xd1, 0xed, 0xf3, 0x0f, 0x1c,
+       0x2f, 0x34, 0x44, 0x52, 0x61, 0x7e, 0x86, 0x98, 0xae, 0xbb, 0xc0, 0xdc,
+       0xe3, 0xff, 0x0f, 0x12, 0x29, 0x36, 0x48, 0x53, 0x68, 0x7b, 0x89, 0x99,
+       0xae, 0xb2, 0xc9, 0xd7, 0xe6, 0xf2, 0x0c, 0x10, 0x21, 0x36, 0x49, 0x59,
+       0x62, 0x73, 0x8f, 0x98, 0xaf, 0xb0, 0xc9, 0xd0, 0xe7, 0xf6, 0x0d, 0x1c,
+       0x29, 0x39, 0x49, 0x51, 0x68, 0x7a, 0x80, 0x97, 0xab, 0xb9, 0xce, 0xd3,
+       0xe2, 0xfb, 0x03, 0x17, 0x2c, 0x38, 0x42, 0x50, 0x6a, 0x7c, 0x8e, 0x90,
+       0xa1, 0xbe, 0xcd, 0xd7, 0xe2, 0xf4, 0x0a, 0x19, 0x28, 0x31, 0x4d, 0x59,
+       0x62, 0x7c, 0x86, 0x95, 0xac, 0xbb, 0xcf, 0xdf, 0xe8, 0xf7, 0x0b, 0x1b,
+       0x24, 0x38, 0x49, 0x51, 0x6f, 0x71, 0x89, 0x99, 0xad, 0xb7, 0xcb, 0xdb,
+       0xe8, 0xf9, 0x0d, 0x1e, 0x2b, 0x3b, 0x4d, 0x58, 0x69, 0x77, 0x88, 0x9c,
+       0xa9, 0xb1, 0xc9, 0xdd, 0xea, 0xf2, 0x07, 0x1f, 0x29, 0x3c, 0x4d, 0x5b,
+       0x63, 0x73, 0x81, 0x92, 0xa2, 0xba, 0xcd, 0xd8, 0xe9, 0xfe, 0x0c, 0x15,
+       0x20, 0x3f, 0x44, 0x53, 0x6c, 0x73, 0x82, 0x91, 0xa9, 0xbd, 0xc5, 0xdb,
+       0xe9, 0xfb, 0x0c, 0x18, 0x2c, 0x3c, 0x47, 0x56, 0x63, 0x7a, 0x89, 0x9e,
+       0xa3, 0xb3, 0xc7, 0xd9, 0xef, 0xfe, 0x0a, 0x1a, 0x2f, 0x3e, 0x4e, 0x51,
+       0x6e, 0x71, 0x8a, 0x94, 0xa2, 0xba, 0xc7, 0xde, 0xe5, 0xfd, 0x04, 0x15,
+       0x28, 0x3a, 0x4c, 0x59, 0x62, 0x77, 0x86, 0x90, 0xa2, 0xb4, 0xc6, 0xd5,
+       0xe7, 0xf1, 0x0a, 0x15, 0x24, 0x36, 0x4a, 0x59, 0x66, 0x76, 0x8a, 0x92,
+       0xab, 0xbe, 0xcc, 0xd9, 0xe1, 0xf7, 0x04, 0x1c, 0x20, 0x34, 0x48, 0x55,
+       0x6d, 0x76, 0x86, 0x98, 0xab, 0xb5, 0xc9, 0xd9, 0xe5, 0xfe, 0x0d, 0x1f,
+       0x2a, 0x34, 0x4c, 0x54, 0x66, 0x7a, 0x8a, 0x9e, 0xab, 0xbf, 0xc7, 0xdf,
+       0xed, 0xf8, 0x03, 0x12, 0x21, 0x3e, 0x48, 0x5e, 0x68, 0x77, 0x82, 0x9d,
+       0xa4, 0xbd, 0xc8, 0xd6, 0xed, 0xf4, 0x0b, 0x14, 0x29, 0x35, 0x49, 0x54,
+       0x6e, 0x7e, 0x80, 0x98, 0xa3, 0xb0, 0xc1, 0xd3, 0xeb, 0xf5, 0x0a, 0x11,
+       0x29, 0x3b, 0x4a, 0x59, 0x6c, 0x7a, 0x82, 0x94, 0xae, 0xbd, 0xc0, 0xd0,
+       0xe4, 0xfb, 0x03, 0x1b, 0x2c, 0x33, 0x42, 0x50, 0x66, 0x77, 0x8b, 0x9b,
+       0xa6, 0xbd, 0xc5, 0xd2, 0xe7, 0xff, 0x0b, 0x16, 0x2e, 0x30, 0x4a, 0x56,
+       0x69, 0x71, 0x8b, 0x94, 0xac, 0xbd, 0xc0, 0xd6, 0xea, 0xfc, 0x02, 0x15,
+       0x23, 0x3a, 0x49, 0x5b, 0x6f, 0x7f, 0x81, 0x9d, 0xaf, 0xbb, 0xcb, 0xd4,
+       0xe8, 0xf9, 0x0e, 0x11, 0x27, 0x31, 0x4e, 0x51, 0x60, 0x72, 0x82, 0x96,
+       0xad, 0xb3, 0xc6, 0xda, 0xe3, 0xfd, 0x09, 0x1b, 0x2a, 0x35, 0x43, 0x5c,
+       0x6a, 0x78, 0x8e, 0x92, 0xa5, 0xb4, 0xc5, 0xd6, 0xe8, 0xfd, 0x0d, 0x10,
+       0x2c, 0x33, 0x44, 0x5c, 0x61, 0x7f, 0x88, 0x9d, 0xaf, 0xb7, 0xcf, 0xd0,
+       0xe4, 0xf7, 0x03, 0x10, 0x28, 0x30, 0x48, 0x53, 0x68, 0x7c, 0x82, 0x97,
+       0xa5, 0xbd, 0xcd, 0xd4, 0xe0, 0xfe, 0x01, 0x1f, 0x2f, 0x34, 0x41, 0x53,
+       0x63, 0x77, 0x8e, 0x9d, 0xa3, 0xbb, 0xc8, 0xd7, 0xe2, 0xf6, 0x04, 0x1c,
+       0x2b, 0x32, 0x46, 0x5f, 0x65, 0x7a, 0x83, 0x9a, 0xa3, 0xb2, 0xc2, 0xd7,
+       0xee, 0xf1, 0x07, 0x1c, 0x26, 0x33, 0x45, 0x5b, 0x66, 0x74, 0x81, 0x93,
+       0xa4, 0xb5, 0xce, 0xd2, 0xe4, 0xf8, 0x03, 0x1e, 0x2e, 0x3d, 0x4c, 0x51,
+       0x6f, 0x7a, 0x8d, 0x91, 0xa0, 0xbf, 0xcd, 0xd6, 0xe5, 0xff, 0x0e, 0x16,
+       0x2a, 0x3b, 0x48, 0x52, 0x64, 0x75, 0x8b, 0x93, 0xa8, 0xb9, 0xca, 0xda,
+       0xef, 0xf6, 0x0a, 0x1a, 0x24, 0x3d, 0x40, 0x59, 0x6b, 0x77, 0x8d, 0x94,
+       0xad, 0xb9, 0xc7, 0xd7, 0xe7, 0xfa, 0x0a, 0x1c, 0x20, 0x34, 0x4f, 0x51,
+       0x6b, 0x7d, 0x82, 0x98, 0xa2, 0xbd, 0xcf, 0xd9, 0xe0, 0xff, 0x0e, 0x11,
+       0x2a, 0x38, 0x43, 0x52, 0x60, 0x7a, 0x81, 0x98, 0xad, 0xb7, 0xc0, 0xd0,
+       0xe1, 0xfe, 0x04, 0x11, 0x23, 0x32, 0x47, 0x59, 0x63, 0x7b, 0x8b, 0x9d,
+       0xa5, 0xb1, 0xc7, 0xdf, 0xe3, 0xfe, 0x07, 0x10, 0x2d, 0x3f, 0x48, 0x5a,
+       0x69, 0x71, 0x88, 0x9a, 0xa9, 0xbb, 0xcb, 0xd0, 0xee, 0xfd, 0x07, 0x1f,
+       0x2b, 0x37, 0x4f, 0x5f, 0x69, 0x7b, 0x83, 0x90, 0xac, 0xb5, 0xc9, 0xd9,
+       0xe8, 0xf9, 0x04, 0x17, 0x23, 0x3b, 0x43, 0x5a, 0x6e, 0x73, 0x82, 0x95,
+       0xae, 0xb2, 0xcd, 0xd3, 0xe8, 0xf8, 0x09, 0x1a, 0x21, 0x3c, 0x42, 0x5e,
+       0x68, 0x74, 0x86, 0x91, 0xa8, 0xbd, 0xcc, 0xd1, 0xe0, 0xf6, 0x04, 0x12,
+       0x2c, 0x3e, 0x46, 0x5d, 0x61, 0x71, 0x85, 0x96, 0xaa, 0xbc, 0xc6, 0xda,
+       0xe1, 0xf3, 0x0d, 0x1c, 0x29, 0x31, 0x47, 0x52, 0x6d, 0x7e, 0x88, 0x94,
+       0xa3, 0xb6, 0xc2, 0xde, 0xe1, 0xfb, 0x00, 0x17, 0x23, 0x35, 0x43, 0x5a,
+       0x66, 0x72, 0x86, 0x92, 0xaa, 0xb6, 0xcb, 0xdc, 0xee, 0xf4, 0x06, 0x13,
+       0x28, 0x38, 0x46, 0x59, 0x67, 0x7f, 0x83, 0x9d, 0xa9, 0xb1, 0xc4, 0xd7,
+       0xe6, 0xf6, 0x02, 0x15, 0x29, 0x33, 0x4a, 0x53, 0x6f, 0x74, 0x85, 0x9f,
+       0xa8, 0xb6, 0xc2, 0xd8, 0xef, 0xf8, 0x0a, 0x1d, 0x2c, 0x3a, 0x40, 0x5e,
+       0x6c, 0x70, 0x80, 0x98, 0xa9, 0xbe, 0xc8, 0xd3, 0xeb, 0xf6, 0x00, 0x1f,
+       0x25, 0x3d, 0x46, 0x5d, 0x64, 0x73, 0x8f, 0x9c, 0xa8, 0xbc, 0xc6, 0xdf,
+       0xe5, 0xff, 0x0f, 0x15, 0x2c, 0x33, 0x4b, 0x5c, 0x6d, 0x7b, 0x82, 0x9f,
+       0xa8, 0xbf, 0xcb, 0xdc, 0xed, 0xf0, 0x0f, 0x11, 0x2e, 0x3d, 0x49, 0x5f,
+       0x6b, 0x73, 0x86, 0x9b, 0xac, 0xb0, 0xce, 0xd8, 0xef, 0xf4, 0x04, 0x17,
+       0x2c, 0x30, 0x46, 0x53, 0x62, 0x73, 0x87, 0x91, 0xaa, 0xb9, 0xc6, 0xd0,
+       0xea, 0xf7, 0x0a, 0x15, 0x2f, 0x30, 0x45, 0x5b, 0x62, 0x7d, 0x8b, 0x98,
+       0xac, 0xbb, 0xc0, 0xd8, 0xeb, 0xff, 0x0e, 0x10, 0x2c, 0x37, 0x44, 0x55,
+       0x64, 0x74, 0x80, 0x9b, 0xa4, 0xbf, 0xc7, 0xdf, 0xe0, 0xf5, 0x0e, 0x1b,
+       0x27, 0x35, 0x44, 0x57, 0x68, 0x7d, 0x88, 0x9c, 0xac, 0xb3, 0xcd, 0xd4,
+       0xe1, 0xf6, 0x0e, 0x12, 0x25, 0x39, 0x4b, 0x56, 0x63, 0x7c, 0x84, 0x9b,
+       0xa6, 0xb0, 0xc7, 0xd2, 0xe6, 0xf4, 0x0e, 0x10, 0x2b, 0x35, 0x46, 0x51,
+       0x6b, 0x7c, 0x8c, 0x92, 0xa3, 0xbe, 0xc6, 0xde, 0xe7, 0xf6, 0x0d, 0x10,
+       0x2a, 0x32, 0x49, 0x59, 0x68, 0x7f, 0x82, 0x96, 0xa4, 0xb3, 0xc2, 0xd2,
+       0xe7, 0xfc, 0x0e, 0x14, 0x21, 0x3e, 0x49, 0x54, 0x67, 0x7f, 0x8d, 0x93,
+       0xa0, 0xb0, 0xc1, 0xd5, 0xe8, 0xf4, 0x0e, 0x1c, 0x2a, 0x3b, 0x42, 0x5c,
+       0x6a, 0x7f, 0x8e, 0x95, 0xa2, 0xbb, 0xcc, 0xde, 0xe2, 0xf9, 0x05, 0x14,
+       0x2e, 0x3f, 0x4f, 0x59, 0x61, 0x7c, 0x82, 0x95, 0xac, 0xb5, 0xca, 0xd7,
+       0xee, 0xf5, 0x09, 0x1b, 0x2a, 0x31, 0x4c, 0x53, 0x6b, 0x78, 0x84, 0x96,
+       0xac, 0xb6, 0xcc, 0xdc, 0xe0, 0xfe, 0x05, 0x17, 0x26, 0x39, 0x4d, 0x52,
+       0x61, 0x7e, 0x88, 0x9c, 0xae, 0xb3, 0xc9, 0xdd, 0xe9, 0xfe, 0x0d, 0x15,
+       0x23, 0x32, 0x4a, 0x54, 0x61, 0x72, 0x89, 0x98, 0xa4, 0xb0, 0xc7, 0xd2,
+       0xe0, 0xf3, 0x05, 0x1a, 0x2a, 0x3e, 0x49, 0x56, 0x6f, 0x79, 0x8e, 0x9b,
+       0xa6, 0xb3, 0xc4, 0xdf, 0xec, 0xf3, 0x06, 0x11, 0x22, 0x3a, 0x4d, 0x56,
+       0x63, 0x78, 0x80, 0x94, 0xad, 0xbc, 0xc9, 0xde, 0xe7, 0xfa, 0x0c, 0x10,
+       0x2a, 0x32, 0x41, 0x5c, 0x6e, 0x79, 0x8a, 0x93, 0xa8, 0xb0, 0xce, 0xd8,
+       0xe0, 0xf9, 0x09, 0x19, 0x2a, 0x3d, 0x44, 0x58, 0x65, 0x77, 0x8d, 0x99,
+       0xa5, 0xb0, 0xc6, 0xdf, 0xe7, 0xf7, 0x0a, 0x1f, 0x23, 0x3f, 0x48, 0x56,
+       0x63, 0x72, 0x84, 0x91, 0xa1, 0xb2, 0xc3, 0xd0, 0xe4, 0xf5, 0x08, 0x17,
+       0x22, 0x35, 0x40, 0x5d, 0x6e, 0x72, 0x85, 0x9f, 0xa5, 0xbd, 0xce, 0xde,
+       0xe3, 0xf9, 0x04, 0x15, 0x2e, 0x3c, 0x45, 0x56, 0x68, 0x75, 0x8c, 0x9a,
+       0xa1, 0xb1, 0xc1, 0xdd, 0xec, 0xf6, 0x07, 0x14, 0x29, 0x3d, 0x44, 0x50,
+       0x69, 0x71, 0x88, 0x91, 0xac, 0xb7, 0xc2, 0xda, 0xee, 0xf1, 0x08, 0x19,
+       0x21, 0x3e, 0x4c, 0x5f, 0x68, 0x76, 0x8e, 0x91, 0xa2, 0xb3, 0xc7, 0xd3,
+       0xee, 0xf8, 0x05, 0x14, 0x24, 0x35, 0x43, 0x58, 0x61, 0x7d, 0x85, 0x92,
+       0xa4, 0xb6, 0xc9, 0xdb, 0xe8, 0xfe, 0x09, 0x1b, 0x2f, 0x3a, 0x4f, 0x5b,
+       0x64, 0x75, 0x8a, 0x9d, 0xa7, 0xbf, 0xc6, 0xd3, 0xeb, 0xfe, 0x0a, 0x1f,
+       0x2a, 0x35, 0x44, 0x52, 0x68, 0x79, 0x87, 0x9a, 0xaf, 0xb2, 0xc6, 0xd6,
+       0xe3, 0xf9, 0x03, 0x1c, 0x2d, 0x34, 0x4a, 0x5d, 0x63, 0x70, 0x88, 0x99,
+       0xad, 0xb8, 0xc0, 0xd2, 0xe9, 0xf2, 0x00, 0x1e, 0x20, 0x34, 0x4b, 0x52,
+       0x64, 0x76, 0x85, 0x98, 0xa8, 0xb9, 0xc4, 0xdc, 0xe3, 0xf6, 0x01, 0x1a,
+       0x2c, 0x3d, 0x4c, 0x54, 0x62, 0x7c, 0x8c, 0x92, 0xa0, 0xb1, 0xc1, 0xdd,
+       0xe0, 0xfc, 0x0a, 0x1c, 0x2c, 0x34, 0x4a, 0x59, 0x6d, 0x73, 0x8d, 0x9f,
+       0xab, 0xb7, 0xca, 0xd5, 0xed, 0xf7, 0x0a, 0x16, 0x2e, 0x3e, 0x4c, 0x5c,
+       0x61, 0x7b, 0x82, 0x92, 0xae, 0xbc, 0xcb, 0xd1, 0xed, 0xf0, 0x04, 0x18,
+       0x2e, 0x31, 0x42, 0x55, 0x69, 0x78, 0x86, 0x9a, 0xa4, 0xb2, 0xca, 0xd2,
+       0xe3, 0xf4, 0x04, 0x16, 0x2b, 0x31, 0x44, 0x57, 0x6f, 0x72, 0x82, 0x9f,
+       0xaa, 0xb3, 0xc1, 0xdf, 0xe3, 0xfe, 0x0f, 0x12, 0x27, 0x30, 0x49, 0x5b,
+       0x62, 0x73, 0x86, 0x91, 0xac, 0xb9, 0xc0, 0xd9, 0xef, 0xfe, 0x0e, 0x18,
+       0x24, 0x3f, 0x4b, 0x54, 0x63, 0x79, 0x8f, 0x90, 0xa3, 0xb3, 0xc6, 0xd7,
+       0xe3, 0xf3, 0x01, 0x1a, 0x24, 0x37, 0x46, 0x5f, 0x65, 0x7a, 0x8a, 0x9f,
+       0xa0, 0xb9, 0xcc, 0xdf, 0xe7, 0xff, 0x0d, 0x1f, 0x22, 0x3b, 0x49, 0x5f,
+       0x69, 0x75, 0x8c, 0x9a, 0xa2, 0xb6, 0xc1, 0xd8, 0xe8, 0xfc, 0x03, 0x14,
+       0x24, 0x3f, 0x45, 0x5b, 0x67, 0x7d, 0x89, 0x9e, 0xab, 0xb9, 0xce, 0xdd,
+       0xe2, 0xf5, 0x0b, 0x15, 0x24, 0x3d, 0x4e, 0x5d, 0x62, 0x79, 0x85, 0x95,
+       0xa4, 0xbd, 0xc8, 0xda, 0xe1, 0xf8, 0x02, 0x14, 0x2f, 0x33, 0x4c, 0x5c,
+       0x6f, 0x75, 0x8b, 0x99, 0xab, 0xba, 0xcb, 0xd7, 0xe5, 0xf0, 0x0d, 0x11,
+       0x23, 0x3a, 0x48, 0x5d, 0x64, 0x7a, 0x8e, 0x94, 0xa4, 0xb3, 0xc4, 0xdd,
+       0xe1, 0xf0, 0x0c, 0x1f, 0x23, 0x36, 0x40, 0x51, 0x66, 0x7f, 0x8b, 0x91,
+       0xad, 0xb7, 0xcd, 0xdf, 0xe8, 0xf9, 0x07, 0x11, 0x23, 0x35, 0x46, 0x57,
+       0x6e, 0x71, 0x80, 0x93, 0xa0, 0xb4, 0xc4, 0xd3, 0xe5, 0xfb, 0x0c, 0x1a,
+       0x22, 0x36, 0x4f, 0x51, 0x65, 0x7d, 0x8d, 0x9c, 0xa1, 0xb6, 0xc6, 0xde,
+       0xe1, 0xf5, 0x04, 0x18, 0x21, 0x31, 0x49, 0x57, 0x64, 0x7a, 0x84, 0x94,
+       0xa1, 0xb4, 0xc6, 0xd9, 0xe6, 0xfd, 0x07, 0x1d, 0x24, 0x31, 0x49, 0x51,
+       0x67, 0x77, 0x84, 0x9a, 0xa4, 0xb1, 0xcd, 0xdc, 0xef, 0xff, 0x0f, 0x13,
+       0x22, 0x36, 0x4b, 0x57, 0x6b, 0x74, 0x81, 0x95, 0xa9, 0xb0, 0xc6, 0xdd,
+       0xee, 0xf8, 0x01, 0x1d, 0x28, 0x35, 0x49, 0x50, 0x60, 0x73, 0x80, 0x9e,
+       0xa4, 0xb9, 0xc6, 0xd5, 0xe2, 0xf2, 0x0e, 0x13, 0x20, 0x3a, 0x4f, 0x5c,
+       0x6c, 0x7d, 0x81, 0x9a, 0xa9, 0xb3, 0xcb, 0xda, 0xe2, 0xf7, 0x05, 0x13,
+       0x24, 0x3d, 0x44, 0x5d, 0x6b, 0x72, 0x81, 0x99, 0xac, 0xb7, 0xc9, 0xdc,
+       0xe9, 0xfc, 0x0e, 0x1e, 0x29, 0x3d, 0x49, 0x59, 0x68, 0x7e, 0x8e, 0x9d,
+       0xae, 0xbf, 0xc0, 0xde, 0xe9, 0xf3, 0x08, 0x13, 0x29, 0x32, 0x4c, 0x5c,
+       0x62, 0x73, 0x82, 0x9a, 0xa7, 0xbf, 0xc7, 0xde, 0xe3, 0xf0, 0x09, 0x1c,
+       0x20, 0x39, 0x47, 0x5f, 0x68, 0x71, 0x8e, 0x94, 0xa9, 0xbe, 0xc5, 0xd0,
+       0xe3, 0xfb, 0x0e, 0x17, 0x29, 0x3c, 0x40, 0x54, 0x61, 0x7b, 0x82, 0x94,
+       0xae, 0xba, 0xce, 0xdc, 0xe7, 0xfe, 0x0b, 0x11, 0x2b, 0x3a, 0x43, 0x5c,
+       0x6b, 0x76, 0x82, 0x9e, 0xac, 0xb3, 0xc3, 0xd1, 0xef, 0xfe, 0x0d, 0x12,
+       0x23, 0x3c, 0x4e, 0x5d, 0x6b, 0x7b, 0x8a, 0x97, 0xa3, 0xb4, 0xc9, 0xd0,
+       0xee, 0xf0, 0x01, 0x1f, 0x2a, 0x3f, 0x41, 0x5c, 0x64, 0x7f, 0x86, 0x92,
+       0xa3, 0xbd, 0xca, 0xd1, 0xe8, 0xfd, 0x08, 0x17, 0x2a, 0x37, 0x4b, 0x55,
+       0x6a, 0x72, 0x87, 0x99, 0xaa, 0xbd, 0xca, 0xdc, 0xe4, 0xfa, 0x06, 0x1f,
+       0x2f, 0x3b, 0x4d, 0x59, 0x66, 0x7a, 0x89, 0x95, 0xa7, 0xbc, 0xc9, 0xd3,
+       0xe0, 0xf7, 0x0a, 0x15, 0x2a, 0x35, 0x40, 0x5d, 0x63, 0x79, 0x84, 0x9e,
+       0xaa, 0xba, 0xcc, 0xd6, 0xee, 0xf9, 0x05, 0x1e, 0x27, 0x3b, 0x4b, 0x5a,
+       0x66, 0x7b, 0x82, 0x91, 0xa5, 0xb5, 0xc4, 0xd8, 0xed, 0xfa, 0x03, 0x11,
+       0x28, 0x30, 0x44, 0x52, 0x6f, 0x71, 0x84, 0x98, 0xa9, 0xb3, 0xcc, 0xd7,
+       0xe2, 0xfa, 0x0a, 0x18, 0x2a, 0x3b, 0x4e, 0x5d, 0x69, 0x77, 0x89, 0x95,
+       0xaa, 0xb8, 0xc9, 0xd8, 0xea, 0xf4, 0x06, 0x12, 0x2b, 0x32, 0x44, 0x5e,
+       0x63, 0x7f, 0x86, 0x9f, 0xa3, 0xb3, 0xcb, 0xd5, 0xe3, 0xf5, 0x09, 0x17,
+       0x2b, 0x3e, 0x4e, 0x5f, 0x68, 0x76, 0x8c, 0x9e, 0xac, 0xb3, 0xc1, 0xd2,
+       0xe1, 0xff, 0x0f, 0x1e, 0x21, 0x39, 0x44, 0x5e, 0x67, 0x78, 0x8e, 0x96,
+       0xa8, 0xba, 0xcd, 0xdf, 0xee, 0xf8, 0x0d, 0x18, 0x29, 0x35, 0x41, 0x5f,
+       0x6e, 0x75, 0x8a, 0x98, 0xac, 0xbe, 0xc0, 0xd1, 0xee, 0xf6, 0x02, 0x17,
+       0x20, 0x3c, 0x49, 0x5b, 0x69, 0x7b, 0x88, 0x95, 0xa5, 0xbc, 0xc5, 0xd7,
+       0xe4, 0xf2, 0x0a, 0x12, 0x24, 0x32, 0x44, 0x50, 0x65, 0x75, 0x8f, 0x92,
+       0xa7, 0xbe, 0xcb, 0xd7, 0xe2, 0xfc, 0x08, 0x16, 0x2a, 0x31, 0x40, 0x5f,
+       0x6b, 0x7c, 0x89, 0x9e, 0xac, 0xb5, 0xcf, 0xdf, 0xe0, 0xfd, 0x01, 0x1b,
+       0x22, 0x36, 0x40, 0x51, 0x6f, 0x7f, 0x8b, 0x98, 0xa1, 0xb6, 0xcf, 0xd2,
+       0xed, 0xfb, 0x0e, 0x10, 0x2b, 0x33, 0x45, 0x5e, 0x63, 0x77, 0x80, 0x92,
+       0xa5, 0xb2, 0xc1, 0xdc, 0xef, 0xfb, 0x03, 0x10, 0x2d, 0x35, 0x43, 0x5f,
+       0x62, 0x7a, 0x8a, 0x9a, 0xa5, 0xbe, 0xc6, 0xdb, 0xe2, 0xfe, 0x0f, 0x1c,
+       0x2b, 0x33, 0x43, 0x58, 0x64, 0x78, 0x8b, 0x90, 0xac, 0xb0, 0xcc, 0xd7,
+       0xee, 0xff, 0x08, 0x19, 0x2e, 0x32, 0x4a, 0x58, 0x6e, 0x79, 0x8f, 0x95,
+       0xa8, 0xbf, 0xce, 0xde, 0xe0, 0xf3, 0x0d, 0x1f, 0x26, 0x32, 0x41, 0x5b,
+       0x61, 0x72, 0x89, 0x90, 0xa0, 0xb0, 0xc2, 0xdd, 0xe8, 0xf1, 0x01, 0x19,
+       0x27, 0x30, 0x49, 0x5e, 0x62, 0x7b, 0x8c, 0x9c, 0xa8, 0xb6, 0xcf, 0xd9,
+       0xe2, 0xf2, 0x0c, 0x1f, 0x29, 0x3c, 0x4c, 0x5b, 0x60, 0x73, 0x85, 0x9b,
+       0xa1, 0xbe, 0xcf, 0xdc, 0xe8, 0xf2, 0x02, 0x16, 0x26, 0x34, 0x4b, 0x56,
+       0x6a, 0x7b, 0x85, 0x95, 0xa1, 0xb4, 0xc0, 0xdc, 0xea, 0xf5, 0x04, 0x18,
+       0x2e, 0x31, 0x44, 0x52, 0x6e, 0x74, 0x86, 0x92, 0xa0, 0xb0, 0xc5, 0xdb,
+       0xe2, 0xf0, 0x03, 0x1a, 0x26, 0x3d, 0x45, 0x53, 0x69, 0x7e, 0x81, 0x90,
+       0xac, 0xb5, 0xcc, 0xdb, 0xe6, 0xff, 0x0d, 0x1b, 0x2d, 0x3a, 0x41, 0x52,
+       0x6b, 0x72, 0x87, 0x93, 0xa4, 0xb0, 0xcd, 0xd4, 0xe0, 0xff, 0x0c, 0x15,
+       0x24, 0x3a, 0x4a, 0x52, 0x6b, 0x7c, 0x8b, 0x9a, 0xa9, 0xb2, 0xc5, 0xd5,
+       0xe4, 0xf3, 0x09, 0x13, 0x26, 0x31, 0x4b, 0x5d, 0x67, 0x7c, 0x84, 0x90,
+       0xa6, 0xb2, 0xc8, 0xd9, 0xe8, 0xf1, 0x08, 0x1c, 0x2b, 0x39, 0x43, 0x57,
+       0x67, 0x72, 0x82, 0x9a, 0xaf, 0xbc, 0xce, 0xdf, 0xe5, 0xfe, 0x0d, 0x11,
+       0x2c, 0x3d, 0x4c, 0x5f, 0x63, 0x78, 0x8d, 0x9d, 0xa9, 0xbf, 0xcf, 0xde,
+       0xeb, 0xff, 0x0d, 0x13, 0x2c, 0x35, 0x46, 0x5d, 0x6a, 0x75, 0x87, 0x91,
+       0xa5, 0xbd, 0xcf, 0xd7, 0xe8, 0xf8, 0x06, 0x1a, 0x21, 0x33, 0x46, 0x54,
+       0x63, 0x7d, 0x8b, 0x94, 0xa2, 0xb0, 0xcd, 0xde, 0xe6, 0xf2, 0x0c, 0x1e,
+       0x25, 0x37, 0x43, 0x5e, 0x6f, 0x73, 0x8e, 0x99, 0xa8, 0xbc, 0xc0, 0xd9,
+       0xe2, 0xfc, 0x04, 0x1b, 0x2e, 0x3e, 0x4d, 0x55, 0x61, 0x7d, 0x8b, 0x91,
+       0xa5, 0xbf, 0xca, 0xd5, 0xec, 0xfb, 0x07, 0x14, 0x22, 0x34, 0x41, 0x50,
+       0x66, 0x70, 0x8f, 0x94, 0xaf, 0xb1, 0xc0, 0xd5, 0xe3, 0xff, 0x00, 0x1e,
+       0x2a, 0x3b, 0x46, 0x51, 0x64, 0x7c, 0x8a, 0x9f, 0xa5, 0xb8, 0xc1, 0xde,
+       0xe8, 0xfb, 0x01, 0x16, 0x26, 0x31, 0x46, 0x57, 0x6a, 0x79, 0x87, 0x9d,
+       0xa5, 0xbe, 0xcc, 0xd1, 0xed, 0xf4, 0x08, 0x11, 0x2c, 0x30, 0x44, 0x5a,
+       0x67, 0x73, 0x8c, 0x97, 0xa5, 0xbc, 0xca, 0xdb, 0xeb, 0xf6, 0x0c, 0x13,
+       0x2c, 0x3b, 0x4b, 0x5a, 0x6d, 0x75, 0x80, 0x99, 0xa6, 0xb9, 0xca, 0xde,
+       0xe5, 0xf1, 0x00, 0x16, 0x21, 0x3b, 0x46, 0x5a, 0x69, 0x7f, 0x8e, 0x96,
+       0xa2, 0xbb, 0xcf, 0xdd, 0xec, 0xfd, 0x0c, 0x1e, 0x22, 0x3b, 0x4d, 0x57,
+       0x64, 0x76, 0x88, 0x9f, 0xad, 0xb2, 0xc6, 0xd9, 0xe8, 0xf2, 0x03, 0x1d,
+       0x25, 0x3e, 0x42, 0x53, 0x6f, 0x73, 0x81, 0x9f, 0xa5, 0xbc, 0xc8, 0xd7,
+       0xef, 0xf4, 0x0a, 0x11, 0x25, 0x36, 0x43, 0x56, 0x65, 0x7f, 0x88, 0x93,
+       0xa6, 0xb9, 0xce, 0xd9, 0xea, 0xf3, 0x0f, 0x16, 0x2a, 0x3a, 0x44, 0x52,
+       0x6d, 0x77, 0x8e, 0x9b, 0xa5, 0xba, 0xcd, 0xd9, 0xee, 0xf4, 0x05, 0x1f,
+       0x2b, 0x35, 0x41, 0x51, 0x63, 0x71, 0x8e, 0x96, 0xa2, 0xbe, 0xc0, 0xd2,
+       0xed, 0xfd, 0x02, 0x18, 0x23, 0x34, 0x4d, 0x5a, 0x61, 0x7d, 0x85, 0x98,
+       0xa1, 0xb0, 0xc3, 0xd8, 0xec, 0xf4, 0x08, 0x12, 0x2e, 0x36, 0x4d, 0x5b,
+       0x68, 0x75, 0x85, 0x96, 0xaa, 0xb9, 0xc2, 0xd8, 0xe0, 0xf9, 0x0f, 0x1e,
+       0x21, 0x3d, 0x49, 0x59, 0x65, 0x7c, 0x89, 0x9b, 0xa6, 0xbf, 0xc5, 0xd4,
+       0xea, 0xf6, 0x0d, 0x12, 0x27, 0x3d, 0x41, 0x5b, 0x64, 0x70, 0x81, 0x99,
+       0xa8, 0xb3, 0xc4, 0xde, 0xe7, 0xf3, 0x0f, 0x1b, 0x2b, 0x39, 0x46, 0x54,
+       0x6f, 0x7d, 0x8d, 0x9d, 0xa3, 0xbc, 0xcc, 0xd1, 0xe4, 0xf5, 0x0f, 0x19,
+       0x28, 0x3d, 0x43, 0x51, 0x63, 0x79, 0x80, 0x97, 0xae, 0xb3, 0xc2, 0xd7,
+       0xe7, 0xff, 0x02, 0x1b, 0x29, 0x31, 0x4d, 0x51, 0x67, 0x79, 0x85, 0x96,
+       0xa8, 0xb0, 0xce, 0xd6, 0xe5, 0xf8, 0x0c, 0x10, 0x21, 0x3d, 0x4e, 0x5c,
+       0x60, 0x7f, 0x84, 0x98, 0xab, 0xb2, 0xc5, 0xdf, 0xe3, 0xf6, 0x00, 0x10,
+       0x20, 0x31, 0x40, 0x5f, 0x69, 0x7f, 0x84, 0x94, 0xa8, 0xb2, 0xc0, 0xd9,
+       0xe9, 0xfd, 0x0f, 0x15, 0x2f, 0x3d, 0x42, 0x52, 0x69, 0x7c, 0x86, 0x9f,
+       0xa5, 0xbc, 0xc7, 0xd4, 0xe0, 0xf7, 0x0e, 0x1e, 0x24, 0x3c, 0x4d, 0x52,
+       0x68, 0x75, 0x88, 0x96, 0xab, 0xb5, 0xc7, 0xd5, 0xeb, 0xf8, 0x07, 0x1a,
+       0x2b, 0x35, 0x4a, 0x57, 0x63, 0x7b, 0x8f, 0x96, 0xad, 0xb4, 0xc4, 0xd7,
+       0xe1, 0xfa, 0x0a, 0x1f, 0x24, 0x36, 0x4b, 0x5f, 0x61, 0x77, 0x8d, 0x9a,
+       0xac, 0xbc, 0xcb, 0xd9, 0xe4, 0xfa, 0x00, 0x1b, 0x21, 0x33, 0x4c, 0x52,
+       0x69, 0x74, 0x8f, 0x94, 0xa6, 0xba, 0xc3, 0xd3, 0xec, 0xf0, 0x08, 0x1b,
+       0x2e, 0x31, 0x48, 0x58, 0x6d, 0x71, 0x87, 0x9a, 0xa2, 0xbd, 0xc8, 0xdb,
+       0xe0, 0xfc, 0x05, 0x13, 0x2a, 0x3a, 0x4f, 0x5e, 0x69, 0x70, 0x82, 0x90,
+       0xa0, 0xbb, 0xcb, 0xda, 0xec, 0xfd, 0x01, 0x19, 0x20, 0x30, 0x44, 0x5b,
+       0x61, 0x7a, 0x87, 0x98, 0xa4, 0xb0, 0xc4, 0xd1, 0xeb, 0xfa, 0x0b, 0x11,
+       0x2f, 0x3b, 0x4a, 0x5d, 0x61, 0x7e, 0x85, 0x9a, 0xaa, 0xb5, 0xce, 0xdb,
+       0xe3, 0xff, 0x0b, 0x14, 0x2e, 0x3f, 0x48, 0x5b, 0x66, 0x72, 0x82, 0x9f,
+       0xa7, 0xb9, 0xc1, 0xdd, 0xeb, 0xfc, 0x0a, 0x15, 0x28, 0x30, 0x48, 0x52,
+       0x62, 0x71, 0x8b, 0x92, 0xa1, 0xb0, 0xc0, 0xda, 0xee, 0xff, 0x02, 0x17,
+       0x23, 0x3e, 0x42, 0x5a, 0x68, 0x7d, 0x86, 0x94, 0xaf, 0xbe, 0xc4, 0xd8,
+       0xef, 0xfb, 0x09, 0x15, 0x25, 0x3d, 0x43, 0x58, 0x6b, 0x7c, 0x8e, 0x97,
+       0xa9, 0xbf, 0xc8, 0xdb, 0xe2, 0xf3, 0x0c, 0x1f, 0x26, 0x3c, 0x4b, 0x52,
+       0x6f, 0x78, 0x89, 0x9f, 0xaf, 0xb8, 0xc6, 0xdd, 0xe9, 0xf6, 0x08, 0x13,
+       0x25, 0x3c, 0x48, 0x5c, 0x60, 0x71, 0x87, 0x96, 0xa3, 0xb7, 0xc2, 0xd7,
+       0xee, 0xf6, 0x0d, 0x1b, 0x25, 0x31, 0x4c, 0x54, 0x6f, 0x76, 0x85, 0x95,
+       0xa0, 0xb6, 0xc2, 0xdf, 0xe1, 0xfa, 0x01, 0x19, 0x23, 0x32, 0x45, 0x51,
+       0x6c, 0x74, 0x85, 0x9c, 0xaf, 0xb2, 0xc9, 0xdd, 0xea, 0xf5, 0x00, 0x1f,
+       0x20, 0x35, 0x42, 0x5a, 0x63, 0x78, 0x80, 0x9e, 0xa3, 0xb2, 0xc0, 0xda,
+       0xeb, 0xf1, 0x0c, 0x19, 0x2d, 0x3b, 0x4d, 0x58, 0x6f, 0x7f, 0x8e, 0x91,
+       0xa6, 0xbe, 0xc7, 0xdb, 0xe8, 0xf0, 0x0d, 0x15, 0x29, 0x34, 0x4a, 0x5c,
+       0x6f, 0x79, 0x87, 0x9f, 0xa1, 0xb8, 0xc6, 0xde, 0xe0, 0xfb, 0x04, 0x19,
+       0x21, 0x36, 0x4f, 0x5f, 0x66, 0x7d, 0x8b, 0x97, 0xac, 0xb8, 0xc3, 0xd9,
+       0xe2, 0xf0, 0x08, 0x13, 0x26, 0x35, 0x4a, 0x56, 0x67, 0x71, 0x8c, 0x9f,
+       0xaf, 0xb5, 0xcc, 0xda, 0xe0, 0xf6, 0x0b, 0x18, 0x26, 0x31, 0x4a, 0x50,
+       0x61, 0x78, 0x8f, 0x90, 0xa7, 0xba, 0xc6, 0xd1, 0xed, 0xfe, 0x03, 0x1c,
+       0x2e, 0x34, 0x4e, 0x59, 0x6d, 0x75, 0x87, 0x9f, 0xa4, 0xb7, 0xca, 0xd4,
+       0xee, 0xfe, 0x08, 0x1a, 0x27, 0x3d, 0x4f, 0x59, 0x60, 0x7f, 0x84, 0x91,
+       0xa1, 0xb5, 0xc4, 0xd0, 0xee, 0xfd, 0x07, 0x17, 0x28, 0x31, 0x47, 0x59,
+       0x61, 0x75, 0x8d, 0x93, 0xa6, 0xb2, 0xc3, 0xd3, 0xee, 0xf3, 0x0a, 0x18,
+       0x2d, 0x30, 0x44, 0x58, 0x68, 0x79, 0x8e, 0x96, 0xa6, 0xb7, 0xcd, 0xd3,
+       0xe0, 0xff, 0x01, 0x14, 0x28, 0x37, 0x4e, 0x5e, 0x6d, 0x78, 0x83, 0x95,
+       0xa2, 0xbe, 0xce, 0xd3, 0xe8, 0xf2, 0x00, 0x1b, 0x23, 0x31, 0x43, 0x57,
+       0x68, 0x7c, 0x8b, 0x93, 0xaf, 0xbd, 0xc5, 0xdb, 0xe0, 0xf3, 0x0e, 0x12,
+       0x2f, 0x3f, 0x46, 0x59, 0x63, 0x7b, 0x8b, 0x9f, 0xab, 0xb9, 0xcc, 0xd2,
+       0xe6, 0xff, 0x05, 0x19, 0x21, 0x36, 0x42, 0x54, 0x6c, 0x79, 0x82, 0x95,
+       0xa4, 0xbf, 0xc6, 0xd6, 0xe7, 0xfc, 0x03, 0x15, 0x24, 0x35, 0x4e, 0x54,
+       0x63, 0x7e, 0x8f, 0x96, 0xab, 0xbb, 0xc9, 0xd8, 0xe6, 0xf1, 0x09, 0x13,
+       0x28, 0x3c, 0x41, 0x58, 0x6b, 0x7b, 0x8a, 0x9b, 0xa6, 0xb6, 0xc3, 0xd7,
+       0xe9, 0xf6, 0x0f, 0x1e, 0x2f, 0x32, 0x40, 0x53, 0x68, 0x7e, 0x85, 0x93,
+       0xa2, 0xb0, 0xc0, 0xdb, 0xe2, 0xf1, 0x06, 0x11, 0x22, 0x35, 0x4e, 0x57,
+       0x67, 0x7c, 0x81, 0x92, 0xa5, 0xb7, 0xc2, 0xdb, 0xed, 0xf7, 0x08, 0x1c,
+       0x2a, 0x31, 0x41, 0x57, 0x6d, 0x70, 0x84, 0x9b, 0xa6, 0xb3, 0xc2, 0xd8,
+       0xe1, 0xff, 0x08, 0x17, 0x2a, 0x3c, 0x4e, 0x59, 0x6e, 0x7d, 0x89, 0x95,
+       0xa4, 0xbb, 0xc3, 0xdd, 0xe0, 0xfa, 0x06, 0x12, 0x2a, 0x38, 0x4f, 0x5c,
+       0x69, 0x77, 0x85, 0x9b, 0xa1, 0xb9, 0xcd, 0xd6, 0xe0, 0xfb, 0x0a, 0x1a,
+       0x29, 0x3a, 0x49, 0x54, 0x65, 0x78, 0x8d, 0x94, 0xad, 0xb6, 0xc0, 0xda,
+       0xeb, 0xff, 0x0b, 0x1e, 0x2c, 0x30, 0x4b, 0x5f, 0x68, 0x78, 0x87, 0x96,
+       0xa0, 0xb6, 0xc0, 0xd2, 0xed, 0xf1, 0x09, 0x1b, 0x23, 0x3f, 0x4c, 0x53,
+       0x61, 0x79, 0x8a, 0x91, 0xaf, 0xb2, 0xc9, 0xd9, 0xe5, 0xfa, 0x01, 0x1c,
+       0x27, 0x33, 0x45, 0x5b, 0x69, 0x7e, 0x85, 0x9f, 0xa0, 0xb1, 0xc6, 0xd2,
+       0xeb, 0xf8, 0x00, 0x15, 0x2c, 0x30, 0x48, 0x5f, 0x69, 0x7e, 0x8e, 0x99,
+       0xa1, 0xb3, 0xc0, 0xde, 0xeb, 0xfc, 0x0a, 0x18, 0x26, 0x3d, 0x44, 0x58,
+       0x6b, 0x7f, 0x89, 0x9c, 0xad, 0xb7, 0xcc, 0xdb, 0xe6, 0xf1, 0x08, 0x10,
+       0x26, 0x36, 0x45, 0x52, 0x69, 0x7a, 0x88, 0x9e, 0xa4, 0xb6, 0xc0, 0xda,
+       0xee, 0xfd, 0x0d, 0x1d, 0x22, 0x37, 0x45, 0x5b, 0x6f, 0x73, 0x8a, 0x9f,
+       0xaa, 0xbc, 0xc3, 0xd3, 0xeb, 0xff, 0x0a, 0x1a, 0x2d, 0x3f, 0x4c, 0x5b,
+       0x6a, 0x79, 0x8e, 0x95, 0xa3, 0xb5, 0xc8, 0xd4, 0xe5, 0xfa, 0x06, 0x1e,
+       0x2f, 0x36, 0x4d, 0x54, 0x60, 0x7e, 0x87, 0x95, 0xa2, 0xb9, 0xc0, 0xd3,
+       0xe9, 0xf7, 0x04, 0x1c, 0x2f, 0x33, 0x4a, 0x5e, 0x66, 0x76, 0x86, 0x98,
+       0xa5, 0xb8, 0xcd, 0xd2, 0xe6, 0xfd, 0x09, 0x1f, 0x2e, 0x32, 0x40, 0x56,
+       0x66, 0x7f, 0x88, 0x99, 0xa7, 0xbf, 0xc3, 0xd0, 0xed, 0xf1, 0x04, 0x17,
+       0x2a, 0x30, 0x4f, 0x5d, 0x66, 0x77, 0x84, 0x9a, 0xaf, 0xb2, 0xc2, 0xdf,
+       0xe2, 0xf8, 0x05, 0x1c, 0x29, 0x32, 0x4f, 0x5b, 0x62, 0x71, 0x89, 0x93,
+       0xa8, 0xb0, 0xc5, 0xdc, 0xe2, 0xf8, 0x01, 0x1f, 0x20, 0x33, 0x46, 0x51,
+       0x6b, 0x73, 0x8b, 0x90, 0xa1, 0xb8, 0xc0, 0xde, 0xe0, 0xff, 0x05, 0x13,
+       0x22, 0x3f, 0x4a, 0x5e, 0x69, 0x74, 0x8b, 0x94, 0xa8, 0xbc, 0xca, 0xd7,
+       0xed, 0xfd, 0x0f, 0x17, 0x23, 0x30, 0x48, 0x56, 0x6f, 0x7e, 0x88, 0x96,
+       0xa5, 0xbf, 0xc7, 0xd5, 0xe5, 0xf3, 0x02, 0x1f, 0x22, 0x32, 0x4f, 0x5d,
+       0x6a, 0x76, 0x8e, 0x91, 0xa2, 0xb6, 0xcb, 0xd9, 0xe7, 0xf1, 0x0d, 0x15,
+       0x25, 0x3c, 0x46, 0x50, 0x64, 0x7e, 0x89, 0x9e, 0xa8, 0xb5, 0xcb, 0xdb,
+       0xee, 0xf9, 0x05, 0x1c, 0x22, 0x3d, 0x40, 0x53, 0x62, 0x77, 0x85, 0x91,
+       0xa6, 0xb1, 0xc6, 0xd3, 0xe0, 0xfb, 0x00, 0x11, 0x2b, 0x34, 0x48, 0x51,
+       0x61, 0x74, 0x8d, 0x95, 0xab, 0xb0, 0xc4, 0xd2, 0xe9, 0xfa, 0x0a, 0x11,
+       0x2f, 0x31, 0x46, 0x58, 0x61, 0x73, 0x89, 0x9c, 0xaf, 0xb9, 0xcd, 0xd5,
+       0xe5, 0xff, 0x06, 0x1f, 0x20, 0x3e, 0x40, 0x57, 0x61, 0x7b, 0x85, 0x91,
+       0xae, 0xb0, 0xc3, 0xd5, 0xec, 0xfc, 0x0b, 0x1c, 0x25, 0x37, 0x4b, 0x5a,
+       0x65, 0x7f, 0x80, 0x99, 0xa5, 0xb4, 0xc6, 0xdb, 0xe1, 0xfa, 0x09, 0x1b,
+       0x2e, 0x3e, 0x40, 0x51, 0x68, 0x74, 0x8a, 0x9a, 0xa9, 0xb4, 0xcf, 0xd2,
+       0xed, 0xfe, 0x06, 0x1c, 0x20, 0x7f, 0xf1, 0x25, 0x55
+};
+
+const size_t zstd_compressed_size = sizeof(zstd_compressed);
+
+/**
+ * canned_blob() - Look up the canned compressed payload for a comp name
+ * @comp: FIT "compression" name, as returned by image_compression()
+ * @size: Set to the size of the returned blob
+ *
+ * Each canned blob holds what generate_data() produces for a seed equal to
+ * its own comp name.
+ *
+ * Return: the blob
+ */
+static const char *canned_blob(const char *comp, size_t *size)
+{
+       if (!strcmp(comp, "zstd")) {
+               *size = zstd_compressed_size;
+               return zstd_compressed;
+       }
+
+       *size = lzma_compressed_size;
+       return lzma_compressed;
+}
+
 int do_spl_test_load(struct unit_test_state *uts, const char *test_name,
                     enum spl_test_image type, struct spl_image_loader *loader,
                     int (*write_image)(struct unit_test_state *, void *, 
size_t))
 {
        size_t img_size, img_data, plain_size = SPL_TEST_DATA_SIZE;
-       bool compressed = image_compression(type);
-       struct spl_image_info info_write = {
-               .name = test_name,
-               .size = compressed ? lzma_compressed_size : plain_size,
-       }, info_read = { };
+       const char *comp = image_compression(type);
+       const char *blob = NULL;
+       size_t blob_size = 0;
+       struct spl_image_info info_write = { .name = test_name };
+       struct spl_image_info info_read = { };
        struct spl_boot_device bootdev = {
                .boot_device = loader->boot_device,
        };
        char *data, *plain;
        void *img;
 
+       if (comp)
+               blob = canned_blob(comp, &blob_size);
+       info_write.size = blob ? blob_size : plain_size;
+
        img_size = create_image(NULL, type, &info_write, &img_data);
        ut_assert(img_size);
        img = calloc(img_size, 1);
        ut_assertnonnull(img);
 
        data = img + img_data;
-       if (compressed) {
+       if (blob) {
                plain = malloc(plain_size);
                ut_assertnonnull(plain);
                /* The canned blob holds what this seed generates */
-               generate_data(plain, plain_size, "lzma");
-               memcpy(data, lzma_compressed, lzma_compressed_size);
+               generate_data(plain, plain_size, comp);
+               memcpy(data, blob, blob_size);
        } else {
                plain = data;
                generate_data(plain, plain_size, test_name);
@@ -837,11 +1220,11 @@ int do_spl_test_load(struct unit_test_state *uts, const 
char *test_name,
        ut_assertok(loader->load_image(&info_read, &bootdev));
        if (check_image_info(uts, &info_write, &info_read))
                return CMD_RET_FAILURE;
-       if (compressed)
+       if (blob)
                ut_asserteq(plain_size, info_read.size);
        ut_asserteq_mem(plain, phys_to_virt(info_write.load_addr), plain_size);
 
-       if (compressed)
+       if (blob)
                free(plain);
        free(img);
        return 0;
diff --git a/test/image/spl_load_nor.c b/test/image/spl_load_nor.c
index 32265f6346f4..c0a2e71745c8 100644
--- a/test/image/spl_load_nor.c
+++ b/test/image/spl_load_nor.c
@@ -36,7 +36,9 @@ SPL_IMG_TEST(spl_test_nor, LEGACY_LZMA, 0);
 SPL_IMG_TEST(spl_test_nor, IMX8, 0);
 SPL_IMG_TEST(spl_test_nor, FIT_INTERNAL, 0);
 SPL_IMG_TEST(spl_test_nor, FIT_INTERNAL_LZMA, 0);
+SPL_IMG_TEST(spl_test_nor, FIT_INTERNAL_ZSTD, 0);
 #if !IS_ENABLED(CONFIG_SPL_LOAD_FIT_FULL)
 SPL_IMG_TEST(spl_test_nor, FIT_EXTERNAL, 0);
 SPL_IMG_TEST(spl_test_nor, FIT_EXTERNAL_LZMA, 0);
+SPL_IMG_TEST(spl_test_nor, FIT_EXTERNAL_ZSTD, 0);
 #endif
-- 
2.55.0


Reply via email to