]> cvs.zerfleddert.de Git - proxmark3-svn/blame_incremental - bootrom/fromflash.c
There's no painless way to do this, but it needs to be done --
[proxmark3-svn] / bootrom / fromflash.c
... / ...
CommitLineData
1#include <proxmark3.h>\r
2\r
3extern char __bootphase2_src_start__, __bootphase2_start__, __bootphase2_end__;\r
4void __attribute__((section(".bootphase1"))) CopyBootToRAM(void)\r
5{\r
6 int i;\r
7\r
8 volatile DWORD *s = (volatile DWORD *)&__bootphase2_src_start__;\r
9 volatile DWORD *d = (volatile DWORD *)&__bootphase2_start__;\r
10 unsigned int l = (int)&__bootphase2_end__ - (int)&__bootphase2_start__;\r
11\r
12 for(i = 0; i < l/sizeof(DWORD); i++) *d++ = *s++;\r
13}\r
Impressum, Datenschutz