public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] u-boot sandbox crash
@ 2012-03-18  2:12 Marek Vasut
  2012-03-19  0:26 ` Mike Frysinger
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2012-03-18  2:12 UTC (permalink / raw)
  To: u-boot

Hello,

I think this segfault below is not wanted?


$ ./MAKEALL sandbox
Configuring for sandbox board...
   text    data     bss     dec     hex filename
 131497    6048   28488  166033   28891 ./u-boot

--------------------- SUMMARY ----------------------------
Boards compiled: 1
----------------------------------------------------------
marex at mashiro:~/U-Boot/u-boot-marex$ ./u-boot


U-Boot 2011.12-00509-ge7dc4f9 (Mar 18 2012 - 03:10:34)

DRAM:  128 MiB
Using default environment

In:    serial
Out:   serial
Err:   serial

=>base
Base Address: 0x00000000
=>md 0
00000000:Segmentation fault

Best regards,
Marek Vasut

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

* [U-Boot] u-boot sandbox crash
  2012-03-18  2:12 [U-Boot] u-boot sandbox crash Marek Vasut
@ 2012-03-19  0:26 ` Mike Frysinger
  2012-03-19  1:04   ` Marek Vasut
  2012-03-19  2:06   ` Simon Glass
  0 siblings, 2 replies; 4+ messages in thread
From: Mike Frysinger @ 2012-03-19  0:26 UTC (permalink / raw)
  To: u-boot

On Saturday 17 March 2012 22:12:38 Marek Vasut wrote:
> =>md 0
> 00000000:Segmentation fault

this is because the change to make this work was reverted.  i think ppc is 
broken, but haven't gone through the details to figure things out.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120318/91c29d74/attachment.pgp>

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

* [U-Boot] u-boot sandbox crash
  2012-03-19  0:26 ` Mike Frysinger
@ 2012-03-19  1:04   ` Marek Vasut
  2012-03-19  2:06   ` Simon Glass
  1 sibling, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2012-03-19  1:04 UTC (permalink / raw)
  To: u-boot

Dear Mike Frysinger,

> On Saturday 17 March 2012 22:12:38 Marek Vasut wrote:
> > =>md 0
> > 00000000:Segmentation fault
> 

I see.

> this is because the change to make this work was reverted.  i think ppc is
> broken, but haven't gone through the details to figure things out.
> -mike

Hrm ... I wish I'd be able to figure out how to run PPC/Taihu or PPC/Bamboo U-
Boot in QEMU.

Best regards,
Marek Vasut

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

* [U-Boot] u-boot sandbox crash
  2012-03-19  0:26 ` Mike Frysinger
  2012-03-19  1:04   ` Marek Vasut
@ 2012-03-19  2:06   ` Simon Glass
  1 sibling, 0 replies; 4+ messages in thread
From: Simon Glass @ 2012-03-19  2:06 UTC (permalink / raw)
  To: u-boot

Hi,

On Sun, Mar 18, 2012 at 5:26 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Saturday 17 March 2012 22:12:38 Marek Vasut wrote:
>> =>md 0
>> 00000000:Segmentation fault
>
> this is because the change to make this work was reverted. ?i think ppc is
> broken, but haven't gone through the details to figure things out.

It's because sandbox has a 128MB memory region, which is just created
using malloc(). We want address 0 to refer to the first byte of this
region.

I did create a patch to fix this, which used the map_physmem() to get
the address in the md command. However, ppc expects that the md
command just blindly uses the address it is given (i.e. assume it is
already a virtual address if the MMU is on, and a physical address if
not). I suspect other archs would have the same requirement if they
ever mapped virtual memory differently to physical memory.

I did post about it at the time. My proposed fix was to introduce the
idea of mapping an 'apparent' address. This would be a 1-1 mapping for
all architectures except sandbox, which would map it into its malloc'd
memory.

It's a little unfortunate that sandbox has to be the only thing with a
mapping, though. Partly that's why I haven't sent a patch.  Taken to
its logical conclusion then any memory access that the user requests
would end up going through this veneer. But I don't have any better
ideas yet.

If you're interested, the original patch was here:

http://patchwork.ozlabs.org/patch/121815/

Regards,
Simon

> -mike
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

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

end of thread, other threads:[~2012-03-19  2:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-18  2:12 [U-Boot] u-boot sandbox crash Marek Vasut
2012-03-19  0:26 ` Mike Frysinger
2012-03-19  1:04   ` Marek Vasut
2012-03-19  2:06   ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox