Searched hist:c43d68510e309b8e8d152c158ec46450f14d72a6 (Results 1 – 3 of 3) sorted by relevance
| /rk3399_ARM-atf/lib/zlib/ |
| H A D | zlib.mk | c43d68510e309b8e8d152c158ec46450f14d72a6 Fri Jan 26 02:42:01 UTC 2018 Masahiro Yamada <yamada.masahiro@socionext.com> zlib: add gunzip() support
This commit adds some more files to use zlib from TF.
To use zlib, ->zalloc and ->zfree hooks are needed. The implementation depends on the system. For user-space, the libc provides malloc() and friends. Unfortunately, ARM Trusted Firmware does not provide malloc() or any concept of dynamic memory allocation.
I implemented very simple calloc() and free() for this. Stupidly, zfree() never frees memory, but it works enough for this.
The purpose of using zlib is to implement gunzip() - this function takes compressed data from in_buf, then dumps the decompressed data to oub_buf. The work_buf is used for memory allocation during the decompress. Upon exit, it updates in_buf and out_buf. If successful, in_buf points to the end of input data, out_buf to the end of the decompressed data.
To use this feature, you need to do:
- include lib/zlib/zlib.mk from your platform.mk
- add $(ZLIB_SOURCES) to your BL*_SOURCES
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
|
| H A D | tf_gunzip.c | c43d68510e309b8e8d152c158ec46450f14d72a6 Fri Jan 26 02:42:01 UTC 2018 Masahiro Yamada <yamada.masahiro@socionext.com> zlib: add gunzip() support
This commit adds some more files to use zlib from TF.
To use zlib, ->zalloc and ->zfree hooks are needed. The implementation depends on the system. For user-space, the libc provides malloc() and friends. Unfortunately, ARM Trusted Firmware does not provide malloc() or any concept of dynamic memory allocation.
I implemented very simple calloc() and free() for this. Stupidly, zfree() never frees memory, but it works enough for this.
The purpose of using zlib is to implement gunzip() - this function takes compressed data from in_buf, then dumps the decompressed data to oub_buf. The work_buf is used for memory allocation during the decompress. Upon exit, it updates in_buf and out_buf. If successful, in_buf points to the end of input data, out_buf to the end of the decompressed data.
To use this feature, you need to do:
- include lib/zlib/zlib.mk from your platform.mk
- add $(ZLIB_SOURCES) to your BL*_SOURCES
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
|
| /rk3399_ARM-atf/include/lib/zlib/ |
| H A D | tf_gunzip.h | c43d68510e309b8e8d152c158ec46450f14d72a6 Fri Jan 26 02:42:01 UTC 2018 Masahiro Yamada <yamada.masahiro@socionext.com> zlib: add gunzip() support
This commit adds some more files to use zlib from TF.
To use zlib, ->zalloc and ->zfree hooks are needed. The implementation depends on the system. For user-space, the libc provides malloc() and friends. Unfortunately, ARM Trusted Firmware does not provide malloc() or any concept of dynamic memory allocation.
I implemented very simple calloc() and free() for this. Stupidly, zfree() never frees memory, but it works enough for this.
The purpose of using zlib is to implement gunzip() - this function takes compressed data from in_buf, then dumps the decompressed data to oub_buf. The work_buf is used for memory allocation during the decompress. Upon exit, it updates in_buf and out_buf. If successful, in_buf points to the end of input data, out_buf to the end of the decompressed data.
To use this feature, you need to do:
- include lib/zlib/zlib.mk from your platform.mk
- add $(ZLIB_SOURCES) to your BL*_SOURCES
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
|