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 my_touchw_task (void)
 
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 64 der Datei boot.c.

64  {
65  //http://chdk.setepontos.com/index.php/topic,4194.0.html
66  *(int*)0x1930=(int)taskCreateHook;
67  *(int*)0x1934=(int)taskCreateHook;
68 
69  // replacement of sub_FF844050 for correct power-on.
70  //(short press = playback mode, long press = record mode)
71  *(int*)(0x23E8+0x4)= (*(int*)0xC0220078) & 1 ? 0x200000 : 0x400000;
72 
73 asm volatile (
74 " LDR R0, =0xFF81021C \n"
75 " MOV R1, #0 \n"
76 " LDR R3, =0xFF810254 \n"
77 
78 "loc_FF8101B0:\n"
79 " CMP R0, R3 \n"
80 " LDRCC R2, [R0], #4 \n"
81 " STRCC R2, [R1], #4 \n"
82 " BCC loc_FF8101B0 \n"
83 " LDR R0, =0xFF810254 \n"
84 " MOV R1, #0x4B0 \n"
85 " LDR R3, =0xFF810468 \n"
86 
87 "loc_FF8101CC:\n"
88 " CMP R0, R3 \n"
89 " LDRCC R2, [R0], #4 \n"
90 " STRCC R2, [R1], #4 \n"
91 " BCC loc_FF8101CC \n"
92 " MOV R0, #0xD2 \n"
93 " MSR CPSR_cxsf, R0 \n"
94 " MOV SP, #0x1000 \n"
95 " MOV R0, #0xD3 \n"
96 " MSR CPSR_cxsf, R0 \n"
97 " MOV SP, #0x1000 \n"
98 " LDR R0, =0x6C4 \n"
99 " LDR R2, =0xEEEEEEEE \n"
100 " MOV R3, #0x1000 \n"
101 
102 "loc_FF810200:\n"
103 " CMP R0, R3 \n"
104 " STRCC R2, [R0], #4 \n"
105 " BCC loc_FF810200 \n"
106 " BL sub_FF810FB8_my \n" // --> Patched. Old value = 0xFF810FB8.
107 );
108 }
void boot ( )

Definiert in Zeile 31 der Datei boot.c.

32 {
33  long *canon_data_src = (void*)0xFFAFB86C;
34  long *canon_data_dst = (void*)0x1900;
35  long canon_data_len = 0x137A8 - 0x1900; // data_end - data_start
36  long *canon_bss_start = (void*)0x137A8; // just after data
37  long canon_bss_len = 0xA6234 - 0x137A8;
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  // jump to init-sequence that follows the data-copy-routine
58  asm volatile ("B sub_FF8101A4_my\n");
59 };
void CreateTask_spytask ( )

Definiert in Zeile 13 der Datei boot.c.

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

Definiert in Zeile 21 der Datei boot.c.

21  {
22  p-=16;
23  if (p[0]==(int)0xff85c038) p[0]=(int)capt_seq_task;
24  if (p[0]==(int)0xff8af7b0) p[0]=(int)exp_drv_task;
25  if (p[0]==(int)0xff8584ec) p[0]=(int)movie_record_task;
26  if (p[0]==(int)0xffa082a4) p[0]=(int)filewritetask;
27  if (p[0]==(int)0xff871070) p[0]=(int)init_file_modules_task;
28  if (p[0]==(int)0xff8e85f8) p[0]=(int)my_touchw_task;
29 }

Variablen-Dokumentation

const char* const new_sa = &_end

Definiert in Zeile 8 der Datei boot.c.