All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] devkit8000: MMC/FAT booting problem with SPL
@ 2011-11-29 11:11 Simon Schwarz
  2011-11-29 14:41 ` Tom Rini
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Schwarz @ 2011-11-29 11:11 UTC (permalink / raw)
  To: u-boot

Hi List,

there seems to be a problem in devkit8000 in combination with mmc boot.

I have this error:
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img
Error reading cluster
spl: error reading image u-boot.img, err - -1
### ERROR ### Please RESET the board ###

Some exploring i did some time ago showed that this error is deep in the 
FAT implementation. (a pity that i don't have my notes on this anymore)

I'am aware that there have been changes some time ago regarding FAT/SPL 
and malloc.

Is someone able to guess where the problem might be - to be true I 
didn't had a clue from the FAT code.

I will do some debugging later this day and post the results here.

Thanks!
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] devkit8000: MMC/FAT booting problem with SPL
  2011-11-29 11:11 [U-Boot] devkit8000: MMC/FAT booting problem with SPL Simon Schwarz
@ 2011-11-29 14:41 ` Tom Rini
  2011-11-29 15:11   ` Simon Schwarz
  2011-11-29 16:25   ` Marek Vasut
  0 siblings, 2 replies; 6+ messages in thread
From: Tom Rini @ 2011-11-29 14:41 UTC (permalink / raw)
  To: u-boot

On 11/29/2011 04:11 AM, Simon Schwarz wrote:
> Hi List,
> 
> there seems to be a problem in devkit8000 in combination with mmc boot.
> 
> I have this error:
> OMAP SD/MMC: 0
> reading u-boot.img
> reading u-boot.img
> Error reading cluster
> spl: error reading image u-boot.img, err - -1
> ### ERROR ### Please RESET the board ###
> 
> Some exploring i did some time ago showed that this error is deep in the
> FAT implementation. (a pity that i don't have my notes on this anymore)
> 
> I'am aware that there have been changes some time ago regarding FAT/SPL
> and malloc.
> 
> Is someone able to guess where the problem might be - to be true I
> didn't had a clue from the FAT code.
> 
> I will do some debugging later this day and post the results here.

The datapoint I want to raise is that I can see this with my SPL series
as well, but only on devkit8000.  Beagleboard and omap3evm are fine
booting from MMC with SPL.  Which is odd, I know.

-- 
Tom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] devkit8000: MMC/FAT booting problem with SPL
  2011-11-29 14:41 ` Tom Rini
@ 2011-11-29 15:11   ` Simon Schwarz
  2011-11-29 16:25   ` Marek Vasut
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Schwarz @ 2011-11-29 15:11 UTC (permalink / raw)
  To: u-boot


On 11/29/2011 03:41 PM, Tom Rini wrote:
> On 11/29/2011 04:11 AM, Simon Schwarz wrote:
[SNIP]
>> I will do some debugging later this day and post the results here.

So here is the result of my first session:
- The problem seems to be in fat.c disk_read-function.
- it returns -1 because if (cur_dev->block_read) seems to be false if it 
tries to read the second cluster (it seems works with the first cluster!)

So the question now is how can cur_dev->block_read be reset in between...

>
> The datapoint I want to raise is that I can see this with my SPL series
> as well, but only on devkit8000.  Beagleboard and omap3evm are fine
> booting from MMC with SPL.  Which is odd, I know.
>

Jap I know. This is a strange problem. ATM I am clueless...

Regards
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] devkit8000: MMC/FAT booting problem with SPL
  2011-11-29 14:41 ` Tom Rini
  2011-11-29 15:11   ` Simon Schwarz
@ 2011-11-29 16:25   ` Marek Vasut
  2011-11-29 17:14     ` Simon Schwarz
  1 sibling, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2011-11-29 16:25 UTC (permalink / raw)
  To: u-boot

> On 11/29/2011 04:11 AM, Simon Schwarz wrote:
> > Hi List,
> > 
> > there seems to be a problem in devkit8000 in combination with mmc boot.
> > 
> > I have this error:
> > OMAP SD/MMC: 0
> > reading u-boot.img
> > reading u-boot.img
> > Error reading cluster
> > spl: error reading image u-boot.img, err - -1
> > ### ERROR ### Please RESET the board ###
> > 
> > Some exploring i did some time ago showed that this error is deep in the
> > FAT implementation. (a pity that i don't have my notes on this anymore)
> > 
> > I'am aware that there have been changes some time ago regarding FAT/SPL
> > and malloc.
> > 
> > Is someone able to guess where the problem might be - to be true I
> > didn't had a clue from the FAT code.
> > 
> > I will do some debugging later this day and post the results here.
> 
> The datapoint I want to raise is that I can see this with my SPL series
> as well, but only on devkit8000.  Beagleboard and omap3evm are fine
> booting from MMC with SPL.  Which is odd, I know.

Stupid question -- isn't some stack corruption / memory corruption going on ?

M

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] devkit8000: MMC/FAT booting problem with SPL
  2011-11-29 16:25   ` Marek Vasut
@ 2011-11-29 17:14     ` Simon Schwarz
  2011-11-29 18:41       ` Simon Schwarz
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Schwarz @ 2011-11-29 17:14 UTC (permalink / raw)
  To: u-boot

On 11/29/2011 05:25 PM, Marek Vasut wrote:
[SNIP]
>
> Stupid question -- isn't some stack corruption / memory corruption going on ?
>
> M

Not stupid at all. I don't think it is a stack corruption but IMHO it 
seems that the .bss section is overwritten somehow.

The cur_dev pointer is 0x80000120 for the first sector and 0xe087c004 
before the second one. So either it is changed somewhere or somehow the 
pointer is overwritten by accident.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] devkit8000: MMC/FAT booting problem with SPL
  2011-11-29 17:14     ` Simon Schwarz
@ 2011-11-29 18:41       ` Simon Schwarz
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Schwarz @ 2011-11-29 18:41 UTC (permalink / raw)
  To: u-boot

On 11/29/2011 06:14 PM, Simon Schwarz wrote:
> On 11/29/2011 05:25 PM, Marek Vasut wrote:
> [SNIP]
>>
>> Stupid question -- isn't some stack corruption / memory corruption
>> going on ?
>>
>> M
>
> Not stupid at all. I don't think it is a stack corruption but IMHO it
> seems that the .bss section is overwritten somehow.
>
> The cur_dev pointer is 0x80000120 for the first sector and 0xe087c004
> before the second one. So either it is changed somewhere or somehow the
> pointer is overwritten by accident.
>

little status-report: The .bss-section is overwritten. Moving it into 
the middle of RAM fixes the problem - although this is not a solution it 
may help to find the root...

Regards

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-29 18:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-29 11:11 [U-Boot] devkit8000: MMC/FAT booting problem with SPL Simon Schwarz
2011-11-29 14:41 ` Tom Rini
2011-11-29 15:11   ` Simon Schwarz
2011-11-29 16:25   ` Marek Vasut
2011-11-29 17:14     ` Simon Schwarz
2011-11-29 18:41       ` Simon Schwarz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.