1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2017 Chelsio Communications. All rights reserved.
6 #ifndef __CUDBG_LIB_COMMON_H__
7 #define __CUDBG_LIB_COMMON_H__
9 #define CUDBG_SIGNATURE 67856866 /* CUDB in ascii */
11 enum cudbg_dump_type
{
12 CUDBG_DUMP_TYPE_MINI
= 1,
15 enum cudbg_compression_type
{
16 CUDBG_COMPRESSION_NONE
= 1,
17 CUDBG_COMPRESSION_ZLIB
,
35 struct cudbg_entity_hdr
{
43 u8 flag
; /* bit 0 is used to indicate ext data */
45 u32 next_ext_offset
; /* pointer to next extended entity meta data */
49 struct cudbg_ver_hdr
{
67 #define CDUMP_MAX_COMP_BUF_SIZE ((64 * 1024) - 1)
68 #define CUDBG_CHUNK_SIZE ((CDUMP_MAX_COMP_BUF_SIZE / 1024) * 1024)
70 int cudbg_get_buff(struct cudbg_init
*pdbg_init
,
71 struct cudbg_buffer
*pdbg_buff
, u32 size
,
72 struct cudbg_buffer
*pin_buff
);
73 void cudbg_put_buff(struct cudbg_init
*pdbg_init
,
74 struct cudbg_buffer
*pin_buff
);
75 void cudbg_update_buff(struct cudbg_buffer
*pin_buff
,
76 struct cudbg_buffer
*pout_buff
);
77 #endif /* __CUDBG_LIB_COMMON_H__ */