2009-04-09 14:43:20 +08:00
|
|
|
#include <proxmark3.h>
|
|
|
|
|
2009-08-31 22:52:59 +08:00
|
|
|
extern char __bootphase2_src_start__, __bootphase2_start__, __bootphase2_end__;
|
2009-08-28 14:40:44 +08:00
|
|
|
void __attribute__((section(".bootphase1"))) CopyBootToRAM(void)
|
2009-04-09 14:43:20 +08:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2009-08-31 22:52:59 +08:00
|
|
|
volatile DWORD *s = (volatile DWORD *)&__bootphase2_src_start__;
|
|
|
|
volatile DWORD *d = (volatile DWORD *)&__bootphase2_start__;
|
|
|
|
unsigned int l = (int)&__bootphase2_end__ - (int)&__bootphase2_start__;
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-31 22:52:59 +08:00
|
|
|
for(i = 0; i < l/sizeof(DWORD); i++) *d++ = *s++;
|
2009-04-09 14:43:20 +08:00
|
|
|
}
|