CHDK_DE Vorschauversion  Trunk Rev. 5163
 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_GR   0xC0220014
 
#define LED_OR   0xC0220010
 
#define LED_AF   0xC022000C
 

Funktionen

void task_CaptSeq ()
 
void task_InitFileModules ()
 
void task_MovieRecord ()
 
void task_ExpDrv ()
 
void task_PhySw ()
 
void task_FileWrite ()
 
void taskHook (context_t **context)
 
void __attribute__ ((naked, noinline))
 
void CreateTask_spytask ()
 

Variablen

const char *const new_sa = &_end
 

Makro-Dokumentation

#define LED_AF   0xC022000C

Definiert in Zeile 19 der Datei boot.c.

#define LED_GR   0xC0220014

Definiert in Zeile 17 der Datei boot.c.

#define LED_OR   0xC0220010

Definiert in Zeile 18 der Datei boot.c.

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

Definiert in Zeile 6 der Datei boot.c.

Dokumentation der Funktionen

void __attribute__ ( (naked, noinline)  )

Definiert in Zeile 34 der Datei boot.c.

34  {
35  // FF81000C
36  volatile int *p=(void*)LED_AF;
37  *p=0x46;
38 asm volatile (
39  " LDR R1, =0xC0410000 \n"
40  " MOV R0, #0 \n"
41  " STR R0, [R1] \n"
42  " MOV R1, #0x78 \n"
43  " MCR p15, 0, R1, c1, c0 \n"
44  " MOV R1, #0 \n"
45  " MCR p15, 0, R1, c7, c10, 4 \n"
46  " MCR p15, 0, R1, c7, c5 \n"
47  " MCR p15, 0, R1, c7, c6 \n"
48  " MOV R0, #0x3D \n"
49  " MCR p15, 0, R0, c6, c0 \n"
50  " MOV R0, #0xC000002F \n"
51  " MCR p15, 0, R0, c6, c1 \n"
52  " MOV R0, #0x33 \n"
53  " MCR p15, 0, R0, c6, c2 \n"
54  " MOV R0, #0x40000033 \n"
55  " MCR p15, 0, R0, c6, c3 \n"
56  " MOV R0, #0x80000017 \n"
57  " MCR p15, 0, R0, c6, c4 \n"
58  " LDR R0, =0xFF80002D \n"
59  " MCR p15, 0, R0, c6, c5 \n"
60  " MOV R0, #0x34 \n"
61  " MCR p15, 0, R0, c2, c0 \n"
62  " MOV R0, #0x34 \n"
63  " MCR p15, 0, R0, c2, c0, 1 \n"
64  " MOV R0, #0x34 \n"
65  " MCR p15, 0, R0, c3, c0 \n"
66  " LDR R0, =0x3333330 \n"
67  " MCR p15, 0, R0, c5, c0, 2 \n"
68  " LDR R0, =0x3333330 \n"
69  " MCR p15, 0, R0, c5, c0, 3 \n"
70  " MRC p15, 0, R0, c1, c0 \n"
71  " ORR R0, R0, #0x1000 \n"
72  " ORR R0, R0, #4 \n"
73  " ORR R0, R0, #1 \n"
74  " MCR p15, 0, R0, c1, c0 \n"
75  " MOV R1, #0x80000006 \n"
76  " MCR p15, 0, R1, c9, c1 \n"
77  " MOV R1, #6 \n"
78  " MCR p15, 0, R1, c9, c1, 1 \n"
79  " MRC p15, 0, R1, c1, c0 \n"
80  " ORR R1, R1, #0x50000 \n"
81  " MCR p15, 0, R1, c1, c0 \n"
82  " LDR R2, =0xC0200000 \n"
83  " MOV R1, #1 \n"
84  " STR R1, [R2, #0x10C] \n"
85  " MOV R1, #0xFF \n"
86  " STR R1, [R2, #0xC] \n"
87  " STR R1, [R2, #0x1C] \n"
88  " STR R1, [R2, #0x2C] \n"
89  " STR R1, [R2, #0x3C] \n"
90  " STR R1, [R2, #0x4C] \n"
91  " STR R1, [R2, #0x5C] \n"
92  " STR R1, [R2, #0x6C] \n"
93  " STR R1, [R2, #0x7C] \n"
94  " STR R1, [R2, #0x8C] \n"
95  " STR R1, [R2, #0x9C] \n"
96  " STR R1, [R2, #0xAC] \n"
97  " STR R1, [R2, #0xBC] \n"
98  " STR R1, [R2, #0xCC] \n"
99  " STR R1, [R2, #0xDC] \n"
100  " STR R1, [R2, #0xEC] \n"
101  " STR R1, [R2, #0xFC] \n"
102  " LDR R1, =0xC0400008 \n"
103  " LDR R2, =0x430005 \n"
104  " STR R2, [R1] \n"
105  " MOV R1, #1 \n"
106  " LDR R2, =0xC0243100 \n"
107  " STR R2, [R1] \n"
108  " LDR R2, =0xC0242010 \n"
109  " LDR R1, [R2] \n"
110  " ORR R1, R1, #1 \n"
111  " STR R1, [R2] \n"
112  " LDR R0, =0xFFC2B8D4 \n" // 1.00b
113  " LDR R1, =0x1900 \n"
114  " LDR R3, =0xECD8 \n"
115 "loc_FF81013C:\n"
116  " CMP R1, R3 \n"
117  " LDRCC R2, [R0], #4 \n"
118  " STRCC R2, [R1], #4 \n"
119  " BCC loc_FF81013C \n"
120  " LDR R1, =0x16913C \n"
121  " MOV R2, #0 \n"
122 "loc_FF810154:\n"
123  " CMP R3, R1 \n"
124  " STRCC R2, [R3], #4 \n"
125  " BCC loc_FF810154 \n"
126  " B sub_FF810358_my \n" // ---> patched
127  );
128 }
void CreateTask_spytask ( )

Definiert in Zeile 392 der Datei boot.c.

392  {
393 
394  _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
395 }
void task_CaptSeq ( )
void task_ExpDrv ( )
void task_FileWrite ( )
void task_InitFileModules ( )
void task_MovieRecord ( )
void task_PhySw ( )
void taskHook ( context_t **  context)

Definiert in Zeile 21 der Datei boot.c.

21  {
22 
23  task_t *tcb=(task_t*)((char*)context-offsetof(task_t, context));
24 
25  // Replace firmware task addresses with ours
26  if(tcb->entry == (void*)task_PhySw) tcb->entry = (void*)mykbd_task;
27  if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
28  if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
29  if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
30  if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;
31  if(tcb->entry == (void*)task_FileWrite) tcb->entry = (void*)filewritetask;
32 }

Variablen-Dokumentation

const char* const new_sa = &_end

Definiert in Zeile 8 der Datei boot.c.