]> git.zerfleddert.de Git - proxmark3-svn/blame - bootrom/fromflash.c
Add license headers to armsrc/bootrom/common stuff
[proxmark3-svn] / bootrom / fromflash.c
CommitLineData
bd20f8f4 1//-----------------------------------------------------------------------------
2// This code is licensed to you under the terms of the GNU GPL, version 2 or,
3// at your option, any later version. See the LICENSE.txt file for the text of
4// the license.
5//-----------------------------------------------------------------------------
6// Helper function for launching the bootloader from FLASH
7//-----------------------------------------------------------------------------
8
15c4dc5a 9#include <proxmark3.h>
10
11extern char __bootphase2_src_start__, __bootphase2_start__, __bootphase2_end__;
12void __attribute__((section(".bootphase1"))) CopyBootToRAM(void)
13{
14 int i;
15
f7e3ed82 16 volatile uint32_t *s = (volatile uint32_t *)&__bootphase2_src_start__;
17 volatile uint32_t *d = (volatile uint32_t *)&__bootphase2_start__;
15c4dc5a 18 unsigned int l = (int)&__bootphase2_end__ - (int)&__bootphase2_start__;
19
f7e3ed82 20 for(i = 0; i < l/sizeof(uint32_t); i++) *d++ = *s++;
15c4dc5a 21}
Impressum, Datenschutz