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

gehe zum Quellcode dieser Datei

Funktionen

void CreateTask_spytask ()
 
void taskCreateHook (int *p)
 
void boot ()
 
void __attribute__ ((naked, noinline))
 *-------------------------------------------------------------------— Mehr ...
 

Variablen

const char *const new_sa = &_end
 

Dokumentation der Funktionen

void __attribute__ ( (naked, noinline)  )

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

!!

IS_ERROR( hSoundHandle )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

IS_ERROR( RetCode )

"MOV R3, #0\n" "STR R3, [R9]\n"

TODO! below is from sd400

"MOV R3, #0\n" "STR R3, [R9]\n"

TODO! below is from sd400

__MovieRecorder_c__100

__MovieRecorder_c__100

Definiert in Zeile 63 der Datei boot.c.

63  {
64 asm volatile (
65 " LDR R0, =0xFF810230 \n"
66 " MOV R1, #0 \n"
67 " LDR R3, =0xFF810268 \n"
68 
69 "loc_FF8101C4:\n"
70 " CMP R0, R3 \n"
71 " LDRCC R2, [R0], #4 \n"
72 " STRCC R2, [R1], #4 \n"
73 " BCC loc_FF8101C4 \n"
74 " LDR R0, =0xFF810268 \n"
75 " MOV R1, #0x4B0 \n"
76 " LDR R3, =0xFF81047C \n"
77 
78 "loc_FF8101E0:\n"
79 " CMP R0, R3 \n"
80 " LDRCC R2, [R0], #4 \n"
81 " STRCC R2, [R1], #4 \n"
82 " BCC loc_FF8101E0 \n"
83 " MOV R0, #0xD2 \n"
84 " MSR CPSR_cxsf, R0 \n"
85 " MOV SP, #0x1000 \n"
86 " MOV R0, #0xD3 \n"
87 " MSR CPSR_cxsf, R0 \n"
88 " MOV SP, #0x1000 \n"
89 " LDR R0, =0x6C4 \n"
90 " LDR R2, =0xEEEEEEEE \n"
91 " MOV R3, #0x1000 \n"
92 
93 "loc_FF810214:\n"
94 " CMP R0, R3 \n"
95 " STRCC R2, [R0], #4 \n"
96 " BCC loc_FF810214 \n"
97 " BL sub_FF810FCC_my \n" // --> Patched. Old value = 0xFF810FCC.
98 );
99 }
void boot ( )

Definiert in Zeile 27 der Datei boot.c.

28 {
29  long *canon_data_src = (void*)0xFFB07EB8;
30  long *canon_data_dst = (void*)0x1900;
31  long canon_data_len = 0x1056C - 0x1900; // data_end - data_start
32  long *canon_bss_start = (void*)0x1056C; // just after data
33  long canon_bss_len = 0x9B610 - 0x1056C;
34 
35  long i;
36 
37 
38  // Enable CPU caches and MPU
39  asm volatile (
40  "MRC p15, 0, R0,c1,c0\n"
41  "ORR R0, R0, #0x1000\n"
42  "ORR R0, R0, #4\n"
43  "ORR R0, R0, #1\n"
44  "MCR p15, 0, R0,c1,c0\n"
45  :::"r0");
46 
47  for(i=0;i<canon_data_len/4;i++)
48  canon_data_dst[i]=canon_data_src[i];
49 
50  for(i=0;i<canon_bss_len/4;i++)
51  canon_bss_start[i]=0;
52 
53  *(int*)0x1930=(int)taskCreateHook;
54  *(int*)0x1934=(int)taskCreateHook;
55 
56  // jump to init-sequence that follows the data-copy-routine
57  asm volatile ("B sub_FF8101B8_my\n");
58 };
void CreateTask_spytask ( )

Definiert in Zeile 13 der Datei boot.c.

14 {
15  _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
16 }
void taskCreateHook ( int *  p)

Definiert in Zeile 18 der Datei boot.c.

18  {
19  p-=16;
20  if (p[0]==0xff866c80) p[0]=(int)capt_seq_task;
21  if (p[0]==0xff8d37c0) p[0]=(int)exp_drv_task;
22  if (p[0]==0xffa25b10) p[0]=(int)filewritetask;
23  if (p[0]==0xff87bf28) p[0]=(int)init_file_modules_task;
24  if (p[0]==0xff862e48) p[0]=(int)movie_record_task;
25 }

Variablen-Dokumentation

const char* const new_sa = &_end

Definiert in Zeile 8 der Datei boot.c.