CHDK_DE Vorschauversion  Trunk Rev. 6014
 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))
 

Variablen

const char *const new_sa = &_end
 
long wrs_kernel_bss_start
 
long wrs_kernel_bss_end
 

Dokumentation der Funktionen

void __attribute__ ( (naked, noinline)  )

!!

Definiert in Zeile 67 der Datei boot.c.

67  {
68 asm volatile (
69 " LDR R0, =0xFFC0021C \n"
70 " MOV R1, #0 \n"
71 " LDR R3, =0xFFC00254 \n"
72 
73 "loc_FFC001B0:\n"
74 " CMP R0, R3 \n"
75 " LDRCC R2, [R0], #4 \n"
76 " STRCC R2, [R1], #4 \n"
77 " BCC loc_FFC001B0 \n"
78 " LDR R0, =0xFFC00254 \n"
79 " MOV R1, #0x4B0 \n"
80 " LDR R3, =0xFFC00468 \n"
81 
82 "loc_FFC001CC:\n"
83 " CMP R0, R3 \n"
84 " LDRCC R2, [R0], #4 \n"
85 " STRCC R2, [R1], #4 \n"
86 " BCC loc_FFC001CC \n"
87 " MOV R0, #0xD2 \n"
88 " MSR CPSR_cxsf, R0 \n"
89 " MOV SP, #0x1000 \n"
90 " MOV R0, #0xD3 \n"
91 " MSR CPSR_cxsf, R0 \n"
92 " MOV SP, #0x1000 \n"
93 " LDR R0, =0x6C4 \n"
94 " LDR R2, =0xEEEEEEEE \n"
95 " MOV R3, #0x1000 \n"
96 
97 "loc_FFC00200:\n"
98 " CMP R0, R3 \n"
99 " STRCC R2, [R0], #4 \n"
100 " BCC loc_FFC00200 \n"
101 " BL sub_FFC00FA0_my \n" // --> Patched. Old value = 0xFFC00FA0.
102 );
103 }
void boot ( )

Definiert in Zeile 31 der Datei boot.c.

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

Definiert in Zeile 17 der Datei boot.c.

18 {
19  _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
20 }
void taskCreateHook ( int *  p)

Definiert in Zeile 22 der Datei boot.c.

22  {
23  p-=16;
24  if (p[0]==(int)0xffc488a4) p[0]=(int)capt_seq_task;
25  if (p[0]==(int)0xffc900b8) p[0]=(int)exp_drv_task;
26  if (p[0]==(int)0xffdc0ea4) p[0]=(int)filewritetask;
27  if (p[0]==(int)0xffc5ebf8) p[0]=(int)init_file_modules_task;
28  if (p[0]==(int)0xffc453d8) p[0]=(int)movie_record_task;
29 }

Variablen-Dokumentation

const char* const new_sa = &_end

Definiert in Zeile 8 der Datei boot.c.

long wrs_kernel_bss_end
long wrs_kernel_bss_start