root/loader/sx60hs/main.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. my_restart

   1 #include "../generic/check_compat.c"
   2 
   3 extern long *blob_chdk_core;
   4 extern long blob_chdk_core_size;
   5 
   6 void __attribute__((noreturn)) my_restart()
   7 {
   8     check_compat();
   9 
  10     long *dst = (long*)MEMISOSTART;
  11     const long *src = blob_chdk_core;
  12     long length = (blob_chdk_core_size + 3) >> 2;
  13 
  14     core_copy(src, dst, length);
  15 
  16 
  17      *(volatile unsigned *)(0x4ffc)=0x12345678;
  18 
  19     asm volatile ( // fc095c80 102b/102c
  20     "mov     r1, %1\n"
  21     "mov     r0, %0\n"
  22     "ldr     r2, =0xfc1361cf\n" // address is for 100b, 100c, 100f
  23     "blx     r2\n"              // caching related routine called at fw startup
  24     "mov     r0, %0\n"
  25     "add     r0, r0, #1\n"
  26     "bx      r0\n"
  27     : : "r"(MEMISOSTART), "r"(((blob_chdk_core_size+3)>>2)<<2) : "memory","r0","r1","r2","r3","r4"
  28    );
  29 
  30     while(1);
  31 }
  32 

/* [<][>][^][v][top][bottom][index][help] */