nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /*************************************************************************** |
2 | * * |
||
3 | * ########### ########### ########## ########## * |
||
4 | * ############ ############ ############ ############ * |
||
5 | * ## ## ## ## ## ## ## * |
||
6 | * ## ## ## ## ## ## ## * |
||
7 | * ########### #### ###### ## ## ## ## ###### * |
||
8 | * ########### #### # ## ## ## ## # # * |
||
9 | * ## ## ###### ## ## ## ## # # * |
||
10 | * ## ## # ## ## ## ## # # * |
||
11 | * ############ ##### ###### ## ## ## ##### ###### * |
||
12 | * ########### ########### ## ## ## ########## * |
||
13 | * * |
||
14 | * S E C U R E M O B I L E N E T W O R K I N G * |
||
15 | * * |
||
16 | * This file is part of NexMon. * |
||
17 | * * |
||
18 | * Copyright (c) 2016 NexMon Team * |
||
19 | * * |
||
20 | * NexMon is free software: you can redistribute it and/or modify * |
||
21 | * it under the terms of the GNU General Public License as published by * |
||
22 | * the Free Software Foundation, either version 3 of the License, or * |
||
23 | * (at your option) any later version. * |
||
24 | * * |
||
25 | * NexMon is distributed in the hope that it will be useful, * |
||
26 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
27 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
28 | * GNU General Public License for more details. * |
||
29 | * * |
||
30 | * You should have received a copy of the GNU General Public License * |
||
31 | * along with NexMon. If not, see <http://www.gnu.org/licenses/>. * |
||
32 | * * |
||
33 | **************************************************************************/ |
||
34 | |||
35 | #include <firmware_version.h> // definition of firmware version macros |
||
36 | #include <debug.h> // contains macros to access the debug hardware |
||
37 | #include <wrapper.h> // wrapper definitions for functions that already exist in the firmware |
||
38 | #include <structs.h> // structures that are used by the code in the firmware |
||
39 | #include <helper.h> // useful helper functions |
||
40 | #include <patcher.h> // macros used to craete patches such as BLPatch, BPatch, ... |
||
41 | #include <rates.h> // rates used to build the ratespec for frame injection |
||
42 | |||
43 | struct hndrte_debug { |
||
44 | uint32 magic; |
||
45 | #define HNDRTE_DEBUG_MAGIC 0x47424544 /* 'DEBG' */ |
||
46 | |||
47 | uint32 version; /* Debug struct version */ |
||
48 | #define HNDRTE_DEBUG_VERSION 1 |
||
49 | |||
50 | uint32 fwid; /* 4 bytes of fw info */ |
||
51 | char epivers[32]; |
||
52 | |||
53 | uint32 trap_ptr; /* trap_t data struct */ |
||
54 | uint32 console; /* Console */ |
||
55 | |||
56 | uint32 ram_base; |
||
57 | uint32 ram_size; |
||
58 | |||
59 | uint32 rom_base; |
||
60 | uint32 rom_size; |
||
61 | |||
62 | uint32 event_log_top; |
||
63 | |||
64 | }; |
||
65 | |||
66 | __attribute__((at(0x180100, "", CHIP_VER_BCM4335b0, FW_VER_6_30_171_1_sta))) |
||
67 | struct hndrte_debug dbg = { |
||
68 | .magic = HNDRTE_DEBUG_MAGIC, |
||
69 | .version = HNDRTE_DEBUG_VERSION, |
||
70 | .fwid = 0, |
||
71 | .epivers = { 0 }, |
||
72 | .trap_ptr = 0, |
||
73 | .console = 0x1FB7D0, |
||
74 | .ram_base = 0x180000, |
||
75 | .ram_size = 768 * 1024, |
||
76 | .rom_base = 0, |
||
77 | .rom_size = 640 * 1024, |
||
78 | .event_log_top = 0x0 |
||
79 | }; |
||
80 | |||
81 | __attribute__((at(0x180878, "", CHIP_VER_BCM4335b0, FW_VER_6_30_171_1_sta))) |
||
82 | GenericPatch4(dbpp, 0x50504244); |
||
83 | |||
84 | __attribute__((at(0x18087C, "", CHIP_VER_BCM4335b0, FW_VER_6_30_171_1_sta))) |
||
85 | GenericPatch4(dbppptr, &dbg); |