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

Makrodefinitionen

#define DEBUG_LED   0xC02200C4
 

Funktionen

void CreateTask_PhySw ()
 
void CreateTask_spytask ()
 
void task_CaptSeqTask_my ()
 
void task_InitFileModules_my ()
 
void MovieRecord_Task_my ()
 
void boot ()
 
void taskCreateHook (int *p)
 
void taskCreateHook2 (int *p)
 
void __attribute__ ((naked, noinline))
 

Variablen

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

Makro-Dokumentation

#define DEBUG_LED   0xC02200C4

Definiert in Zeile 36 der Datei boot.c.

Dokumentation der Funktionen

void __attribute__ ( (naked, noinline)  )

!!

Definiert in Zeile 81 der Datei boot.c.

81  { //#fs
82  asm volatile (
83  "LDR R0, =0xFFC0021C\n"
84  "MOV R1, #0\n"
85  "LDR R3, =0xFFC00254\n"
86 
87  "loc_FFC001B0:\n"
88  "CMP R0, R3\n"
89  "LDRCC R2, [R0],#4\n"
90  "STRCC R2, [R1],#4\n"
91  "BCC loc_FFC001B0\n"
92 
93  "LDR R0, =0xFFC00254\n"
94  "MOV R1, #0x4B0\n"
95  "LDR R3, =0xFFC00468\n"
96 
97  "loc_FFC001CC:\n"
98  "CMP R0, R3\n"
99  "LDRCC R2, [R0],#4\n"
100  "STRCC R2, [R1],#4\n"
101  "BCC loc_FFC001CC\n"
102  "MOV R0, #0xD2\n"
103  "MSR CPSR_cxsf, R0\n"
104  "MOV SP, #0x1000\n"
105  "MOV R0, #0xD3\n"
106  "MSR CPSR_cxsf, R0\n"
107  "MOV SP, #0x1000\n"
108  "LDR R0, =0x6C4\n"
109  "LDR R2, =0xEEEEEEEE\n"
110  "MOV R3, #0x1000\n"
111 
112  "loc_FFC00200:\n"
113  "CMP R0, R3\n"
114  "STRCC R2, [R0],#4\n"
115  "BCC loc_FFC00200\n"
116 
117  //"BL sub_FFC00FA0\n"
118  "BL sub_FFC00FA0_my\n"
119  );
120 } //#fe
void boot ( )

Definiert in Zeile 38 der Datei boot.c.

38  { //#fs
39  long *canon_data_src = (void*)0xFFEBFB4C;
40  long *canon_data_dst = (void*)0x1900;
41  long canon_data_len = 0xD700 - 0x1900; // data_end - data_start
42  long *canon_bss_start = (void*)0xD700; // just after data
43  long canon_bss_len = 0xA47E0 - 0xD700;
44 
45  long i;
46 
47 
48  // Code taken from VxWorks CHDK. Changes CPU speed?
49  asm volatile (
50  "MRC p15, 0, R0,c1,c0\n"
51  "ORR R0, R0, #0x1000\n"
52  "ORR R0, R0, #4\n"
53  "ORR R0, R0, #1\n"
54  "MCR p15, 0, R0,c1,c0\n"
55  :::"r0");
56 
57  for(i=0;i<canon_data_len/4;i++)
58  canon_data_dst[i]=canon_data_src[i];
59 
60  for(i=0;i<canon_bss_len/4;i++)
61  canon_bss_start[i]=0;
62 
63 /* asm volatile (
64  "MRC p15, 0, R0,c1,c0\n"
65  "ORR R0, R0, #0x1000\n"
66  "BIC R0, R0, #4\n"
67  "ORR R0, R0, #1\n"
68  "MCR p15, 0, R0,c1,c0\n"
69  :::"r0");
70 */
71 
72  *(int*)0x1930=(int)taskCreateHook;
73  *(int*)0x1934=(int)taskCreateHook;
74  *(int*)0x1938=(int)taskCreateHook2;
75 
76  // jump to init-sequence that follows the data-copy-routine
77  asm volatile ("B sub_FFC001A4_my\n");
78 }; //#fe
void CreateTask_PhySw ( )
void CreateTask_spytask ( )

Definiert in Zeile 34 der Datei boot.c.

34  {
35  _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
36 };
void MovieRecord_Task_my ( )
void task_CaptSeqTask_my ( )
void task_InitFileModules_my ( )
void taskCreateHook ( int *  p)

Definiert in Zeile 21 der Datei boot.c.

21  {
22  p-=16;
23  if (p[0]==(int)0xFFC49B38) p[0]=(int)task_CaptSeqTask_my; //done
24  if (p[0]==(int)0xFFC118BC) p[0]=(int)mykbd_task; //done
25  if (p[0]==(int)0xFFC5FEA0) p[0]=(int)task_InitFileModules_my; //done
26  if (p[0]==(int)0xFFC46678) p[0]=(int)MovieRecord_Task_my; //done
27  if (p[0]==(int)0xFFC91194) p[0]=(int)exp_drv_task; //done
28  if (p[0]==(int)0xFFDCB5A8) p[0]=(int)filewritetask;
29 }
void taskCreateHook2 ( int *  p)

Definiert in Zeile 31 der Datei boot.c.

31  {
32  p-=16;
33  if (p[0]==(int)0xFFC5FEA0) p[0]=(int)task_InitFileModules_my; //done
34 }

Variablen-Dokumentation

const char* const new_sa = &_end

Definiert in Zeile 5 der Datei boot.c.

long wrs_kernel_bss_end
long wrs_kernel_bss_start