CHDK_DE Vorschauversion  Trunk Rev. 5516
 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 63 der Datei boot.c.

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

Definiert in Zeile 30 der Datei boot.c.

31 {
32  long *canon_data_src = (void*)0xFFAF47EC;
33  long *canon_data_dst = (void*)0x1900;
34  long canon_data_len = 0xFEBC - 0x1900; // data_end - data_start
35  long *canon_bss_start = (void*)0xFEBC; // just after data
36  long canon_bss_len = 0x9FE50 - 0xFEBC;
37 
38  long i;
39 
40 
41  // Enable CPU caches and MPU
42  asm volatile (
43  "MRC p15, 0, R0,c1,c0\n"
44  "ORR R0, R0, #0x1000\n"
45  "ORR R0, R0, #4\n"
46  "ORR R0, R0, #1\n"
47  "MCR p15, 0, R0,c1,c0\n"
48  :::"r0");
49 
50  for(i=0;i<canon_data_len/4;i++)
51  canon_data_dst[i]=canon_data_src[i];
52 
53  for(i=0;i<canon_bss_len/4;i++)
54  canon_bss_start[i]=0;
55 
56  // jump to init-sequence that follows the data-copy-routine
57  asm volatile ("B sub_FF8101A4_my\n");
58 };
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 20 der Datei boot.c.

20  {
21  p-=16;
22  if (p[0]==0xff85bd10) p[0]=(int)capt_seq_task;
23  if (p[0]==0xff8aebf4) p[0]=(int)exp_drv_task;
24  if (p[0]==0xff85821c) p[0]=(int)movie_record_task;
25  if (p[0]==0xffa021bc) p[0]=(int)filewritetask;
26  if (p[0]==0xff870ce8) p[0]=(int)init_file_modules_task;
27  if (p[0]==0xff8e6dc0) p[0]=(int)my_touchw_task;
28 }

Variablen-Dokumentation

const char* const new_sa = &_end

Definiert in Zeile 8 der Datei boot.c.