Discussion:
Imx51 processor hangs when we do an md 0xf0000000 (memory display) in u-boot
Greg Topmiller
2011-04-16 18:14:13 UTC
Permalink
We're are using the Freescale release L2.6.31_MX51_SDK_0912_Image and it will do this on a Freescale Babbage board and our design. It also does the same thing in Linux when we mmap the address 0xf0000000 and try to read from it. It does not hang on the Redboot.bin image supplied with the Freescale SDK. The Redboot dump command displays some data. On the Freescale 3Stack board we get an illegal address error in Redboot, but it will hang in u-boot. We realize this is a reserved physical address but would hope that an error of some kind would occur rather than locking up the CPU. Could it be some sort of MMU initialization difference between Redboot and u-boot?

Thanks in advance.

Greg
Sascha Hauer
2011-04-18 07:29:41 UTC
Permalink
On Sat, Apr 16, 2011 at 11:14:13AM -0700, Greg Topmiller wrote:
> We're are using the Freescale release L2.6.31_MX51_SDK_0912_Image and
> it will do this on a Freescale Babbage board and our design. It also
> does the same thing in Linux when we mmap the address 0xf0000000 and
> try to read from it. It does not hang on the Redboot.bin image
> supplied with the Freescale SDK. The Redboot dump command displays
> some data. On the Freescale 3Stack board we get an illegal address
> error in Redboot, but it will hang in u-boot. We realize this is a
> reserved physical address but would hope that an error of some kind
> would occur rather than locking up the CPU. Could it be some sort of
> MMU initialization difference between Redboot and u-boot?

I have no idea how redboot maps the memory in the mmu, but barebox and
u-boot use a 1:1 mapping which results in the behaviour you see.
Accessing reserved memory can result in a abort.

Sascha

--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Greg Topmiller
2011-04-18 09:44:16 UTC
Permalink
Thank you for your response.

Is there any way we can put code in u-boot to handle the abort?

Thanks,

Greg

________________________________________
From: Sascha Hauer [***@pengutronix.de]
Sent: Monday, April 18, 2011 3:29 AM
To: Greg Topmiller
Cc: ***@lists.infradead.org
Subject: Re: Imx51 processor hangs when we do an md 0xf0000000 (memory display) in u-boot

On Sat, Apr 16, 2011 at 11:14:13AM -0700, Greg Topmiller wrote:
> We're are using the Freescale release L2.6.31_MX51_SDK_0912_Image and
> it will do this on a Freescale Babbage board and our design. It also
> does the same thing in Linux when we mmap the address 0xf0000000 and
> try to read from it. It does not hang on the Redboot.bin image
> supplied with the Freescale SDK. The Redboot dump command displays
> some data. On the Freescale 3Stack board we get an illegal address
> error in Redboot, but it will hang in u-boot. We realize this is a
> reserved physical address but would hope that an error of some kind
> would occur rather than locking up the CPU. Could it be some sort of
> MMU initialization difference between Redboot and u-boot?

I have no idea how redboot maps the memory in the mmu, but barebox and
u-boot use a 1:1 mapping which results in the behaviour you see.
Accessing reserved memory can result in a abort.

Sascha

--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Omar Pighi
2011-04-18 13:15:49 UTC
Permalink
...
some problems on enviroment loading. (imx25 3stack board)
ad the startup first time i have :
devfs: wrong magic on /dev/env0
if i perform a saveenv then reset:
wrong crc on env...
something wrong ... if i try to update_kernel it say that it cannot find
the nand.kernel partition..
but i can see the partition on dev directory...

in menuconfig->generalsettings i checked only "compile in default
enviroment"

Thanks
Omar



Dott. Ing. Omar Pighi
R&D Selea s.r.l.
Via A.Moro 69
46015 Cicognara (MN)
ITALY
tel +39-0375-889091
fax +39-0375-889080
web:www.selea.com


Il 18/04/2011 11:44, Greg Topmiller ha scritto:
> Thank you for your response.
>
> Is there any way we can put code in u-boot to handle the abort?
>
> Thanks,
>
> Greg
>
> ________________________________________
> From: Sascha Hauer [***@pengutronix.de]
> Sent: Monday, April 18, 2011 3:29 AM
> To: Greg Topmiller
> Cc: ***@lists.infradead.org
> Subject: Re: Imx51 processor hangs when we do an md 0xf0000000 (memory display) in u-boot
>
> On Sat, Apr 16, 2011 at 11:14:13AM -0700, Greg Topmiller wrote:
>
>> We're are using the Freescale release L2.6.31_MX51_SDK_0912_Image and
>> it will do this on a Freescale Babbage board and our design. It also
>> does the same thing in Linux when we mmap the address 0xf0000000 and
>> try to read from it. It does not hang on the Redboot.bin image
>> supplied with the Freescale SDK. The Redboot dump command displays
>> some data. On the Freescale 3Stack board we get an illegal address
>> error in Redboot, but it will hang in u-boot. We realize this is a
>> reserved physical address but would hope that an error of some kind
>> would occur rather than locking up the CPU. Could it be some sort of
>> MMU initialization difference between Redboot and u-boot?
>>
> I have no idea how redboot maps the memory in the mmu, but barebox and
> u-boot use a 1:1 mapping which results in the behaviour you see.
> Accessing reserved memory can result in a abort.
>
> Sascha
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
> _______________________________________________
> barebox mailing list
> ***@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
>
>
Sascha Hauer
2011-04-18 17:48:45 UTC
Permalink
On Mon, Apr 18, 2011 at 05:03:30PM +0200, Omar Pighi wrote:
> reading here:
> http://www.spinics.net/lists/u-boot-v2/msg02944.html
>
> it seems that now it works and save enviroments with correct crc.
> but when i triy to ypdate_kernel it says_
> partition dev/nand0.kernel.bb not found... no one .bb partition has been
> created.
> it should be done by hush_hack but it doesn't.
>
> reading here:
> http://www.spinics.net/lists/u-boot-v2/msg02957.html
>
> but "CONFIG_GLOB=y"
>
> I cannot find it in any kconfig file... so it is not possible to set
> using menuconfig... should i add by hand. this means something missin in
> the kconfigs...

