diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-04-24 23:39:41 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-05-06 08:47:21 -0400 |
commit | 02778f2f1b4b1a28b492367477db27c58d45ae35 (patch) | |
tree | f7f5b18e011460da48e86b93d808052e945c7433 /cpu | |
parent | af2c37378f203857d5e6c957e77a14c2da5b59d2 (diff) | |
download | u-boot-imx-02778f2f1b4b1a28b492367477db27c58d45ae35.zip u-boot-imx-02778f2f1b4b1a28b492367477db27c58d45ae35.tar.gz u-boot-imx-02778f2f1b4b1a28b492367477db27c58d45ae35.tar.bz2 |
Blackfin: fix booting with older bootroms (no EVT1)
When dropping jump block support, the assumption was that all bootroms
supported entry point redirection via the EVT1 register. Unfortunately,
this turned out to be incorrect for the oldest Blackfin parts (BF533-0.2
and older and BF561). No one really noticed earlier because these parts
usually are booted by bypassing the bootrom entirely, and older BF533
parts are not supported at all (too many anomalies).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/blackfin/cpu.c | 10 | ||||
-rw-r--r-- | cpu/blackfin/initcode.c | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/cpu/blackfin/cpu.c b/cpu/blackfin/cpu.c index c2ff8cd..9bb6407 100644 --- a/cpu/blackfin/cpu.c +++ b/cpu/blackfin/cpu.c @@ -25,12 +25,20 @@ ulong bfin_poweron_retx; __attribute__ ((__noreturn__)) void cpu_init_f(ulong bootflag, ulong loaded_from_ldr) { + extern char _stext_l1; +#ifndef CONFIG_BFIN_BOOTROM_USES_EVT1 + /* Build a NOP slide over the LDR jump block. Whee! */ + char nops[0xC]; + serial_early_puts("NOP Slide\n"); + memset(nops, 0x00, sizeof(nops)); + memcpy(&_stext_l1 - sizeof(nops), nops, sizeof(nops)); +#endif + if (!loaded_from_ldr) { /* Relocate sections into L1 if the LDR didn't do it -- don't * check length because the linker script does the size * checking at build time. */ - extern char _stext_l1; serial_early_puts("L1 Relocate\n"); extern char _stext_l1, _etext_l1, _stext_l1_lma; memcpy(&_stext_l1, &_stext_l1_lma, (&_etext_l1 - &_stext_l1)); diff --git a/cpu/blackfin/initcode.c b/cpu/blackfin/initcode.c index c0fe2c6..a039cbb 100644 --- a/cpu/blackfin/initcode.c +++ b/cpu/blackfin/initcode.c @@ -543,9 +543,11 @@ void initcode(ADI_BOOT_DATA *bootstruct) serial_putc('T'); +#ifdef CONFIG_BFIN_BOOTROM_USES_EVT1 /* tell the bootrom where our entry point is */ if (CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_BYPASS) bfin_write_EVT1(CONFIG_SYS_MONITOR_BASE); +#endif serial_putc('>'); serial_putc('\n'); |