CHDK_DE Vorschauversion  Trunk Rev. 5214
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
main.c-Dateireferenz
+ Include-Abhängigkeitsdiagramm für main.c:

gehe zum Quellcode dieser Datei

Funktionen

void __attribute__ ((noreturn))
 

Variablen

long * blob_chdk_core
 
long blob_chdk_core_size
 

Dokumentation der Funktionen

void __attribute__ ( (noreturn)  )

Definiert in Zeile 32 der Datei main.c.

33 {
34  {
35  // char *dst = dst_void;
36  // const char *src = src_void;
37  long *dst = (long*)MEMISOSTART;
38  const long *src = blob_chdk_core;
39  long length = (blob_chdk_core_size + 3) >> 2;
40 
41  core_copy(src, dst, length);
42 
43 }
44 
45  asm volatile(
46  "MRS R1, CPSR\n"
47  "BIC R1, R1, #0x3F\n"
48  "ORR R1, R1, #0xD3\n"
49  "MSR CPSR_cf, R1\n"
50 
51  "LDR R2, =0xC0200000\n"
52  "MOV R1, #0xFFFFFFFF\n"
53  "STR R1, [R2,#0x10C]\n"
54  "STR R1, [R2,#0xC]\n"
55  "STR R1, [R2,#0x1C]\n"
56  "STR R1, [R2,#0x2C]\n"
57  "STR R1, [R2,#0x3C]\n"
58  "STR R1, [R2,#0x4C]\n"
59  "STR R1, [R2,#0x5C]\n"
60  "STR R1, [R2,#0x6C]\n"
61  "STR R1, [R2,#0x7C]\n"
62  "STR R1, [R2,#0x8C]\n"
63  "STR R1, [R2,#0x9C]\n"
64  "STR R1, [R2,#0xAC]\n"
65  "STR R1, [R2,#0xBC]\n"
66  "STR R1, [R2,#0xCC]\n"
67  "STR R1, [R2,#0xDC]\n"
68  "STR R1, [R2,#0xEC]\n"
69  "STR R1, [R2,#0xFC]\n"
70 
71  "MOV R1, #0x78\n"
72  "MCR p15, 0, R1,c1,c0\n"
73  "MOV R1, #0\n"
74  "MCR p15, 0, R1,c7,c10, 4\n"
75  "MCR p15, 0, R1,c7,c5\n"
76  "MCR p15, 0, R1,c7,c6\n"
77  "MOV R2, #0x40000000\n"
78  "ORR R1, R2, #6\n"
79  "MCR p15, 0, R1,c9,c1\n"
80  "ORR R1, R1, #6\n"
81  "MCR p15, 0, R1,c9,c1, 1\n"
82  "MRC p15, 0, R1,c1,c0\n"
83  "ORR R1, R1, #0x50000\n"
84  "MCR p15, 0, R1,c1,c0\n"
85 
86  "MOV R3, #0xFF0\n"
87  "LDR R1, =0x12345678\n"
88  "ADD R3, R3, #0x4000000C\n"
89  "STR R1, [R3]\n"
90 
91  "MOV SP, #0x1900\n"
92  "MOV LR, PC\n"
93  "MOV PC, %0\n"
94  : : "r"(MEMISOSTART) : "memory","r1","r2","r3");
95 
96  while(1);
97 }

Variablen-Dokumentation

long* blob_chdk_core

Definiert in Zeile 1 der Datei blobs.S.

long blob_chdk_core_size