CONFIG_GLOB depends on CONFIG_SHELL_HUSH. Could it be that hush is not
enabled in you config?

Sascha

--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Omar Pighi
2011-04-19 09:17:08 UTC
Permalink
Hi,

you where right about CONFIG_GLOB... sorry.
and what about the other problem on crc error?
(http://www.spinics.net/lists/u-boot-v2/msg02944.html) is it ok the
correction?

but i have some problem on saving enviroment... I mean if i create a
enviroment variable from command line (i.e. myvar=testvalue) and perorm
saveenv command.
then reset the board.. i should find the variable again (using printenv
i doesn't have it defined)

i tried to modify a scrit in the /env directory (just adding an echo)
then "make" but downloading the new bin... but i cannot see the new init
script .. in the /env/bin directory i still have the old one...

can anybody explain to me the usage of this menuconfig item:

[*] Compile in default environment │ │
│ │ [*] Default environment generic │ │
│ │ (arch/arm/boards/freescale-mx25-3-stack/env/) Default environment path

attached my config file just to understand if i'm doign something wrong
on enviroment usage...

thanks
Omar


Dott. Ing. Omar Pighi
R&D Selea s.r.l.
Via A.Moro 69
46015 Cicognara (MN)
ITALY
tel +39-0375-889091
fax +39-0375-889080
web:www.selea.com


Il 18/04/2011 19:48, Sascha Hauer ha scritto:
> On Mon, Apr 18, 2011 at 05:03:30PM +0200, Omar Pighi wrote:
>
>> reading here:
>> http://www.spinics.net/lists/u-boot-v2/msg02944.html
>>
>> it seems that now it works and save enviroments with correct crc.
>> but when i triy to ypdate_kernel it says_
>> partition dev/nand0.kernel.bb not found... no one .bb partition has been
>> created.
>> it should be done by hush_hack but it doesn't.
>>
>> reading here:
>> http://www.spinics.net/lists/u-boot-v2/msg02957.html
>>
>> but "CONFIG_GLOB=y"
>>
>> I cannot find it in any kconfig file... so it is not possible to set
>> using menuconfig... should i add by hand. this means something missin in
>> the kconfigs...
>>
> CONFIG_GLOB depends on CONFIG_SHELL_HUSH. Could it be that hush is not
> enabled in you config?
>
> Sascha
>
>
Omar Pighi
2011-04-18 15:03:33 UTC
Permalink
reading here:
http://www.spinics.net/lists/u-boot-v2/msg02944.html

it seems that now it works and save enviroments with correct crc.
but when i triy to ypdate_kernel it says_
partition dev/nand0.kernel.bb not found... no one .bb partition has been
created.
it should be done by hush_hack but it doesn't.

reading here:
http://www.spinics.net/lists/u-boot-v2/msg02957.html

but "CONFIG_GLOB=y"

I cannot find it in any kconfig file... so it is not possible to set
using menuconfig... should i add by hand. this means something missin in
the kconfigs...

Thanks
Omar

Dott. Ing. Omar Pighi
R&D Selea s.r.l.
Via A.Moro 69
46015 Cicognara (MN)
ITALY
tel +39-0375-889091
fax +39-0375-889080
web:www.selea.com


Il 18/04/2011 09:29, Sascha Hauer ha scritto:
> On Sat, Apr 16, 2011 at 11:14:13AM -0700, Greg Topmiller wrote:
>
>> We're are using the Freescale release L2.6.31_MX51_SDK_0912_Image and
>> it will do this on a Freescale Babbage board and our design. It also
>> does the same thing in Linux when we mmap the address 0xf0000000 and
>> try to read from it. It does not hang on the Redboot.bin image
>> supplied with the Freescale SDK. The Redboot dump command displays
>> some data. On the Freescale 3Stack board we get an illegal address
>> error in Redboot, but it will hang in u-boot. We realize this is a
>> reserved physical address but would hope that an error of some kind
>> would occur rather than locking up the CPU. Could it be some sort of
>> MMU initialization difference between Redboot and u-boot?
>>
> I have no idea how redboot maps the memory in the mmu, but barebox and
> u-boot use a 1:1 mapping which results in the behaviour you see.
> Accessing reserved memory can result in a abort.
>
> Sascha
>
>
Loading...