diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/common/image_decompress.h | 24 | ||||
| -rw-r--r-- | include/lib/zlib/tf_gunzip.h | 16 | ||||
| -rw-r--r-- | include/plat/common/platform.h | 12 |
3 files changed, 51 insertions, 1 deletions
diff --git a/include/common/image_decompress.h b/include/common/image_decompress.h new file mode 100644 index 00000000..aed8df30 --- /dev/null +++ b/include/common/image_decompress.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef __IMAGE_DECOMPRESS_H__ +#define __IMAGE_DECOMPRESS_H__ + +#include <stddef.h> +#include <stdint.h> + +struct image_info; + +typedef int (decompressor_t)(uintptr_t *in_buf, size_t in_len, + uintptr_t *out_buf, size_t out_len, + uintptr_t work_buf, size_t work_len); + +void image_decompress_init(uintptr_t buf_base, uint32_t buf_size, + decompressor_t *decompressor); +void image_decompress_prepare(struct image_info *info); +int image_decompress(struct image_info *info); + +#endif /* __IMAGE_DECOMPRESS_H___ */ diff --git a/include/lib/zlib/tf_gunzip.h b/include/lib/zlib/tf_gunzip.h new file mode 100644 index 00000000..46d20eb8 --- /dev/null +++ b/include/lib/zlib/tf_gunzip.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef __TF_GUNZIP_H__ +#define __TF_GUNZIP_H__ + +#include <stddef.h> +#include <stdint.h> + +int gunzip(uintptr_t *in_buf, size_t in_len, uintptr_t *out_buf, + size_t out_len, uintptr_t work_buf, size_t work_len); + +#endif /* __TF_GUNZIP_H___ */ diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h index 09601058..e2f1cfdc 100644 --- a/include/plat/common/platform.h +++ b/include/plat/common/platform.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -155,6 +155,15 @@ struct image_desc *bl1_plat_get_image_desc(unsigned int image_id); */ __dead2 void bl1_plat_fwu_done(void *client_cookie, void *reserved); +#if LOAD_IMAGE_V2 +/* + * This function can be used by the platforms to update/use image + * information for BL2. + */ +int bl1_plat_handle_pre_image_load(void); +int bl1_plat_handle_post_image_load(void); + +#endif /* LOAD_IMAGE_V2 */ /******************************************************************************* * Mandatory BL2 functions @@ -169,6 +178,7 @@ struct meminfo *bl2_plat_sec_mem_layout(void); * This function can be used by the platforms to update/use image * information for given `image_id`. */ +int bl2_plat_handle_pre_image_load(unsigned int image_id); int bl2_plat_handle_post_image_load(unsigned int image_id); #else /* LOAD_IMAGE_V2 */ |
