summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/deflate.h
diff options
context:
space:
mode:
authorSimon Rettberg2026-01-28 12:53:53 +0100
committerSimon Rettberg2026-01-28 12:53:53 +0100
commit8e82785c584dc13e20f9229decb95bd17bbe9cd1 (patch)
treea8b359e59196be5b2e3862bed189107f4bc9975f /src/include/ipxe/deflate.h
parentMerge branch 'master' into openslx (diff)
parent[prefix] Make unlzma.S compatible with 386 class CPUs (diff)
downloadipxe-openslx.tar.gz
ipxe-openslx.tar.xz
ipxe-openslx.zip
Merge branch 'master' into openslxopenslx
Diffstat (limited to 'src/include/ipxe/deflate.h')
-rw-r--r--src/include/ipxe/deflate.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/include/ipxe/deflate.h b/src/include/ipxe/deflate.h
index b751aa9a3..7e5ae01b9 100644
--- a/src/include/ipxe/deflate.h
+++ b/src/include/ipxe/deflate.h
@@ -8,10 +8,10 @@
*/
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+FILE_SECBOOT ( PERMITTED );
#include <stdint.h>
#include <string.h>
-#include <ipxe/uaccess.h>
/** Compression formats */
enum deflate_format {
@@ -163,6 +163,11 @@ struct deflate {
/** Format */
enum deflate_format format;
+ /** Current input data pointer */
+ const uint8_t *in;
+ /** End of input data pointer */
+ const uint8_t *end;
+
/** Accumulator */
uint32_t accumulator;
/** Bit-reversed accumulator
@@ -240,7 +245,7 @@ struct deflate {
/** A chunk of data */
struct deflate_chunk {
/** Data */
- userptr_t data;
+ void *data;
/** Current offset */
size_t offset;
/** Length of data */
@@ -256,7 +261,7 @@ struct deflate_chunk {
* @v len Length
*/
static inline __attribute__ (( always_inline )) void
-deflate_chunk_init ( struct deflate_chunk *chunk, userptr_t data,
+deflate_chunk_init ( struct deflate_chunk *chunk, void *data,
size_t offset, size_t len ) {
chunk->data = data;
@@ -277,7 +282,7 @@ static inline int deflate_finished ( struct deflate *deflate ) {
extern void deflate_init ( struct deflate *deflate,
enum deflate_format format );
extern int deflate_inflate ( struct deflate *deflate,
- struct deflate_chunk *in,
+ const void *data, size_t len,
struct deflate_chunk *out );
#endif /* _IPXE_DEFLATE_H */