|
@@ -25,18 +25,12 @@ ulong bfin_poweron_retx;
|
|
__attribute__ ((__noreturn__))
|
|
__attribute__ ((__noreturn__))
|
|
void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
|
|
void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
|
|
{
|
|
{
|
|
- /* Build a NOP slide over the LDR jump block. Whee! */
|
|
|
|
- serial_early_puts("NOP Slide\n");
|
|
|
|
- char nops[0xC];
|
|
|
|
- memset(nops, 0x00, sizeof(nops));
|
|
|
|
- extern char _stext_l1;
|
|
|
|
- memcpy(&_stext_l1 - sizeof(nops), nops, sizeof(nops));
|
|
|
|
-
|
|
|
|
if (!loaded_from_ldr) {
|
|
if (!loaded_from_ldr) {
|
|
/* Relocate sections into L1 if the LDR didn't do it -- don't
|
|
/* Relocate sections into L1 if the LDR didn't do it -- don't
|
|
* check length because the linker script does the size
|
|
* check length because the linker script does the size
|
|
* checking at build time.
|
|
* checking at build time.
|
|
*/
|
|
*/
|
|
|
|
+ extern char _stext_l1;
|
|
serial_early_puts("L1 Relocate\n");
|
|
serial_early_puts("L1 Relocate\n");
|
|
extern char _stext_l1, _etext_l1, _stext_l1_lma;
|
|
extern char _stext_l1, _etext_l1, _stext_l1_lma;
|
|
memcpy(&_stext_l1, &_stext_l1_lma, (&_etext_l1 - &_stext_l1));
|
|
memcpy(&_stext_l1, &_stext_l1_lma, (&_etext_l1 - &_stext_l1));
|