]> git.zerfleddert.de Git - proxmark3-svn/blame_incremental - bootrom/fromflash.c
Make the bootrom correctly nack in case of flash write error (e.g. due to lock bits)
[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