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 "dryos31.h"
+ Include-Abhängigkeitsdiagramm für boot.c:

gehe zum Quellcode dieser Datei

Makrodefinitionen

#define offsetof(TYPE, MEMBER)   ((int) &((TYPE *)0)->MEMBER)
 
#define DEBUG_LED   0xC02200BC
 

Funktionen

void CreateTask_spytask ()
 
void JogDial_task_my (void)
 
void task_CaptSeq ()
 
void task_InitFileModules ()
 
void task_MovieRecord ()
 
void task_ExpDrv ()
 
void task_PhySw ()
 
void task_FileWrite ()
 
void task_RotaryEncoder ()
 
void taskHook (context_t **context)
 
void boot ()
 
void __attribute__ ((naked, noinline))
 *-------------------------------------------------------------------— Mehr ...
 
void CreateTask_blinker ()
 

Variablen

const char *const new_sa = &_end
 
long wrs_kernel_bss_start
 
long wrs_kernel_bss_end
 
volatile int jogdial_stopped
 

Makro-Dokumentation

#define DEBUG_LED   0xC02200BC

Definiert in Zeile 40 der Datei boot.c.

#define offsetof (   TYPE,
  MEMBER 
)    ((int) &((TYPE *)0)->MEMBER)

Definiert in Zeile 6 der Datei boot.c.

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 78 der Datei boot.c.

78  {
79  asm volatile (
80 " LDR R0, =0xFF810218\n" // exception handler code
81 " MOV R1, #0\n"
82 " LDR R3, =0xFF810250\n"
83 "loc_FF8101AC:\n"
84 " CMP R0, R3\n" // load exception vector
85 " LDRCC R2, [R0],#4\n"
86 " STRCC R2, [R1],#4\n"
87 " BCC loc_FF8101AC\n"
88 " LDR R0, =0xFF810250\n"
89 " MOV R1, #0x4B0\n"
90 " LDR R3, =0xFF810464\n"
91 "loc_FF8101C8:\n"
92 " CMP R0, R3\n" // copy IRQ handler to ITCM starting at 0x4b0, 532 bytes up to 0x6C4
93 " LDRCC R2, [R0],#4\n"
94 " STRCC R2, [R1],#4\n"
95 " BCC loc_FF8101C8\n"
96 " MOV R0, #0xD2\n"
97 " MSR CPSR_cxsf, R0\n" // set CPSR mode = IRQ, ints disabled
98 " MOV SP, #0x1000\n" // irq mode SP
99 " MOV R0, #0xD3\n"
100 " MSR CPSR_cxsf, R0\n" // set CPSR mode = Super, ints disabled
101 " MOV SP, #0x1000\n" // super mode SP
102 " LDR R0, =0x6C4\n"
103 " LDR R2, =0xEEEEEEEE\n"
104 " MOV R3, #0x1000\n"
105 "loc_FF8101FC:\n"
106 " CMP R0, R3\n" // clear ITCM 0x6C4-end with EEEEEEEE
107 " STRCC R2, [R0],#4\n"
108 " BCC loc_FF8101FC\n"
109 " BL sub_FF810F94_my\n" //->
110  );
111 }
void boot ( )

Definiert in Zeile 41 der Datei boot.c.

41  { //#fs
42  long *canon_data_src = (void*)0xFFB74B98;
43  long *canon_data_dst = (void*)0x1900;
44  long canon_data_len = 0xFE80 - 0x1900; // data_end - data_start
45  long *canon_bss_start = (void*)0xFE80; // just after data
46  long canon_bss_len = 0xE8B40 - 0xFE80;
47 
48  long i;
49 
50 
51  // enable caches and write buffer, disabled earlier in loader
52  asm volatile (
53  "MRC p15, 0, R0,c1,c0\n"
54  "ORR R0, R0, #0x1000\n"
55  "ORR R0, R0, #4\n"
56  "ORR R0, R0, #1\n"
57  "MCR p15, 0, R0,c1,c0\n"
58  :::"r0");
59 
60  for(i=0;i<canon_data_len/4;i++)
61  canon_data_dst[i]=canon_data_src[i];
62 
63  for(i=0;i<canon_bss_len/4;i++)
64  canon_bss_start[i]=0;
65 
66 // see http://chdk.setepontos.com/index.php/topic,2972.msg30712.html#msg30712
67  *(int*)0x1930=(int)taskHook;
68  *(int*)0x1934=(int)taskHook;
69 
70  // similar to SX10 (but no +4 and values are >> 8) via sub_FF849EB0.
71  // Search on 0x12345678 finds function called by this
72  *(int*)(0x2588)= (*(int*)0xC02200F8)&1 ? 0x200000 : 0x100000; // replacement of sub_FF8219D8 for correct power-on.
73 
74  // jump to init-sequence that follows the data-copy-routine
75  asm volatile ("B sub_FF8101A0_my\n");
76 }
void CreateTask_blinker ( )

Definiert in Zeile 624 der Datei boot.c.

624  {
625  _CreateTask("Blinker", 0x1, 0x200, task_blinker, 0);
626 };
void CreateTask_spytask ( )

Definiert in Zeile 34 der Datei boot.c.

34  {
35  _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
36 };
void JogDial_task_my ( void  )
void task_CaptSeq ( )
void task_ExpDrv ( )
void task_FileWrite ( )
void task_InitFileModules ( )
void task_MovieRecord ( )
void task_PhySw ( )
void task_RotaryEncoder ( )
void taskHook ( context_t **  context)

Definiert in Zeile 27 der Datei boot.c.

27  {
28  task_t *tcb=(task_t*)((char*)context-offsetof(task_t, context));
29 
30  // Replace firmware task addresses with ours
31  if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
32  if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
33  if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
34  if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;
35  if(tcb->entry == (void*)task_FileWrite) tcb->entry = (void*)filewritetask;
36  if(tcb->entry == (void*)task_RotaryEncoder) tcb->entry = (void*)JogDial_task_my;
37 }

Variablen-Dokumentation

volatile int jogdial_stopped

Definiert in Zeile 81 der Datei kbd.c.

const char* const new_sa = &_end

Definiert in Zeile 8 der Datei boot.c.

long wrs_kernel_bss_end
long wrs_kernel_bss_start