6 #include <linux/module.h>
7 #include <linux/errno.h>
15 void *p_fb; /* it must be physical address */
18 u32 bpp; /* color depth : 16 or 24 */
19 u32 frames; /* frame buffer count : 2 */
21 .special_mark_1 = (('*' << 24) | ('^' << 16) | ('^' << 8) | ('*' << 0)),
22 .special_mark_2 = (('I' << 24) | ('n' << 16) | ('f' << 8) | ('o' << 0)),
23 .special_mark_3 = (('H' << 24) | ('e' << 16) | ('r' << 8) | ('e' << 0)),
24 .special_mark_4 = (('f' << 24) | ('b' << 16) | ('u' << 8) | ('f' << 0)),
27 void sec_getlog_supply_fbinfo(void *p_fb, u32 xres, u32 yres, u32 bpp,
31 pr_info("%s: 0x%p %d %d %d %d\n", __func__, p_fb, xres, yres,
33 if(strcmp(CONFIG_DEFAULT_HOSTNAME,"vlx") == 0)
34 frame_buf_mark.p_fb = (p_fb - 0x012c2000);
36 frame_buf_mark.p_fb = p_fb;
37 frame_buf_mark.xres = xres;
38 frame_buf_mark.yres = yres;
39 frame_buf_mark.bpp = bpp;
40 frame_buf_mark.frames = frames;
43 EXPORT_SYMBOL(sec_getlog_supply_fbinfo);
51 u32 framebuffer_mark_version;
52 void *this; /* this is used for addressing
53 log buffer in 2 dump files */
55 u32 size; /* memory block's size */
56 u32 addr; /* memory block'sPhysical address */
59 .special_mark_1 = (('*' << 24) | ('^' << 16) | ('^' << 8) | ('*' << 0)),
60 .special_mark_2 = (('I' << 24) | ('n' << 16) | ('f' << 8) | ('o' << 0)),
61 .special_mark_3 = (('H' << 24) | ('e' << 16) | ('r' << 8) | ('e' << 0)),
62 .special_mark_4 = (('v' << 24) | ('e' << 16) | ('r' << 8) | ('s' << 0)),
63 .log_mark_version = 1,
64 .framebuffer_mark_version = 1,
65 .this = &marks_ver_mark,
68 /* mark for GetLog extraction */
79 .special_mark_1 = (('*' << 24) | ('^' << 16) | ('^' << 8) | ('*' << 0)),
80 .special_mark_2 = (('I' << 24) | ('n' << 16) | ('f' << 8) | ('o' << 0)),
81 .special_mark_3 = (('H' << 24) | ('e' << 16) | ('r' << 8) | ('e' << 0)),
82 .special_mark_4 = (('p' << 24) | ('l' << 16) | ('o' << 8) | ('g' << 0)),
85 void sec_getlog_supply_loggerinfo(void *p_main,
86 void *p_radio, void *p_events, void *p_system)
88 pr_info("%s: 0x%p 0x%p 0x%p 0x%p\n", __func__, p_main, p_radio,
90 if(strcmp(CONFIG_DEFAULT_HOSTNAME,"vlx") == 0)
92 plat_log_mark.p_main = p_main-0x012c2000; // 0x2500000 means CONFIG_TEXT_OFFSET
93 plat_log_mark.p_radio = p_radio-0x012c2000;
94 plat_log_mark.p_events = p_events-0x012c2000;
95 plat_log_mark.p_system = p_system-0x012c2000;
99 plat_log_mark.p_main = p_main;
100 plat_log_mark.p_radio = p_radio;
101 plat_log_mark.p_events = p_events;
102 plat_log_mark.p_system = p_system;
106 EXPORT_SYMBOL(sec_getlog_supply_loggerinfo);
114 } kernel_log_mark = {
115 .special_mark_1 = (('*' << 24) | ('^' << 16) | ('^' << 8) | ('*' << 0)),
116 .special_mark_2 = (('I' << 24) | ('n' << 16) | ('f' << 8) | ('o' << 0)),
117 .special_mark_3 = (('H' << 24) | ('e' << 16) | ('r' << 8) | ('e' << 0)),
118 .special_mark_4 = (('k' << 24) | ('l' << 16) | ('o' << 8) | ('g' << 0)),
121 void sec_getlog_supply_kloginfo(void *klog_buf)
123 pr_info("%s: 0x%p\n", __func__, klog_buf);
124 if(strcmp(CONFIG_DEFAULT_HOSTNAME,"vlx") == 0)
125 kernel_log_mark.klog_buf = klog_buf-0x012c2000; // for SPRD
127 #ifdef CONFIG_SEC_LOG_BUF_NOCACHE
128 //This is ugly code to support getlog tool(getlog tool doesnt support various vitual addr)
129 kernel_log_mark.klog_buf = 0xC6B00010;
131 kernel_log_mark.klog_buf = klog_buf;
134 EXPORT_SYMBOL(sec_getlog_supply_kloginfo);
136 static int __init sec_getlog_init(void)
138 marks_ver_mark.mem[0].size =
139 meminfo.bank[0].size;
140 marks_ver_mark.mem[0].addr = meminfo.bank[0].start;
141 marks_ver_mark.mem[1].size =
142 meminfo.bank[1].size;
143 marks_ver_mark.mem[1].addr = meminfo.bank[1].start;
148 core_initcall(sec_getlog_init);