2 * Copyright (C) 2017 Chelsio Communications. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * The full GNU General Public License is included in this distribution in
14 * the file called "COPYING".
18 #ifndef __CUDBG_LIB_COMMON_H__
19 #define __CUDBG_LIB_COMMON_H__
21 #define CUDBG_SIGNATURE 67856866 /* CUDB in ascii */
23 enum cudbg_dump_type
{
24 CUDBG_DUMP_TYPE_MINI
= 1,
27 enum cudbg_compression_type
{
28 CUDBG_COMPRESSION_NONE
= 1,
46 struct cudbg_entity_hdr
{
54 u8 flag
; /* bit 0 is used to indicate ext data */
56 u32 next_ext_offset
; /* pointer to next extended entity meta data */
60 struct cudbg_ver_hdr
{
78 #define CDUMP_MAX_COMP_BUF_SIZE ((64 * 1024) - 1)
79 #define CUDBG_CHUNK_SIZE ((CDUMP_MAX_COMP_BUF_SIZE / 1024) * 1024)
81 int cudbg_get_buff(struct cudbg_init
*pdbg_init
,
82 struct cudbg_buffer
*pdbg_buff
, u32 size
,
83 struct cudbg_buffer
*pin_buff
);
84 void cudbg_put_buff(struct cudbg_init
*pdbg_init
,
85 struct cudbg_buffer
*pin_buff
);
86 void cudbg_update_buff(struct cudbg_buffer
*pin_buff
,
87 struct cudbg_buffer
*pout_buff
);
88 #endif /* __CUDBG_LIB_COMMON_H__ */