CHDK_DE Vorschauversion  Trunk Rev. 5411
 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 taskCreateHook (int *p)
 
void CreateTask_spytask ()
 
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 56 der Datei boot.c.

57 {
58  asm volatile (
59  "LDR R0, =0xFF81021C\n" // exception handler code
60  "MOV R1, #0\n"
61  "LDR R3, =0xFF810254\n"
62 
63  "loc_FF8101B0:\n"
64  "CMP R0, R3\n" // load exception vector
65  "LDRCC R2, [R0],#4\n"
66  "STRCC R2, [R1],#4\n"
67  "BCC loc_FF8101B0\n"
68  "LDR R0, =0xFF810254\n"
69  "MOV R1, #0x4B0\n"
70  "LDR R3, =0xFF810468\n"
71 
72  "loc_FF8101CC:\n"
73  "CMP R0, R3\n" // copy IRQ handler to ITCM starting at 0x4b0, 532 bytes up to 0x6C4
74  "LDRCC R2, [R0],#4\n"
75  "STRCC R2, [R1],#4\n"
76  "BCC loc_FF8101CC\n"
77  "MOV R0, #0xD2\n"
78  "MSR CPSR_cxsf, R0\n" // set CPSR mode = IRQ, ints disabled
79  "MOV SP, #0x1000\n" // irq mode SP
80  "MOV R0, #0xD3\n"
81  "MSR CPSR_cxsf, R0\n" // set CPSR mode = Super, ints disabled
82  "MOV SP, #0x1000\n" // super mode SP
83  //"LDR R0, loc_FF810210\n"
84  "LDR R0, =0x6C4\n" // +
85  "LDR R2, =0xEEEEEEEE\n"
86  "MOV R3, #0x1000\n"
87 
88  "loc_FF810200:\n"
89  "CMP R0, R3\n" // clear ITCM 0x6C4-end with EEEEEEEE
90  "STRCC R2, [R0],#4\n"
91  "BCC loc_FF810200\n"
92  "BL sub_FF810FA0_my\n" //------------->
93  );
94 }
void boot ( )

Definiert in Zeile 23 der Datei boot.c.

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

Definiert in Zeile 18 der Datei boot.c.

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

Definiert in Zeile 7 der Datei boot.c.

8 {
9  p-=16;
10  if (p[0]==0xFF821ACC) p[0]=(int)mykbd_task; // OK // WORK!
11  if (p[0]==0xFF859DF8) p[0]=(int)movie_record_task; // OK // WORK!
12  if (p[0]==0xFF85DE30) p[0]=(int)capt_seq_task; // OK
13  if (p[0]==0xFF87719C) p[0]=(int)init_file_modules_task; // OK // WORK!
14  if (p[0]==0xFF8B478C) p[0]=(int)exp_drv_task; // OK
15  if (p[0]==0xFFA0AFE8) p[0]=(int)filewritetask;
16 }

Variablen-Dokumentation

const char* const new_sa = &_end

Definiert in Zeile 5 der Datei boot.c.