CHDK_DE Vorschauversion  Trunk Rev. 5429
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
boot.c-Dateireferenz
#include "lolevel.h"
#include "platform.h"
#include "core.h"
#include "dryos31.h"
+ Include-Abhängigkeitsdiagramm für boot.c:

gehe zum Quellcode dieser Datei

Makrodefinitionen

#define offsetof(TYPE, MEMBER)   ((int) &((TYPE *)0)->MEMBER)
 
#define LED_GREEN   0xC0220130
 
#define LED_ORANGE   0xC0220134
 
#define LED_AF   0xC0223030
 

Funktionen

void Battery_door_hack ()
 
void task_CaptSeq ()
 
void task_InitFileModules ()
 
void task_MovieRecord ()
 
void task_ExpDrv ()
 
void task_FileWrite ()
 
void taskHook (context_t **context)
 
void CreateTask_spytask ()
 
void __attribute__ ((naked, noinline))
 *-------------------------------------------------------------------— Mehr ...
 

Variablen

const char *const new_sa = &_end
 

Makro-Dokumentation

#define LED_AF   0xC0223030

Definiert in Zeile 13 der Datei boot.c.

#define LED_GREEN   0xC0220130

Definiert in Zeile 11 der Datei boot.c.

#define LED_ORANGE   0xC0220134

Definiert in Zeile 12 der Datei boot.c.

#define offsetof (   TYPE,
  MEMBER 
)    ((int) &((TYPE *)0)->MEMBER)

Definiert in Zeile 9 der Datei boot.c.

Dokumentation der Funktionen

void __attribute__ ( (naked, noinline)  )

*-------------------------------------------------------------------—

!!

Definiert in Zeile 70 der Datei boot.c.

70  {
71 asm volatile (
72 " LDR R1, =0xC0410000 \n"
73 " MOV R0, #0 \n"
74 " STR R0, [R1] \n"
75 " MOV R1, #0x78 \n"
76 " MCR p15, 0, R1, c1, c0 \n"
77 " MOV R1, #0 \n"
78 " MCR p15, 0, R1, c7, c10, 4 \n"
79 " MCR p15, 0, R1, c7, c5 \n"
80 " MCR p15, 0, R1, c7, c6 \n"
81 " MOV R0, #0x3D \n"
82 " MCR p15, 0, R0, c6, c0 \n"
83 " MOV R0, #0xC000002F \n"
84 " MCR p15, 0, R0, c6, c1 \n"
85 " MOV R0, #0x33 \n"
86 " MCR p15, 0, R0, c6, c2 \n"
87 " MOV R0, #0x40000033 \n"
88 " MCR p15, 0, R0, c6, c3 \n"
89 " MOV R0, #0x80000017 \n"
90 " MCR p15, 0, R0, c6, c4 \n"
91 " LDR R0, =0xFF80002D \n"
92 " MCR p15, 0, R0, c6, c5 \n"
93 " MOV R0, #0x34 \n"
94 " MCR p15, 0, R0, c2, c0 \n"
95 " MOV R0, #0x34 \n"
96 " MCR p15, 0, R0, c2, c0, 1 \n"
97 " MOV R0, #0x34 \n"
98 " MCR p15, 0, R0, c3, c0 \n"
99 " LDR R0, =0x3333330 \n"
100 " MCR p15, 0, R0, c5, c0, 2 \n"
101 " LDR R0, =0x3333330 \n"
102 " MCR p15, 0, R0, c5, c0, 3 \n"
103 " MRC p15, 0, R0, c1, c0 \n"
104 " ORR R0, R0, #0x1000 \n"
105 " ORR R0, R0, #4 \n"
106 " ORR R0, R0, #1 \n"
107 " MCR p15, 0, R0, c1, c0 \n"
108 " MOV R1, #0x80000006 \n"
109 " MCR p15, 0, R1, c9, c1 \n"
110 " MOV R1, #6 \n"
111 " MCR p15, 0, R1, c9, c1, 1 \n"
112 " MRC p15, 0, R1, c1, c0 \n"
113 " ORR R1, R1, #0x50000 \n"
114 " MCR p15, 0, R1, c1, c0 \n"
115 " LDR R2, =0xC0200000 \n"
116 " MOV R1, #1 \n"
117 " STR R1, [R2, #0x10C] \n"
118 " MOV R1, #0xFF \n"
119 " STR R1, [R2, #0xC] \n"
120 " STR R1, [R2, #0x1C] \n"
121 " STR R1, [R2, #0x2C] \n"
122 " STR R1, [R2, #0x3C] \n"
123 " STR R1, [R2, #0x4C] \n"
124 " STR R1, [R2, #0x5C] \n"
125 " STR R1, [R2, #0x6C] \n"
126 " STR R1, [R2, #0x7C] \n"
127 " STR R1, [R2, #0x8C] \n"
128 " STR R1, [R2, #0x9C] \n"
129 " STR R1, [R2, #0xAC] \n"
130 " STR R1, [R2, #0xBC] \n"
131 " STR R1, [R2, #0xCC] \n"
132 " STR R1, [R2, #0xDC] \n"
133 " STR R1, [R2, #0xEC] \n"
134 " STR R1, [R2, #0xFC] \n"
135 " LDR R1, =0xC0400008 \n"
136 " LDR R2, =0x430005 \n"
137 " STR R2, [R1] \n"
138 " MOV R1, #1 \n"
139 " LDR R2, =0xC0243100 \n"
140 " STR R2, [R1] \n"
141 " LDR R2, =0xC0242010 \n"
142 " LDR R1, [R2] \n"
143 " ORR R1, R1, #1 \n"
144 " STR R1, [R2] \n"
145 " LDR R0, =0xFFBBEAB0 \n"
146 " LDR R1, =0x1900 \n"
147 " LDR R3, =0xDF04 \n"
148 
149 "loc_FF81013C:\n"
150 " CMP R1, R3 \n"
151 " LDRCC R2, [R0], #4 \n"
152 " STRCC R2, [R1], #4 \n"
153 " BCC loc_FF81013C \n"
154 " LDR R1, =0x13CA18 \n"
155 " MOV R2, #0 \n"
156 
157 "loc_FF810154:\n"
158 " CMP R3, R1 \n"
159 " STRCC R2, [R3], #4 \n"
160 " BCC loc_FF810154 \n"
161 " B sub_FF810354_my \n" // --> Patched. Old value = 0xFF810354.
162 );
163 }
void Battery_door_hack ( )
void CreateTask_spytask ( )

Definiert in Zeile 41 der Datei boot.c.

41  {
42  _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
43 };
void task_CaptSeq ( )
void task_ExpDrv ( )
void task_FileWrite ( )
void task_InitFileModules ( )
void task_MovieRecord ( )
void taskHook ( context_t **  context)

Definiert in Zeile 26 der Datei boot.c.

27 {
28  task_t *tcb=(task_t*)((char*)context-offsetof(task_t, context));
29 
30  // Replace firmware task addresses with ours
31  if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
32  if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
33  if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
34  if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;
35  if(tcb->entry == (void*)task_FileWrite) tcb->entry = (void*)filewritetask;
36 }

Variablen-Dokumentation

const char* const new_sa = &_end

Definiert in Zeile 15 der Datei boot.c.