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))
 *-------------------------------------------------------------------— 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

Definiert in Zeile 62 der Datei boot.c.

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

Definiert in Zeile 26 der Datei boot.c.

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

Definiert in Zeile 13 der Datei boot.c.

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

Definiert in Zeile 17 der Datei boot.c.

17  {
18  p-=16;
19  if (p[0]==(int)0xff85de08) p[0]=(int)capt_seq_task;
20  if (p[0]==(int)0xff8b3d68) p[0]=(int)exp_drv_task;
21  if (p[0]==(int)0xffa08e80) p[0]=(int)filewritetask;
22  if (p[0]==(int)0xff877140) p[0]=(int)init_file_modules_task;
23  if (p[0]==(int)0xff859e28) p[0]=(int)movie_record_task;
24 }

Variablen-Dokumentation

const char* const new_sa = &_end

Definiert in Zeile 8 der Datei boot.c.