1
2
3
4
5
6
7#ifndef _LOGBUFF_H
8#define _LOGBUFF_H
9
10#ifdef CONFIG_LOGBUFFER
11
12#define LOGBUFF_MAGIC 0xc0de4ced
13#define LOGBUFF_LEN (16384)
14#define LOGBUFF_MASK (LOGBUFF_LEN-1)
15#define LOGBUFF_OVERHEAD (4096)
16#define LOGBUFF_RESERVE (LOGBUFF_LEN+LOGBUFF_OVERHEAD)
17
18
19
20
21typedef struct {
22 union {
23 struct {
24 unsigned long tag;
25 unsigned long start;
26 unsigned long con;
27 unsigned long end;
28 unsigned long chars;
29 } v2;
30 struct {
31 unsigned long dummy;
32 unsigned long tag;
33 unsigned long start;
34 unsigned long size;
35 unsigned long chars;
36 } v1;
37 };
38 unsigned char buf[0];
39} logbuff_t;
40
41int drv_logbuff_init (void);
42void logbuff_init_ptrs (void);
43void logbuff_log(char *msg);
44void logbuff_reset (void);
45unsigned long logbuffer_base (void);
46
47#endif
48
49#endif
50