[#4898] doing "go" on bf548-0.2 binary with spi boot target crashes

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

[#4898] doing "go" on bf548-0.2 binary with spi boot target crashes

Submitted By: Mike Frysinger

Open Date

2009-02-12 19:04:22     Close Date

2009-02-13 17:41:18

Priority:

High     Assignee:

Mike Frysinger

Category:

N/A     Fixed In Release:

N/A

Found In Release:

snaps     Status:

Closed

Board:

N/A     Processor:

N/A

Silicon Revision:

    Resolution:

Fixed

Is the bug repeatable?:

N/A     

Summary: doing "go" on bf548-0.2 binary with spi boot target crashes

Details:

 

as Robin points out, building a u-boot image to boot out of spi for a bf548-0.2 target results in a u-boot.bin that cannot be tested with "go"

 

this is most likely to R0 not being setup in start.S when calling initcode:

   /* if we're executing >=0x20000000, then we dont need to dma */

   r3 = 0x0;

   r3.h = 0x2000;

   cc = r5 < r3 (iu);

   if cc jump .Ldma_and_reprogram;

   call _initcode;

   jump .Lprogrammed;

 

and so this bit of code does a bad pointer deref:

      serial_putc('C');

 

      /* Blackfin bootroms use the SPI slow read opcode instead of the SPI

       * fast read, so we need to slow down the SPI clock a lot more during

       * boot.  Once we switch over to u-boot's SPI flash driver, we'll

       * increase the speed appropriately.

       */

      if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER) {

              if (BOOTROM_SUPPORTS_SPI_FAST_READ && CONFIG_SPI_BAUD_INITBLOCK < 4)

                      bootstruct->dFlags |= BFLAG_FASTREAD;

              bfin_write_SPI_BAUD(CONFIG_SPI_BAUD_INITBLOCK);

      }

 

      serial_putc('D');

 

Follow-ups

 

--- Mike Frysinger                                           2009-02-13 17:41:18

fixed in svn trunk

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes